Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not find <torch/extension.h>

Tags:

c++

pytorch

I create a pytorch extention, followed by this link but it throws out the error that

fatal error: torch/extension.h: No such file or directory.

ubuntu 18.04
code::blocks 17.04
gcc 7.4.0
#include <torch/extension.h>

I expect the code to run. Is there any document to fix this problem?

like image 281
Cery Avatar asked Dec 08 '25 09:12

Cery


1 Answers

is the canonical header file that create Python bindings for C++/Cuda extensions. So Try upgrading the version of Pytorch if it's not in newest version.

like image 172
neelesh bisht Avatar answered Dec 10 '25 21:12

neelesh bisht