(*tensors)
| 173 | return rst |
| 174 | |
| 175 | def get_shape_hash(*tensors): |
| 176 | def map_scalar_to_tuple(ishape): |
| 177 | return (1,) if ishape == tuple() else ishape |
| 178 | |
| 179 | return hash(tuple([map_scalar_to_tuple(t._tuple_shape) for t in tensors])) |
| 180 | |
| 181 | def wrapped_func(*args, **kwargs): |
| 182 | from ..traced_module.pytree import tree_flatten |
no test coverage detected