(arg: Value, i: int)
| 507 | # Wrap all inputs as a PythonTensor subclass and insert them into the FX |
| 508 | # graph as placeholder nodes |
| 509 | def wrap(arg: Value, i: int) -> Value: |
| 510 | placeholder = self.create_proxy("placeholder", f"ph_{i}", (), {}) |
| 511 | if isinstance(arg, torch.Tensor): |
| 512 | return PythonTensor(arg, placeholder, is_immutable=True) |
| 513 | else: |
| 514 | # torch._assert( |
| 515 | # placeholder == arg, |
| 516 | # f"ph_{i} has been specialized to have value {arg}", |
| 517 | # ) |
| 518 | return arg |
| 519 | |
| 520 | tree_args = [wrap(arg, i) for i, arg in enumerate(concrete_args)] |
| 521 | if in_spec: |
no test coverage detected