I try to compile the GPUCoder example within 2018a in ubuntu 16.04. But the compilation failed within matlab with following output:
>> codegen -config cfg -args {ones(227,227,3,'single'), coder.Constant('alexnet.mat')} alexnet_predict.m------------------------------------------------------------------------nvcc -ccbin /bin/aarch64-linux-gnu-g++ -rdc=true -Xcompiler -fPIC -I/include -Xcudafe "--diag_suppress=unsigned_compare_with_zero" -c -Xcompiler -MMD,-MP -O2 -arch sm_35 -DMODEL=alexnet_predict -DHAVESTDIO -DUSE_RTMODEL -DUNIX -I/home/ibmfuchs/gpucoderdemo_jetson_tx22/codegen/lib/alexnet_predict -I/home/ibmfuchs/gpucoderdemo_jetson_tx22 -I/home/ibmfuchs/Programs/Matlab/2018a/extern/include -I/home/ibmfuchs/Programs/Matlab/2018a/simulink/include -I/home/ibmfuchs/Programs/Matlab/2018a/rtw/c/src -I/home/ibmfuchs/Programs/Matlab/2018a/rtw/c/src/ext_mode/common -I/home/ibmfuchs/Programs/Matlab/2018a/rtw/c/ert -Iinclude -o cnn_api.o cnn_api.cpp/bin/sh: 1: nvcc: not foundgmake: *** [cnn_api.o] Error 127Error(s) encountered while building "alexnet_predict":### Failed to generate all binary outputs.------------------------------------------------------------------------??? Build error: C++ compiler produced errors. See the Build Log for further details.Code generation failed: View Error ReportError using codegen
calling nvcc from workspace I got:
>> system('nvcc')/bin/bash: nvcc: command not foundans = 127
But in terminal I have no problem to call nvcc:
ibmfuchs@SUbuntu:/$ nvccnvcc fatal : No input files specified; use option --help for more information
Can anyone please help? Thanks
Best Answer