mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
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
15 lines
439 B
C++
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
|