Closed mc-nv closed 10 months ago
cc: @pranavsharma , @snnn
+@yf711 who successfully built ort on jetson recently.
Hi @mc-nv quick question are you using the latest jetpack?
Hi @mc-nv quick question are you using the latest jetpack?
yes, I'm using latest JetPack version
Hi @mc-nv quick question are you using the latest jetpack?
yes, I'm using latest JetPack version
what cuda version? and i assume you're building latest ORT main branch? (which commit)
I'm building against CUDA 12 and ORT 1.15 so far
I'm building against CUDA 12 and ORT 1.15 so far
the first message is interesting "/usr/bin/ld: warning: libnvcudla.so, needed by /usr/local/cuda/lib64/libcudla.so.1, not found (try using -rpath or -rpath-link)" does libnvcudla.so exist somewhere? maybe it's finding a different cuda version? we haven't validated cuda 12 on jetson (or any version other than the default that comes with JetPack , which is 11.4.x) so that's an area we will need to try out.
I'm building against CUDA 12 and ORT 1.15 so far
the first message is interesting "/usr/bin/ld: warning: libnvcudla.so, needed by /usr/local/cuda/lib64/libcudla.so.1, not found (try using -rpath or -rpath-link)" does libnvcudla.so exist somewhere? maybe it's finding a different cuda version? we haven't validated cuda 12 on jetson (or any version other than the default that comes with JetPack , which is 11.4.x) so that's an area we will need to try out.
Missed runtime library isn't bothering me.
I'm wondering why using flag --skip_tests
continue to compile onnxruntime_test_all
and how to avoid it?
in build.py, flag --skip_tests
means "skip running the tests", but the test targets ( including onnxruntime_test_all ) still builds.
if you want to build libonnxruntime.so
only, you can try --target onnxruntime
If you want to avoid building the tests, --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF
If you want to avoid building the tests,
--cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF
Is it a good idea to include --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF
implicitly when --skip_tests
is specified?
If you want to avoid building the tests,
--cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF
Had tried this approach, but keep failing with same error, it doesn't disable target
Could you try removing these lines directly? https://github.com/microsoft/onnxruntime/blob/bb1871332f5e37ebaa6a508fed460ab836fb23c5/cmake/CMakeLists.txt#L1634-L1636
In fact, I think --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF should work. Did you clean the build or remove the cmakecache.txt before rebuilding.
If you want to avoid building the tests,
--cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF
Is it a good idea to include
--cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF
implicitly when--skip_tests
is specified?
No. For CI, it'd better to divide building and testing sometimes. For example, run building in CPU machine and run testing in CUDA machine.
Hi @mc-nv I reproduced your issue on my local jetson device, and here's what I did to fix the missing lib:
libnvcudla.so
under /usr/local/cuda-12.2/compat
: sudo apt-get install -y cuda-compat-12-2
export LD_LIBRARY_PATH="/usr/local/cuda-12.2/lib64:/usr/local/cuda-12.2/compat:$LD_LIBRARY_PATH"
More detail of cuDLA: https://docs.nvidia.com/cuda/cuda-for-tegra-appnote/index.html#cudla
I'm facing issue to compile OnnxRuntime, using Dockerfile
. During the docker build
command you can't pass driver and compile it in runtime with CUDA.
@mc-nv can you share more detail about your Dockerfile and error logs in your docker env? If you receive error logs of your docker env same as posted above, I wonder if adding necessary cuda dependencies installation and path to lib in your dockerfile before compiling ONNXRT could help your case
I'm facing issue to compile OnnxRuntime, using
Dockerfile
. During thedocker build
command you can't pass driver and compile it in runtime with CUDA.
are we still talking about Jetson here, or is this a new issue
Yes we still talking about Jetson device.
I'm trying to compile OnnxRuntime on Jetson device using Docker image.
But struggling due to the issue with the libraries presence which are required only for runtime.
Per my review it should be possible if we can disable the unit tests, but by some reason it not possible with a given instructions to wrapper.
@mc-nv could you share a dockerfile and full command that you used to repro the issue?
I have tested building ort with --skip_tests --cmake_extra_defines 'onnxruntime_BUILD_UNIT_TESTS=OFF'
in jetson jetpack native env without docker, and onnxruntime_test_all
wasn't generated
p.s Apart from cmake args above, I followed these steps to deploy my jetpack env and build ort: https://onnxruntime.ai/docs/build/eps.html#nvidia-jetson-tx1tx2nanoxavier, which was running without root privilege.
Ticket can be closed I was able to build ORT using ARM machine without tests. My mistake was is that i stick to the Mac ARM , which break my build.
Describe the issue
Trying to build OnnxRuntime on Jetson device but keep failing on compilation due to dynamic linking against CUDA runtime.
I have tried to disable that target with
--skip_tests
but it didn't worksUrgency
ASAP
Target platform
aarch64
Build script
Error / output
Visual Studio Version
No response
GCC / Compiler Version
CMake 3.27.1