pytorch/torch/csrc/profiler/python
dujinhang 2e8ce910bb [Profiler][1/N] add profiler support for custom device. (#101554)
1. `torch.autograd.profiler` interface parameters changed. (use `self.use_device` instead of `self.use_cuda` facilitates access by other devices and integrate it in subsequent pr)
2. Modify `ProfilerEventStub`(aka `std::shared_ptr<CUevent_st>`) to `ProfilerVoidEventStub`(aka `std::shared_ptr<void>`) so that `ProfilerStubs` can be inherited by any `{device}Methods`.
In addition, `cuda_event_start_` is renamed to `device_event_start_` , cuda and other devices can use this event pointer if needed.
4. custom device support using legacy profiling(add `ProfilerState::KINETO_PRIVATEUSE1_FALLBACK` option)
5. add `privateuse1Stubs` register
(parse results and test cases are added in subsequent pr)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/101554
Approved by: https://github.com/aaronenyeshi
2023-06-02 09:19:19 +00:00
..
combined_traceback.cpp [combined tracebacks] missing gil acquire (#99685) 2023-04-21 06:24:36 +00:00
combined_traceback.h Revert "Revert "[memory profiling] add a facility to gather combined C++/Python/TorchScript stack traces. (#95541)"" (#96878) 2023-03-16 04:12:54 +00:00
init.cpp [Profiler][1/N] add profiler support for custom device. (#101554) 2023-06-02 09:19:19 +00:00
init.h [Profiler] Handle ABA for TensorImpl* when assigning IDs (#87133) 2022-11-08 21:48:43 +00:00
pybind.h [Profiler] Use strong typedef for Tensor ID (#85718) 2022-09-29 02:59:45 +00:00