I am using libtorch, c++ frontend, downloaded from the main page of https://pytorch.org/ and trying to profile layer by layer.
I’ve learn that in python i can use torch.autograd.profiler.profile
. And i’ve read some website, including Access profiler from cpp by zdevito · Pull Request #16580 · pytorch/pytorch · GitHub and Caffe2 - C++ API: torch::autograd::profiler::RecordProfile Struct Reference
But when i use CLion to construct my code, use torch::autograd::profiler::RecordProfile
, it report an error that
no member named ‘profiler’ in namespace 'torch::autograd
I turned to Library API — PyTorch main documentation, and cannot find something about profiler
, so how should i do to use the profiler
in my project?