I am using libtorch, c++ frontend, downloaded from the main page of https://pytorch.org/ 3 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 https://github.com/pytorch/pytorch/pull/16580/files#diff-81d29c29bbf9fb05edfa7fd70d189374 15 and https://caffe2.ai/doxygen-c/html/structtorch_1_1autograd_1_1profiler_1_1_record_profile.html 14
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 https://pytorch.org/cppdocs/api/library_root.html 6, and cannot find something about profiler, so how should i do to use the profiler in my project?