Files
pytorch/torch/csrc/itt.cpp
cyyever 24ca7e91e6 [1/N] Use internal linkage in torch/csrc C++ files. (#150930)
Turn more functions and variables into static if they are not used outside the cpp files. Unused functions are removed.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/150930
Approved by: https://github.com/Skylion007

Co-authored-by: Aaron Gokaslan <aaronGokaslan@gmail.com>
2025-04-11 02:19:31 +00:00

15 lines
430 B
C++

#include <torch/csrc/itt.h>
#include <torch/csrc/itt_wrapper.h>
namespace torch::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 torch::profiler