Yiming Zhou
e4d6c56ffb
Improve dynamo graph capture stack trace for custom ops ( #165693 )
...
For a custom op
```
@torch.library.custom_op("my_lib::foo", mutates_args={})
def foo(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
return x + y
```
ppl could call `torch.ops.my_lib.foo()` or directly call `foo()` in the `forward` of an `nn.Module`
These two calling conventions will lead to the same node in the output graph, but different stack traces.
When directly calling `foo()`, the displayed stack_trace in the graph will be
```
# File: .../pytorch/torch/_library/custom_ops.py:687 in __call__, code: return self._opoverload(*args, **kwargs)
```
This is not useful so we filter it out.
```
python test/functorch/test_aot_joint_with_descriptors.py -k test_custom_op_stack_trace
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/165693
Approved by: https://github.com/SherlockNoMad , https://github.com/williamwen42
2025-10-18 03:48:18 +00:00
..
2025-10-17 07:27:11 +00:00
2024-12-13 22:13:12 +00:00
2025-07-17 12:08:33 +00:00
2025-06-21 18:33:38 +00:00
2025-10-17 18:32:39 +00:00
2025-06-24 04:53:54 +00:00
2025-10-17 18:32:39 +00:00
2025-03-29 01:39:13 +00:00
2025-07-25 02:37:30 +00:00
2025-10-17 23:28:22 +00:00
2025-10-13 01:48:55 +00:00
2025-10-17 22:35:50 +00:00
2025-10-17 17:44:45 +00:00
2025-10-01 21:32:59 +00:00
2025-10-15 17:47:23 +00:00
2025-10-17 22:35:50 +00:00
2025-10-09 15:42:51 +00:00
2025-10-18 03:48:18 +00:00
2025-10-17 07:27:11 +00:00
2025-10-17 22:35:50 +00:00
2025-10-17 22:35:50 +00:00
2025-09-10 04:39:20 +00:00
2025-01-27 18:12:39 +00:00
2025-10-13 01:48:55 +00:00
2025-03-29 01:39:13 +00:00
2025-10-11 01:03:55 +00:00
2025-10-17 07:27:11 +00:00
2025-10-17 19:06:05 +00:00
2025-10-18 01:11:20 +00:00
2025-09-25 06:58:58 +00:00
2025-08-06 02:26:10 +00:00
2025-10-15 17:24:50 +00:00
2025-10-17 07:27:11 +00:00
2025-07-29 03:26:09 +00:00
2025-02-22 03:44:53 +00:00
2025-10-17 07:27:11 +00:00
2025-09-02 16:53:55 +00:00
2025-09-19 07:37:14 +00:00
2025-10-09 15:42:51 +00:00
2025-08-03 20:53:58 +00:00
2025-10-02 22:22:04 +00:00
2024-09-06 08:18:38 +00:00
2024-11-04 18:30:29 +00:00
2025-10-14 19:19:03 +00:00
2025-05-12 18:30:52 +00:00
2025-10-13 11:47:32 +00:00
2025-08-08 17:41:22 +00:00
2025-09-18 16:08:13 +00:00
2025-04-26 18:10:58 +00:00
2025-10-16 23:08:27 +00:00
2025-07-30 19:30:55 +00:00
2025-10-17 07:27:11 +00:00
2025-10-13 01:48:55 +00:00
2025-06-04 14:38:13 +00:00
2025-10-08 07:27:17 +00:00
2024-11-22 20:54:55 +00:00
2025-10-08 07:27:17 +00:00
2025-09-09 15:49:21 +00:00
2025-08-04 20:37:39 +00:00
2025-09-29 15:15:10 +00:00
2025-09-29 17:50:12 +00:00
2025-04-10 21:02:14 +00:00
2025-04-25 20:15:04 +00:00
2025-01-04 14:17:20 +00:00
2025-09-09 15:49:21 +00:00
2025-10-09 03:24:50 +00:00
2025-09-23 22:15:10 +00:00
2025-01-04 10:47:51 +00:00
2024-12-18 23:02:30 +00:00
2025-10-17 23:46:02 +00:00
2025-10-14 14:18:42 +00:00
2025-09-10 07:05:14 +00:00
2025-10-13 01:48:55 +00:00
2025-10-17 07:27:11 +00:00
2025-06-14 03:37:38 +00:00
2025-10-14 17:17:11 +00:00
2025-10-18 03:20:30 +00:00
2025-08-04 20:37:39 +00:00
2025-01-23 00:31:39 +00:00
2025-09-26 15:45:02 +00:00
2024-12-18 23:02:30 +00:00
2025-10-09 18:03:12 +00:00
2025-10-06 22:42:01 +00:00
2024-12-18 23:02:30 +00:00
2025-02-08 00:55:20 +00:00
2025-01-04 10:47:51 +00:00
2025-07-09 11:02:23 +00:00
2025-07-09 11:02:23 +00:00
2025-10-15 03:18:57 +00:00
2025-07-09 11:02:23 +00:00
2025-07-10 06:34:46 +00:00
2025-10-17 07:27:11 +00:00
2025-02-28 00:47:03 +00:00
2025-06-04 14:38:13 +00:00
2025-10-17 07:27:11 +00:00
2025-10-17 07:27:11 +00:00
2025-10-02 22:22:04 +00:00
2025-10-02 22:22:04 +00:00
2025-10-02 22:22:04 +00:00
2025-10-02 22:22:04 +00:00
2024-12-18 23:02:30 +00:00
2025-10-09 03:24:50 +00:00
2025-10-17 07:27:11 +00:00
2024-12-18 23:02:30 +00:00
2025-09-26 18:26:56 +00:00
2025-07-09 11:02:23 +00:00
2025-07-09 11:02:23 +00:00
2025-10-15 22:26:47 +00:00
2025-07-09 11:02:23 +00:00
2025-07-21 21:44:49 +00:00
2025-10-17 02:45:07 +00:00
2025-09-17 20:29:12 +00:00
2024-12-18 23:02:30 +00:00
2025-01-04 10:47:51 +00:00
2025-07-17 08:57:34 +00:00
2024-12-18 23:02:30 +00:00
2025-09-10 14:19:34 +00:00
2024-12-18 23:02:30 +00:00
2025-09-12 15:02:40 +00:00
2024-12-18 23:02:30 +00:00
2025-10-17 15:35:49 +00:00
2025-10-16 19:34:10 +00:00
2025-10-13 01:48:55 +00:00
2025-09-26 17:41:00 +00:00
2025-01-04 10:47:51 +00:00
2024-12-06 21:45:18 +00:00
2025-10-13 17:59:18 +00:00
2025-10-17 07:27:11 +00:00
2025-01-04 10:47:51 +00:00
2025-09-25 13:47:46 +00:00
2025-09-26 18:26:56 +00:00
2025-10-17 07:27:11 +00:00
2025-10-14 20:21:04 +00:00
2025-10-08 09:09:16 +00:00
2024-12-18 23:02:30 +00:00
2025-03-18 16:09:39 +00:00
2025-07-09 11:02:23 +00:00
2025-09-29 09:08:04 +00:00
2025-09-16 12:07:50 +00:00
2024-12-27 07:58:44 +00:00
2025-09-13 07:52:50 +00:00
2025-07-09 11:02:23 +00:00
2025-09-19 19:41:33 +00:00
2025-10-01 21:32:59 +00:00
2025-10-08 18:42:37 +00:00
2025-10-17 07:27:11 +00:00
2025-10-07 20:51:22 +00:00
2025-10-15 17:24:50 +00:00
2025-09-05 20:15:29 +00:00
2025-07-11 03:21:47 +00:00
2025-10-17 07:27:11 +00:00
2025-07-17 01:27:44 +00:00
2025-10-17 17:52:19 +00:00
2025-09-15 06:50:00 +00:00
2025-08-10 18:35:42 +00:00
2025-10-17 07:27:11 +00:00
2025-10-17 07:27:11 +00:00
2025-02-25 03:47:40 +00:00
2025-08-14 17:06:27 +00:00
2025-10-17 07:27:11 +00:00
2025-09-23 07:52:00 +00:00
2025-10-16 14:31:00 +00:00
2025-06-04 01:58:52 +00:00
2025-07-09 11:02:23 +00:00
2025-01-04 10:47:51 +00:00
2024-12-18 23:02:30 +00:00
2025-09-29 01:42:01 +00:00
2025-10-17 07:27:11 +00:00
2025-09-12 16:26:54 +00:00
2025-07-09 11:02:23 +00:00
2025-09-29 01:42:01 +00:00
2025-01-26 03:37:20 +00:00
2025-10-11 23:21:35 +00:00
2025-10-17 07:27:11 +00:00
2025-10-09 21:58:54 +00:00
2025-10-08 07:27:17 +00:00
2025-10-08 07:27:17 +00:00
2025-10-13 01:48:55 +00:00
2025-07-09 11:02:23 +00:00
2025-09-15 05:44:15 +00:00
2025-02-05 19:40:10 +00:00
2024-12-12 01:18:34 +00:00
2025-10-04 15:25:45 +00:00
2025-10-15 19:45:55 +00:00
2025-08-16 00:54:32 +00:00
2024-12-18 23:02:30 +00:00
2025-07-09 11:02:23 +00:00
2025-02-04 19:07:04 +00:00
2025-10-12 12:11:57 +00:00