catalyst
catalyst copied to clipboard
Remove redundant flatten/unflatten of PyTrees
Context: When calling get_abstract_signature from within get_decomposed_signature we are flattening/unflattening the PyTree one more time without need. In this sense get_abstract_signature is just a wrapper for the shaped_abstractify function that we don't need here.
Description of the Change: Avoid the wrapper function call and use shaped_abstractify directly.
Benefits: Avoid code that does nothing.