Files
pytorch/torch/csrc/itt.cpp
cyy 4a019047ad Enable nested namespace check in clang-tidy (#118506)
It is time to enable nested namespaces in the code.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/118506
Approved by: https://github.com/albanD
2024-01-31 00:32:35 +00:00

15 lines
439 B
C++

#include <torch/csrc/itt_wrapper.h>
#include <torch/csrc/utils/pybind.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