Open AntheaLi opened 4 years ago
I have the same problem.
I modify the cmakelist.txt and solve this.
Had the same problem. Solved it with this (assuming you installed a separate conda environment with requirements)
Locate op_kernel.h
in anaconda:
find /home/share/anaconda3/ | grep "op_kernel"
And find the path corresponding to your environment (it will be long and ugly, /home/share/anaconda3/pkgs/tensorflow-base-1.12.0-gpu_py36had579c0_0/lib/python3.6/site-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h
in my case)
Now add .../include
directory to CMakeLists.txt
:
include_directories("/usr/local")
include_directories("/home/share/anaconda3/pkgs/tensorflow-base-1.12.0-gpu_py36had579c0_0/lib/python3.6/site-packages/tensorflow/include")
A more elegant solution is to set up properly the global environment variable TF_INC
to point to the same directory.
Note that tensorflow 1.12 is required, as it throws a lot of this will be deprecated in future versions
during compilation.
I was trying to make the tensorflow c extension, but I have a following error
[ 2%] Building NVCC (Device) object CMakeFiles/primitive_gen.dir/src/primitive_gen_generated_octree_pooling_op.cu.cc.o In file included from /orion/u/liyichen/primitive/hier-cube/cext/src/octree_pooling_op.cu.cc:3:0: /orion/u/liyichen/primitive/hier-cube/cext/src/octree.h:9:49: fatal error: tensorflow/core/framework/op_kernel.h: No such file or directory compilation terminated. CMake Error at primitive_gen_generated_octree_pooling_op.cu.cc.o.cmake:207 (message): Error generating /orion/u/liyichen/primitive/hier-cube/cext/build/CMakeFiles/primitive_gen.dir/src/./primitive_gen_generated_octree_pooling_op.cu.cc.o
CMakeFiles/primitive_gen.dir/build.make:196: recipe for target 'CMakeFiles/primitive_gen.dir/src/primitive_gen_generated_octree_pooling_op.cu.cc.o' failed make[2]: [CMakeFiles/primitive_gen.dir/src/primitive_gen_generated_octree_pooling_op.cu.cc.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/primitive_gen.dir/all' failed make[1]: [CMakeFiles/primitive_gen.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2