It seems all things are OK when I use intel compiler to compile the project. However, it tells me that "cannot load libtorch.so" when I use commands "luajit -ltorch".
@soumith You have mentioned that " install/bin/luajit -e 'ffi=require "ffi"; ffi.load("install/lib/lua/5.1/libtorch.so")' " is good way to debug. Here .I have tried it, and it tells the function symbols in "AVX.c" and "AVX2.c" are not defined.
I checked the difference of C flags between using gcc and icc.
eg. the C flags is "-mavx" when compiling AVX.c using gcc. But it is none when using icc.
I have tried to add c flags such as
if (USING_INTEL AND (NOT MSVC)) set(C_AVX_FLAGS_ "-mavx" ) set(C_AVX2_FLAGS_ "-march=core-avx2" ) endif ()
to lib/TH/CMakefile.txt
And it is OK. you can refer to the link
@soumith would you like tell me if it is OK to compile torch7 with icc now.
It seems all things are OK when I use intel compiler to compile the project. However, it tells me that "cannot load libtorch.so" when I use commands "luajit -ltorch". @soumith You have mentioned that " install/bin/luajit -e 'ffi=require "ffi"; ffi.load("install/lib/lua/5.1/libtorch.so")' " is good way to debug. Here .I have tried it, and it tells the function symbols in "AVX.c" and "AVX2.c" are not defined. I checked the difference of C flags between using gcc and icc. eg. the C flags is "-mavx" when compiling AVX.c using gcc. But it is none when using icc. I have tried to add c flags such as
if (USING_INTEL AND (NOT MSVC)) set(C_AVX_FLAGS_ "-mavx" ) set(C_AVX2_FLAGS_ "-march=core-avx2" ) endif ()
to lib/TH/CMakefile.txt And it is OK. you can refer to the link @soumith would you like tell me if it is OK to compile torch7 with icc now.