How to config the parameter of the compile When the gcc and NVCC mixed-language compiling??

How to config the parameter of the compile When the gcc and NVCC mixed-language compiling??

How to add “-march=armv8-a -mcpu=cortex-a57 -O3” to gcc and NVCC mixed-language compiling??

gcc and NVCC mixed-language compiling as flowing:

/usr/local/cuda-9.0/bin/nvcc -DUSE_CUDNN -UCPU_ONLY -I/home/nvidia/project/caffe-ssd/include -I"…/src/include" -I…/src/include/libjpeg-8b -I…/src/common/algorithm/cuda -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/lib/aarch64-linux-gnu/gtk-3.0/include -I/usr/local/cuda-9.0/include -I/usr/include/pango-1.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/gtk-3.0 -I/usr/include/cairo -I/usr/include/libdrm -I/usr/include/aarch64-linux-gnu -I"…/src/argus/include" -I…/src/argus/apps/camera/modules -I…/src/argus/apps/camera/renderer -I…/src/argus/apps/camera/common -I"…/src/argus/apps/camera/ui/common" -I…/src/argus/apps/camera/ui/video -I…/src/argus/apps/camera/ui/gallery -I…/src/argus/apps/camera/ui/multiExposure -I…/src/argus/apps/camera/ui/multiSession -I…/src/argus/apps/camera/ui/capture -I…/src/argus/samples/utils -I…/src/KCFTracker -I…/src -O3 -std=c++11 --compile -m64 -ccbin aarch64-linux-gnu-g++ -x c++ -o “@" "<”

Hi,

Please add ‘-Xcompiler’ to pass the option directly to the compiler/preprocessor.
https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#options-for-passing-specific-phase-options

For example:

nvcc test.cpp <b>-Xcompiler</b> -march=armv8-a <b>-Xcompiler</b> -mcpu=cortex-a57 -O3 -o out

Thanks.