malloc error in cross compilation of jetson tx2

Hi, I am new in jetson, and need helps for basic issues below.
In the cross-compilation set up, I tried to run a sample named “boxfilter” from the host, but the following message was displayed. What should I do next? I searched solutions in google but I did not get any.

Loaded ‘./data/lenaRGB.ppm’, 1024 x 1024 pixels
Found 1 CUDA Capable device(s) supporting CUDA

Device 0: “NVIDIA Tegra X2”
CUDA Runtime Version : 9.0
CUDA Compute Capability : 6.2

Found CUDA Capable Device 0: “NVIDIA Tegra X2”
Setting active device to 0
CUDA error at …/src/boxFilter.cpp:301 code=30(cudaErrorUnknown) “cudaMalloc((void **) &d_img, (width * height * sizeof(unsigned int)))”

The settings of my environment is as follows.
Host: ubuntu 16.04
jetpack 3.3
cuda 9.0
Nsight eclipse edition version 9.0
Local:(jetson TX2)
ubuntu 16.04
cuda 9.0

Thank you for your help in advance.


Could you share which command do you use?
Please remember that target GPU architecture is required for cross-compiling:

EXTRA_LDFLAGS=--unresolved-symbols=ignore-in-shared-libs TARGET_ARCH=aarch64 <b>make</b>


I could solve this issue.
The cause of it was imcompleted install of Jetpack. In the case of completion of the install, jetson could be fine.
Thank you.