(cls, func, types, args=(), kwargs=None)
| 115 | |
| 116 | @classmethod |
| 117 | def __torch_function__(cls, func, types, args=(), kwargs=None): |
| 118 | if kwargs is None: |
| 119 | kwargs = {} |
| 120 | args = [data.tensor if isinstance(data, AutoScalingTensor) else data for data in args] |
| 121 | return func(*args, **kwargs) |
| 122 | |
| 123 | # A further enhancement - we want AutoScale to behave exactly like the tensor it contains |
| 124 | def __getattribute__(self, name: str): |
nothing calls this directly
no outgoing calls
no test coverage detected