mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
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>
15 lines
430 B
C++
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
|