Caffe installation on Xavier

how do you apply the patch?

  1. create a file in caffe folder named patch with the content provided in the step 5.
  2. executed
~/caffe$ patch <patch 
patching file Makefile
Hunk #1 succeeded at 178 with fuzz 1.
patching file Makefile.config.example
Hunk #3 FAILED at 36.
1 out of 4 hunks FAILED -- saving rejects to file Makefile.config.example.rej

On the other hand, I can manually adjust the values

Hi,
I have a error,when make -j8,and I install jetpack 4.1.1.

/usr/bin/ld: cannot find -lopenblas
collect2: error: ld returned 1 exit status
Makefile:566: recipe for target ‘.build_release/lib/libcaffe.so.1.0.0-rc3’ failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1

how can I sove it?

BLAS: install ATLAS by

sudo apt-get install libatlas-base-dev

or install OpenBLAS by

sudo apt-get install libopenblas-dev

Source:Caffe | Installation: Ubuntu

thanks for help.
I already sudo apt-get install libopenblas-dev,but the same error has opened.
so finally i chosed the ATLAS,then the error is closed.
thank you!

Hello, I have been following the installation instructions from this topic but I’m getting this error for many of the header files:

fatal error: cublas_v2.h: No such file or directory

Most similar issues I’ve found suggest checking if cuda/nvcc is intalled. Which it is:

user@Xavier:~/caffe$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sun_Sep_30_21:09:22_CDT_2018
Cuda compilation tools, release 10.0, V10.0.166

I’ve also run export commands to try to resolve the issue

user@Xavier:~/caffe$ sudo locate cublas_v2.h
/usr/local/cuda-10.0/targets/aarch64-linux/include/cublas_v2.h
user@Xavier:~/caffe$ export CPLUS_INCLUDE_PATH=/usr/local/cuda-10.0/targets/aarch64-linux/include/cublas_v2.h:$CPLUS_INCLUDE_PATH

However, the issue persists. Any help is appreciated. Thanks!

EDIT: terminal output txt removed

EDIT2: SOLVED: I realized I was running the export with the full path to cublas instead of the cuda path

export CPLUS_INCLUDE_PATH=/usr/local/cuda-10.0/targets/aarch64-linux/include:$CPLUS_INCLUDE_PATH

However, I’m still getting this warning:

cc1plus: warning: /usr/local/cuda-10.0/targets/aarch64-linux/include/cublas_v2.h: not a directory

but it seems to be building

ignore this comment

Hello,
I am trying to install caffe for jetson Xavier. I have followed installation steps as mentioned above from step 1-4 after that I am not sure how and where do I need to execute step 5: Apply changes. Can someone please help me.

Thanks

Hello,
I am trying to install caffe for jetson Xavier. I have followed installation steps as mentioned above from step 1-4 after that I am not sure how and where do I need to execute step 5: Apply changes. Can someone please help me.

Thanks

It’s git apply changes step

save the code portion in some say txt file
Then in then

cd caffe
git apply changes.txt

Hi, I’ve recently started installing CAFFE, and in the most recent version of jetpack (4.2.2) you need to update cmake to compile caffe properly. Doing so is easy.

Simply execute

sudo apt-get remove cmake

then head over to Download | CMake and get the linux sources, and follow the instructions in the readme.

to verify you’ve installed it properly run “cmake --version” and it should be greater than 3.14 if you’ve installed it properly.

hi,

i am having the following error :

examples/cpp_classification/classification.cpp:3:10: fatal error: opencv2/core/core.hpp: No such file or directory
 #include <opencv2/core/core.hpp>

openCV version : 4.0.0

i have tried specifying opencv version in the makefile.config line 23 but was not successful.

I don’t understand step 5. Apply Changes. How do I apply this code? I skipped step five and received these errors on my Xavier:

$ make -j8
PROTOC src/caffe/proto/caffe.proto
NVCC src/caffe/solvers/rmsprop_solver.cu
NVCC src/caffe/solvers/sgd_solver.cu
NVCC src/caffe/solvers/nesterov_solver.cu
nvcc fatal : Unsupported gpu architecture ‘compute_20’
NVCC src/caffe/solvers/adadelta_solver.cu
nvcc fatal : Unsupported gpu architecture ‘compute_20’
nvcc fatal : Unsupported gpu architecture ‘compute_20’
Makefile:604: recipe for target ‘.build_release/cuda/src/caffe/solvers/rmsprop_solver.o’ failed
make: *** [.build_release/cuda/src/caffe/solvers/rmsprop_solver.o] Error 1
make: *** Waiting for unfinished jobs…
Makefile:604: recipe for target ‘.build_release/cuda/src/caffe/solvers/nesterov_solver.o’ failed
make: *** [.build_release/cuda/src/caffe/solvers/nesterov_solver.o] Error 1
Makefile:604: recipe for target ‘.build_release/cuda/src/caffe/solvers/sgd_solver.o’ failed
make: *** [.build_release/cuda/src/caffe/solvers/sgd_solver.o] Error 1
NVCC src/caffe/solvers/adagrad_solver.cu
NVCC src/caffe/util/im2col.cu
NVCC src/caffe/solvers/adam_solver.cu
nvcc fatal : Unsupported gpu architecture ‘compute_20’
nvcc fatal : Unsupported gpu architecture ‘compute_20’
Makefile:604: recipe for target ‘.build_release/cuda/src/caffe/solvers/adagrad_solver.o’ failed
make: *** [.build_release/cuda/src/caffe/solvers/adagrad_solver.o] Error 1
nvcc fatal : Unsupported gpu architecture ‘compute_20’
Makefile:604: recipe for target ‘.build_release/cuda/src/caffe/solvers/adadelta_solver.o’ failed
make: *** [.build_release/cuda/src/caffe/solvers/adadelta_solver.o] Error 1
Makefile:604: recipe for target ‘.build_release/cuda/src/caffe/util/im2col.o’ failed
make: *** [.build_release/cuda/src/caffe/util/im2col.o] Error 1
nvcc fatal : Unsupported gpu architecture ‘compute_20’
Makefile:604: recipe for target ‘.build_release/cuda/src/caffe/solvers/adam_solver.o’ failed

Thank you for any help

[Update: I commented out the 20 & 21 sections in CPU_ARCH and followed the instructions in this post (https://github.com/BVLC/caffe/issues/2347) and the make -j8 seems to be progressing…]