mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fixes https://github.com/pytorch/pytorch/pull/84848#discussion_r986329680 @malfet @slgong-fb Pull Request resolved: https://github.com/pytorch/pytorch/pull/86199 Approved by: https://github.com/malfet
17 lines
464 B
C++
17 lines
464 B
C++
#include <torch/csrc/itt_wrapper.h>
|
|
#include <torch/csrc/utils/pybind.h>
|
|
|
|
namespace torch {
|
|
namespace profiler {
|
|
void initIttBindings(PyObject* module) {
|
|
auto m = py::handle(module).cast<py::module>();
|
|
|
|
auto itt = m.def_submodule("_itt", "VTune ITT bindings");
|
|
itt.def("is_available", itt_is_available);
|
|
itt.def("rangePush", itt_range_push);
|
|
itt.def("rangePop", itt_range_pop);
|
|
itt.def("mark", itt_mark);
|
|
}
|
|
} // namespace profiler
|
|
} // namespace torch
|