jetson-reinforcement icon indicating copy to clipboard operation
jetson-reinforcement copied to clipboard

problem building pytorch with jetson tx2

Open phojjat opened this issue 5 years ago • 7 comments

Hello,

make gave me the following error. cmake ../ seemed to have finished fine. I am using jetson TX2 L4T 28.2.0 with Ubuntu 16.04 and CUDA 9.0252

Scanning dependencies of target jetson-reinforcement [ 40%] Building CXX object CMakeFiles/jetson-reinforcement.dir/c/pyTensor.cpp.o In file included from /home/nvidia/jetson-reinforcement/c/pyTensor.cpp:6:0: /home/nvidia/jetson-reinforcement/c/pyTorch.h:14:19: fatal error: TH/TH.h: No such file or directory compilation terminated. CMakeFiles/jetson-reinforcement.dir/build.make:69: recipe for target 'CMakeFiles/jetson-reinforcement.dir/c/pyTensor.cpp.o' failed make[2]: *** [CMakeFiles/jetson-reinforcement.dir/c/pyTensor.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/jetson-reinforcement.dir/all' failed make[1]: *** [CMakeFiles/jetson-reinforcement.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

phojjat avatar Oct 29 '18 19:10 phojjat

@phojjat Have u fix the problem? I met the same one, waiting for ur reply! thank u so much!

yonger001 avatar Dec 01 '18 03:12 yonger001

Have the same problem... Any suggestions?

Victorsoukhov avatar Dec 13 '18 13:12 Victorsoukhov

Jetson TX1 with JetPack 3.3 and L4T 28.2:

[ 8%] Building NVCC (Device) object CMakeFiles/THC.dir/generated/THC_generated_THCTensorMaskedByte.cu.o Killed CMake Error at THC_generated_THCTensorMode.cu.o.cmake:267 (message): Error generating file /home/nvidia/jetson-reinforcement/build/pytorch/torch/lib/build/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMode.cu.o

CMakeFiles/THC.dir/build.make:11356: recipe for target 'CMakeFiles/THC.dir/THC_generated_THCTensorMode.cu.o' failed make[2]: *** [CMakeFiles/THC.dir/THC_generated_THCTensorMode.cu.o] Error 1 make[2]: *** Waiting for unfinished jobs.... CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/THC.dir/all' failed make[1]: *** [CMakeFiles/THC.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

During the build of PyTorch, this is the error that I receive. Looking at the code referenced,

if(CUDA_result)

Since nvcc can sometimes leave half done files make sure that we delete the output file.

cuda_execute_process( "Removing ${generated_file}" COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}" ) message(FATAL_ERROR "Error generating file ${generated_file}") else() ...

Is there something I can do to allow PyTorch to continue? After flashing the TX1, I did install arduino, if that might have caused an issue.

T-Si avatar Mar 03 '19 21:03 T-Si

It looks like Linux is killing the compiler because TX1 ran out of memory. Can you try mounting a swap file? https://support.rackspace.com/how-to/create-a-linux-swap-file/


From: T-Si [email protected] Sent: Sunday, March 3, 2019 4:22:03 PM To: dusty-nv/jetson-reinforcement Cc: Subscribed Subject: Re: [dusty-nv/jetson-reinforcement] problem building pytorch with jetson tx2 (#31)

Jetson TX1 with JetPack 3.3 and L4T 28.2:

[ 8%] Building NVCC (Device) object CMakeFiles/THC.dir/generated/THC_generated_THCTensorMaskedByte.cu.o Killed CMake Error at THC_generated_THCTensorMode.cu.o.cmake:267 (message): Error generating file /home/nvidia/jetson-reinforcement/build/pytorch/torch/lib/build/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMode.cu.o

CMakeFiles/THC.dir/build.make:11356: recipe for target 'CMakeFiles/THC.dir/THC_generated_THCTensorMode.cu.o' failed make[2]: *** [CMakeFiles/THC.dir/THC_generated_THCTensorMode.cu.o] Error 1 make[2]: *** Waiting for unfinished jobs.... CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/THC.dir/all' failed make[1]: *** [CMakeFiles/THC.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

During the build of PyTorch, this is the error that I receive. Looking at the code referenced,

if(CUDA_result)

Since nvcc can sometimes leave half done files make sure that we delete the output file.

cuda_execute_process( "Removing ${generated_file}" COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}" ) message(FATAL_ERROR "Error generating file ${generated_file}") else() ...

Is there something I can do to allow PyTorch to continue? After flashing the TX1, I did install arduino, if that might have caused an issue.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/dusty-nv/jetson-reinforcement/issues/31#issuecomment-469065652, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOpDK5lEg4YNxIh25FvQw3FHKGHHw-swks5vTDz7gaJpZM4YAEyD.


This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

dusty-nv avatar Mar 03 '19 21:03 dusty-nv

I am having the same problem on TX2. I tried mounting a swap file following the instruction, but I am still having the same error. Any suggestions? Thanks! ''' [ 36%] Built target jetson-utils [ 38%] Building CXX object CMakeFiles/jetson-reinforcement.dir/c/pyTensor.cpp.o In file included from /home/nvidia/Documents/../jetson-reinforcement/c/pyTensor.cpp:6:0: /home/nvidia/Documents/../jetson-reinforcement/c/pyTorch.h:14:19: fatal error: TH/TH.h: No such file or directory compilation terminated. CMakeFiles/jetson-reinforcement.dir/build.make:251: recipe for target 'CMakeFiles/jetson-reinforcement.dir/c/pyTensor.cpp.o' failed make[2]: *** [CMakeFiles/jetson-reinforcement.dir/c/pyTensor.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/jetson-reinforcement.dir/all' failed make[1]: *** [CMakeFiles/jetson-reinforcement.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 '''

qwertypo888 avatar Mar 13 '19 03:03 qwertypo888

I am having the same issue. Anyone sorted out?

brunoeducsantos avatar Jul 31 '19 19:07 brunoeducsantos

I guess everyone found the solution , but here it goes:

  1. Install pytorch0.3.01 first
  2. Move to opt/ dir
  3. make on build of project

brunoeducsantos avatar Aug 01 '19 19:08 brunoeducsantos