caffe2 on jetson TX2 gpu support?

Dear all,

I have recently fresh flashed the Jetson TX2 with JetPack 3.1 and tried proceeded installing caffe2 on it.
Prior to installing caffe2 I followed as the guide flashing complete new build with all included dependencies in JetPack(opencv4tegra etc) and the followed installing opencv 3.3:

After that I followed the guide to installe caffe2 on tegra: (building from source)

and now I am succesful in importing the caffe2 for regular testing but it seems the GPU is not working. Is it common or is that I am missing something?


Thanks for your feedback.
We are checking this issue and will update information with you later.

Hi again!

I tested it out and seems to be working!
sudo /tegrastats and GR3D seems to be getting some load!
I am wondering if there is some scripts to restore the normal state after using the ./jetson_clocks?
and another question whether it is possible to get even more juice out of the TX2, even if all the 6 cores are up and running the jetson_clocks ( juice from GPU)

EDIT: found some answers already:

sudo /home/ubuntu/ --store       # save clocks config into l4t_dfs.conf file
sudo /home/ubuntu/               # boost clocks
sudo /home/ubuntu/ --restore     # restore clocks config from l4t_dfs.conf file


We have tested Caffe2 with JetPack3.1 on TX2.
It can be well-installed by upgrading the Eigen package to 3.3.0 :

For maximizing the TX2 performance,
You can rewrite all the configuration to the max with nvpmodel and lock the frequency to maximal via jetson_clocks:

sudo nvpmodel -m 0
sudo ./


For me this is still not working. I upgraded to Eigen 3.3.4 and tested it on a TX2 with JetPack 3.2:

THis is the error I get:

81%] Building CXX object caffe2/CMakeFiles/caffe2_pybind11_state_gpu.dir/python/
…/lib/ undefined reference to `void caffe2::math::BiasCHW<float, caffe2::CUDAContext>(float const*, int, int, float*, caffe2::CUDAContext*)’
collect2: error: ld returned 1 exit status
caffe2/CMakeFiles/elementwise_op_gpu_test.dir/build.make:115: recipe for target ‘bin/elementwise_op_gpu_test’ failed
make[2]: *** [bin/elementwise_op_gpu_test] Error 1
CMakeFiles/Makefile2:1614: recipe for target ‘caffe2/CMakeFiles/elementwise_op_gpu_test.dir/all’ failed
make[1]: *** [caffe2/CMakeFiles/elementwise_op_gpu_test.dir/all] Error 2
[ 82%] Linking CXX shared module python/
[ 82%] Built target caffe2_pybind11_state_gpu
Makefile:138: recipe for target ‘all’ failed
make: *** [all] Error 2

Installation on JetPack 3.1 and TX1 also fails (see my post on the TX1 forums).


Please check this comment:

It’s recommended to use the branch before Caffe/pyTorch merged to avoid this issue.

It works for me, too. But it is important to use pip2 instead of pip.

Hi, I use Jetpack 3.2.1, build caffe2 from source (tag v0.4.1), cuda9, cudnn7 on TX1.
I compiled and installed caffe2 successfully, and I run python caffe2 works well with GPU. Then I try to run caffe2 in C++ with GPU support, but c++ app runs ok, but no GPU usage. This code works well on my laptop with GPU support, I don’t know why, here is my code(, hope anyone could help me. Many thanks.


JetPack3.1 includes CUDA 8.0.
If you want to have a CUDA 9.0 environement, please upgrade your JetPack to version 3.2.1/3.3.


sorry for my mistake, modify the jetpack version to 3.2.1.

Hi, lzjcyy

Let’s tracking this issue in topic 1038140: