Кросс-компиляция onnxruntime (x86 в aarch64) с поддержкой CUDA.Linux

Ответить Пред. темаСлед. тема
Anonymous
 Кросс-компиляция onnxruntime (x86 в aarch64) с поддержкой CUDA.

Сообщение Anonymous »

Как следует из вопроса, я пытаюсь кросс-компилировать библиотеку onnxruntime (v1.19.2) на моем хост-компьютере Ubuntu 22.04 x86_64 для целевого aarch64 (NVidia Jetson Orin Nano).
Мне удалось:
  • Скомпилировать библиотеку только с поддержкой ЦП для хоста
  • Скомпилировать библиотеку с помощью CUDA поддержка хоста.
  • Кросс-компиляция библиотеки с поддержкой только ЦП для целевого устройства.
Вот шаги, которые я выполнил. Я следил:

[*]Клонируйте репозиторий с правильным тегом

Код: Выделить всё

git clone --recursive https://github.com/microsoft/onnxruntime.git -b v1.19.2
Измените содержимое файла cmake/linux_arm64_crosscompile_toolchain.cmake, указав кросс-компиляторы aarch64-linux-gnu-gcc и aarch64. - l i n u x - g n u - g + + < / p > < b r / > < / l i > < b r / > < l i > З а г р у з и т е и у с т а н о в и т е х о с т - п а к е т C U D A T o o l k i t 1 2 . 6 < / p > < b r / > < / l i > < b r / > < / o l > < b r / > < c o d e > w g e t h t t p s : / / d e v e l o p e r . d o w n l o a d . n v i d i a . c o m / c o m p u t e / c u d a / r e p o s / u b u n t u 2 2 0 4 / x 8 6 _ 6 4 / c u d a - u b u n t u 2 2 0 4 . p i n < b r / > m v c u d a - u b u n t u 2 2 0 4 . p i n / e t c / a p t / p r e f e r e n c e s . d / c u d a - r e p o s i t o r y - p i n - 6 0 0 < b r / > w g e t h t t p s : / / d e v e l o p e r . d o w n l o a d . n v i d i a . c o m / c o m p u t e / c u d a / 1 2 . 6 . 2 / l o c a l _ i n s t a l l e r s / c u d a - r e p o - u b u n t u 2 2 0 4 - 1 2 - 6 - l o c a l _ 1 2 . 6 . 2 - 5 6 0 . 3 5 . 0 3 - 1 _ a m d 6 4 . d e b < b r / > s u d o d p k g - i c u d a - r e p o - u b u n t u 2 2 0 4 - 1 2 - 6 - l o c a l _ 1 2 . 6 . 2 - 5 6 0 . 3 5 . 0 3 - 1 _ a m d 6 4 . d e b < b r / > s u d o c p / v a r / c u d a - r e p o - u b u n t u 2 2 0 4 - 1 2 - 6 - l o c a l / c u d a - * - k e y r i n g . g p g / u s r / s h a r e / k e y r i n g s / < b r / > s u d o a p t - g e t u p d a t e < b r / > s u d o a p t - g e t - y i n s t a l l c u d a - t o o l k i t - 1 2 - 6 < b r / > < / c o d e > < b r / > < o l s t a r t = " 4 " > < b r / > < l i > З а г р у з и т е и у с т а н о в и т е C U D N N T o o l k i t 9 . 5 . 1 < / l i > < b r / > < / o l > < b r / > < c o d e > w g e t h t t p s : / / d e v e l o p e r . d o w n l o a d . n v i d i a . c o m / c o m p u t e / c u d n n / 9 . 5 . 1 / l o c a l _ i n s t a l l e r s / c u d n n - l o c a l - r e p o - u b u n t u 2 2 0 4 - 9 . 5 . 1 _ 1 . 0 - 1 _ a m d 6 4 . d e b < b r / > s u d o d p k g - i c u d n n - l o c a l - r e p o - u b u n t u 2 2 0 4 - 9 . 5 . 1 _ 1 . 0 - 1 _ a m d 6 4 . d e b < b r / > s u d o c p / v a r / c u d n n - l o c a l - r e p o - u b u n t u 2 2 0 4 - 9 . 5 . 1 / c u d n n - * - k e y r i n g . g p g / u s r / s h a r e / k e y r i n g s / < b r / > s u d o a p t - g e t u p d a t e < b r / > s u d o a p t - g e t - y i n s t a l l c u d n n < b r / > < / c o d e > < b r / > < o l s t a r t = " 5 " > < b r / > < l i > З а г р у з и т е и у с т а н о в и т е C U D A T o o l k i t 1 2 . 6 д л я к р о с с - к о м п и л я ц и и x 8 6 в a a r c h 6 4 < / l i > < b r / > < / o l > < c o d e > w g e t h t t p s : / / d e v e l o p e r . d o w n l o a d . n v i d i a . c o m / c o m p u t e / c u d a / 1 2 . 6 . 2 / l o c a l _ i n s t a l l e r s / c u d a - r e p o - c r o s s - a a r c h 6 4 - u b u n t u 2 2 0 4 - 1 2 - 6 - l o c a l _ 1 2 . 6 . 2 - 1 _ a l l . d e b < b r / > s u d o d p k g - i c u d a - r e p o - c r o s s - a a r c h 6 4 - u b u n t u 2 2 0 4 - 1 2 - 6 - l o c a l _ 1 2 . 6 . 2 - 1 _ a l l . d e b < b r / > s u d o c p / v a r / c u d a - r e p o - c r o s s - a a r c h 6 4 - u b u n t u 2 2 0 4 - 1 2 - 6 - l o c a l / c u d a - * - k e y r i n g . g p g / u s r / s h a r e / k e y r i n g s / < b r / > s u d o a p t - g e t u p d a t e < b r / > s u d o a p t - g e t - y i n s t a l l c u d a - c r o s s - a a r c h 6 4 < b r / > < / c o d e > < b r / > < o l s t a r t = " 6 " > < b r / > < l i > З а г р у з и т е и у с т а н о в и т е C U D N N T o o l k i t 9 . 5 . 1 д л я к р о с с - к о м п и л я ц и и x 8 6 в a a r c h 6 4 < / l i > < b r / > < / o l > < b r / > < c o d e > w g e t h t t p s : / / d e v e l o p e r . d o w n l o a d . n v i d i a . c o m / c o m p u t e / c u d n n / 9 . 5 . 1 / l o c a l _ i n s t a l l e r s / c u d n n - l o c a l - r e p o - c r o s s - a a r c h 6 4 - u b u n t u 2 2 0 4 - 9 . 5 . 1 _ 1 . 0 - 1 _ a l l . d e b < b r / > s u d o d p k g - i c u d n n - l o c a l - r e p o - c r o s s - a a r c h 6 4 - u b u n t u 2 2 0 4 - 9 . 5 . 1 _ 1 . 0 - 1 _ a l l . d e b < b r / > s u d o c p / v a r / c u d n n - l o c a l - r e p o - c r o s s - a a r c h 6 4 - u b u n t u 2 2 0 4 - 9 . 5 . 1 / c u d n n - * - k e y r i n g . g p g / u s r / s h a r e / k e y r i n g s / < b r / > s u d o a p t - g e t u p d a t e < b r / > s u d o a p t - g e t - y i n s t a l l c u d n n - c r o s s - a a r c h 6 4 < b r / > < / c o d e > < b r / > < o l s t a r t = " 7 " > < b r / > < l i > Н а ч а т ь с б о р к у < / l i > < b r / > < / o l > < b r / > < c o d e > e x p o r t C U D A _ H O M E = / u s r / l o c a l / c u d a < b r / > e x p o r t C U D N N _ H O M E = / u s r / l o c a l / c u d a < b r / > < b r / > . / b u i l d . s h - - b u i l d _ d i r a a r c h 6 4 - b u i l d - g p u / - - c o n f i g R e l e a s e - - u p d a t e - - b u i l d - - p a r a l l e l - - b u i l d _ s h a r e d _ l i b - - s k i p _ t e s t s - - c m a k e _ e x t r a _ d e f i n e s C M A K E _ T O O L C H A I N _ F I L E = / r o o t / o n n x r u n t i m e / c m a k e / l i n u x _ a r m 6 4 _ c r o s s c o m p i l e _ t o o l c h a i n . c m a k e C M A K E _ I N S T A L L _ P R E F I X = / r o o t / o n n x r u n t i m e / a a r c h 6 4 - i n s t a l l - g p u / - - u s e _ c u d a - - a l l o w _ r u n n i n g _ a s _ r o o t < b r / > < / c o d e > < b r / > В о т ч а с т и ч н ы й ж у р н а л с б о р к и < / p > < b r / > < c o d e > [ 2 % ] B u i l d i n g C X X o b j e c t C M a k e F i l e s / o n n x r u n t i m e _ m l a s . d i r / r o o t / o n n x r u n t i m e / o n n x r u n t i m e / c o r e / m l a s / l i b / h a l f g e m m . c p p . o < b r / > [ 2 % ] B u i l d i n g C X X o b j e c t _ d e p s / p r o t o b u f - b u i l d / C M a k e F i l e s / l i b p r o t o b u f - l i t e . d i r / s r c / g o o g l e / p r o t o b u f / r e p e a t e d _ f i e l d . c c . o < b r / > [ 2 % ] G e n e r a t i n g c p p / p l a t f o rm/posix/src/per_thread_waiter.c
[ 2%] Generating cpp/internal/common.c
[ 2%] Generating cpp/internal/counter.c
[ 2%] Generating cpp/internal/cv.c
[ 3%] Generating cpp/internal/debug.c
[ 3%] Generating cpp/internal/dll.c
[ 3%] Generating cpp/internal/mu.c
[ 3%] Generating cpp/internal/mu_wait.c
[ 3%] Generating cpp/internal/note.c
[ 3%] Generating cpp/internal/once.c
[ 3%] Generating cpp/internal/sem_wait.c
[ 3%] Generating cpp/internal/time_internal.c
[ 3%] Generating cpp/internal/wait.c
[ 3%] Generating cpp/platform/c++11/src/nsync_panic.cc
[ 3%] Generating cpp/platform/c++11/src/time_rep_timespec.cc
[ 3%] Generating cpp/platform/c++11/src/yield.cc
[ 3%] Generating cpp/platform/linux/src/nsync_semaphore_futex.c
[ 3%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/internal/common.c.o
[ 3%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/internal/counter.c.o
[ 3%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/qgemm.cpp.o
[ 3%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/internal/cv.c.o
[ 3%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/internal/debug.c.o
[ 3%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/internal/dll.c.o
[ 3%] Building CXX object _deps/protobuf-build/CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/repeated_ptr_field.cc.o
[ 3%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/internal/mu.c.o
[ 4%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/internal/mu_wait.c.o
[ 4%] Building CXX object CMakeFiles/onnxruntime_providers_shared.dir/root/onnxruntime/onnxruntime/core/providers/shared/common.cc.o
[ 4%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/qdwconv.cpp.o
[ 4%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/internal/note.c.o
[ 4%] Linking CXX shared library libonnxruntime_providers_shared.so
[ 4%] Built target onnxruntime_providers_shared
[ 4%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/src/idl_gen_java.cpp.o
[ 4%] Building CXX object _deps/protobuf-build/CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/bytestream.cc.o
[ 4%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/internal/once.c.o
[ 4%] Building CXX object _deps/protobuf-build/CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/common.cc.o
[ 4%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/internal/sem_wait.c.o
[ 4%] Linking CXX static library libflatbuffers.a
[ 4%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/convolve.cpp.o
[ 4%] Built target flatbuffers
[ 4%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/internal/time_internal.c.o
[ 4%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/convsym.cpp.o
[ 4%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/internal/wait.c.o
[ 4%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/platform/linux/src/nsync_semaphore_futex.c.o
[ 4%] Building CXX object _deps/protobuf-build/CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/int128.cc.o
[ 4%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/src/idl_gen_ts.cpp.o
[ 4%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/platform/posix/src/per_thread_waiter.c.o
[ 4%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/platform/c++11/src/yield.cc.o
[ 4%] Building CXX object _deps/protobuf-build/CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/status.cc.o
[ 4%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/platform/c++11/src/time_rep_timespec.cc.o
[ 4%] Building CXX object _deps/protobuf-build/CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/statusor.cc.o
[ 4%] Building CXX object _deps/google_nsync-build/CMakeFiles/nsync_cpp.dir/cpp/platform/c++11/src/nsync_panic.cc.o
[ 4%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/pooling.cpp.o
[ 4%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/transpose.cpp.o
[ 4%] Building CXX object _deps/protobuf-build/CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/stringpiece.cc.o
[ 4%] Linking CXX static library libnsync_cpp.a
[ 4%] Built target nsync_cpp
[ 4%] Generating onnxruntime.lds, generated_source.c
Generating symbol file for ['cpu', 'cuda']
VERSION:1.19.2
[ 4%] Built target onnxruntime_generate_def
[ 4%] Building CXX object _deps/protobuf-build/CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/stringprintf.cc.o
[ 4%] Building C object _deps/pytorch_clog-build/CMakeFiles/clog.dir/src/clog.c.o
[ 4%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/reorder.cpp.o
/root/onnxruntime/aarch64-build-gpu/Release/_deps/pytorch_clog-src/deps/clog/src/clog.c: In function ‘clog_vlog_fatal’:
/root/onnxruntime/aarch64-build-gpu/Release/_deps/pytorch_clog-src/deps/clog/src/clog.c:117:25: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
117 | write(STDERR_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/onnxruntime/aarch64-build-gpu/Release/_deps/pytorch_clog-src/deps/clog/src/clog.c: In function ‘clog_vlog_error’:
/root/onnxruntime/aarch64-build-gpu/Release/_deps/pytorch_clog-src/deps/clog/src/clog.c:195:25: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
195 | write(STDERR_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/onnxruntime/aarch64-build-gpu/Release/_deps/pytorch_clog-src/deps/clog/src/clog.c: In function ‘clog_vlog_warning’:
/root/onnxruntime/aarch64-build-gpu/Release/_deps/pytorch_clog-src/deps/clog/src/clog.c:273:25: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
273 | write(STDERR_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/onnxruntime/aarch64-build-gpu/Release/_deps/pytorch_clog-src/deps/clog/src/clog.c: In function ‘clog_vlog_info’:
/root/onnxruntime/aarch64-build-gpu/Release/_deps/pytorch_clog-src/deps/clog/src/clog.c:351:25: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
351 | write(STDOUT_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/onnxruntime/aarch64-build-gpu/Release/_deps/pytorch_clog-src/deps/clog/src/clog.c: In function ‘clog_vlog_debug’:
/root/onnxruntime/aarch64-build-gpu/Release/_deps/pytorch_clog-src/deps/clog/src/clog.c:429:25: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
429 | write(STDOUT_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 4%] Linking C static library libclog.a
[ 4%] Built target clog
[ 4%] Building CXX object CMakeFiles/onnxruntime_mocked_allocator.dir/root/onnxruntime/onnxruntime/test/util/test_allocator.cc.o
[ 4%] Building CUDA object CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o
[ 4%] Building CXX object _deps/protobuf-build/CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/structurally_valid.cc.o
[ 4%] Building CXX object _deps/protobuf-build/CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/strutil.cc.o
[ 4%] Building CXX object CMakeFiles/custom_op_invalid_library.dir/root/onnxruntime/onnxruntime/test/testdata/custom_op_invalid_library/custom_op_library.cc.o
[ 4%] Linking CXX shared module libcustom_op_invalid_library.so
[ 4%] Built target custom_op_invalid_library
[ 4%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/src/idl_gen_php.cpp.o
[ 5%] Building CXX object CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/testdata/custom_op_library/cpu/cpu_ops.cc.o
[ 5%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/snchwc.cpp.o
[ 5%] Linking CXX static library libonnxruntime_mocked_allocator.a
[ 5%] Built target onnxruntime_mocked_allocator
[ 5%] Building CXX object _deps/protobuf-build/CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/stubs/time.cc.o
[ 5%] Building CXX object CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/testdata/custom_op_library/cuda/cuda_ops.cc.o
[ 5%] Building CXX object _deps/protobuf-build/CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/wire_format_lite.cc.o
[ 5%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/activate.cpp.o
[ 5%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/logistic.cpp.o
[ 5%] Linking CXX static library libprotobuf-lite.a
[ 5%] Built target libprotobuf-lite
[ 5%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/src/idl_gen_python.cpp.o
[ 5%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/src/idl_gen_lobster.cpp.o
[ 5%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/tanh.cpp.o
[ 5%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/erf.cpp.o
[ 5%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/compute.cpp.o
[ 5%] Building CXX object CMakeFiles/custom_op_get_const_input_test_library.dir/root/onnxruntime/onnxruntime/test/testdata/custom_op_get_const_input_test_library/custom_op.cc.o
[ 5%] Building CXX object CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/testdata/custom_op_library/custom_op_library.cc.o
[ 6%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/quantize.cpp.o
[ 6%] Building CXX object CMakeFiles/custom_op_get_const_input_test_library.dir/root/onnxruntime/onnxruntime/test/testdata/custom_op_get_const_input_test_library/custom_op_lib.cc.o
[ 6%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/qgemm_kernel_default.cpp.o
[ 6%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/src/idl_gen_rust.cpp.o
[ 6%] Building CXX object CMakeFiles/custom_op_local_function.dir/root/onnxruntime/onnxruntime/test/testdata/custom_op_local_function/custom_op_local_function.cc.o
[ 6%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/src/idl_gen_fbs.cpp.o
[ 6%] Building CXX object CMakeFiles/custom_op_local_function.dir/root/onnxruntime/onnxruntime/test/testdata/custom_op_local_function/dummy_gemm.cc.o
[ 6%] Linking CXX shared module libcustom_op_get_const_input_test_library.so
[ 6%] Linking CXX shared library libcustom_op_library.so
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o: Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o: Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o: Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o: Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o: Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o: Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o: Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o: Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o: Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o: Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o: Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o: Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o: Relocations in generic ELF (EM: 62)
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/custom_op_library.dir/root/onnxruntime/onnxruntime/test/shared_lib/cuda_ops.cu.o: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/custom_op_library.dir/build.make:149: libcustom_op_library.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:3693: CMakeFiles/custom_op_library.dir/all] Error 2
gmake[1]: * * * W a i t i n g f o r u n f i n i s h e d j o b s . . . . < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t C M a k e F i l e s / o n n x r u n t i m e _ m l a s . d i r / r o o t / o n n x r u n t i m e / o n n x r u n t i m e / c o r e / m l a s / l i b / q l a d d . c p p . o < b r / > [ 6 % ] B u i l t t a r g e t c u s t o m _ o p _ g e t _ c o n s t _ i n p u t _ t e s t _ l i b r a r y < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t _ d e p s / f l a t b u f f e r s - b u i l d / C M a k e F i l e s / f l a t c . d i r / s r c / i d l _ g e n _ g r p c . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t _ d e p s / f l a t b u f f e r s - b u i l d / C M a k e F i l e s / f l a t c . d i r / s r c / i d l _ g e n _ j s o n _ s c h e m a . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t C M a k e F i l e s / o n n x r u n t i m e _ m l a s . d i r / r o o t / o n n x r u n t i m e / o n n x r u n t i m e / c o r e / m l a s / l i b / q l m u l . c p p . o < b r / > [ 6 % ] L i n k i n g C X X s h a r e d m o d u l e l i b c u s t o m _ o p _ l o c a l _ f u n c t i o n . s o < b r / > [ 6 % ] B u i l t t a r g e t c u s t o m _ o p _ l o c a l _ f u n c t i o n < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t C M a k e F i l e s / o n n x r u n t i m e _ m l a s . d i r / r o o t / o n n x r u n t i m e / o n n x r u n t i m e / c o r e / m l a s / l i b / q p o s t p r o c e s s o r . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t _ d e p s / f l a t b u f f e r s - b u i l d / C M a k e F i l e s / f l a t c . d i r / s r c / i d l _ g e n _ s w i f t . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t _ d e p s / f l a t b u f f e r s - b u i l d / C M a k e F i l e s / f l a t c . d i r / s r c / f i l e _ n a m e _ s a v i n g _ f i l e _ m a n a g e r . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t C M a k e F i l e s / o n n x r u n t i m e _ m l a s . d i r / r o o t / o n n x r u n t i m e / o n n x r u n t i m e / c o r e / m l a s / l i b / q l g a v g p o o l . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t C M a k e F i l e s / o n n x r u n t i m e _ m l a s . d i r / r o o t / o n n x r u n t i m e / o n n x r u n t i m e / c o r e / m l a s / l i b / q d w c o n v _ k e r n e l s i z e . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t C M a k e F i l e s / o n n x r u n t i m e _ m l a s . d i r / r o o t / o n n x r u n t i m e / o n n x r u n t i m e / c o r e / m l a s / l i b / s q n b i t g e m m . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t C M a k e F i l e s / o n n x r u n t i m e _ m l a s . d i r / r o o t / o n n x r u n t i m e / o n n x r u n t i m e / c o r e / m l a s / l i b / f l a s h a t t n . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t C M a k e F i l e s / o n n x r u n t i m e _ m l a s . d i r / r o o t / o n n x r u n t i m e / o n n x r u n t i m e / c o r e / m l a s / l i b / q 4 _ d q . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t C M a k e F i l e s / o n n x r u n t i m e _ m l a s . d i r / r o o t / o n n x r u n t i m e / o n n x r u n t i m e / c o r e / m l a s / l i b / q 4 g e m m . c p p . o < b r / > [ 6 % ] B u i l d i n g A S M o b j e c t C M a k e F i l e s / o n n x r u n t i m e _ m l a s . d i r / r o o t / o n n x r u n t i m e / o n n x r u n t i m e / c o r e / m l a s / l i b / a a r c h 6 4 / C o n v S y m S 8 K e r n e l D o t . S . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t _ d e p s / f l a t b u f f e r s - b u i l d / C M a k e F i l e s / f l a t c . d i r / s r c / f i l e _ b i n a r y _ w r i t e r . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t _ d e p s / f l a t b u f f e r s - b u i l d / C M a k e F i l e s / f l a t c . d i r / s r c / f i l e _ w r i t e r . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t _ d e p s / f l a t b u f f e r s - b u i l d / C M a k e F i l e s / f l a t c . d i r / s r c / f l a t c . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t _ d e p s / f l a t b u f f e r s - b u i l d / C M a k e F i l e s / f l a t c . d i r / s r c / f l a t c _ m a i n . c p p . o < b r / > [ 6 % ] B u i l d i n g A S M o b j e c t C M a k e F i l e s / o n n x r u n t i m e _ m l a s . d i r / r o o t / o n n x r u n t i m e / o n n x r u n t i m e / c o r e / m l a s / l i b / a a r c h 6 4 / C o n v S y m S 8 K e r n e l D o t L d 6 4 . S . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t _ d e p s / f l a t b u f f e r s - b u i l d / C M a k e F i l e s / f l a t c . d i r / s r c / b i n a r y _ a n n o t a t o r . c p p . o < b r / > [ 6 % ] B u i l d i n g A S M o b j e c t C M a k e F i l e s / o n n x r u n t i m e _ m l a s . d i r / r o o t / o n n x r u n t i m e / o n n x r u n t i m e / c o r e / m l a s / l i b / a a r c h 6 4 / C o n v S y m U 8 K e r n e l D o t . S . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t _ d e p s / f l a t b u f f e r s - b u i l d / C M a k e F i l e s / f l a t c . d i r / s r c / a n n o t a t e d _ b i n a r y _ t e x t _ g e n . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t _ d e p s / f l a t b u f f e r s - b u i l d / C M a k e F i l e s / f l a t c . d i r / s r c / b f b s _ g e n _ l u a . c p p . o < b r / > [ 6 % ] B u i l d i n g C X X o b j e c t _ d e p s / f l a t b u f f e r s - b u i l d / C M a k e F i l e s / f l a t c . d i r / s r c / b f b s _ g e n _ n i m . c p p . o < b r / > [ 6 % ] B u i l d i n g A S M o b j e c t C M a k e F i l e s / o n n x r u n t i m e _ m l a s . d i r / r o o t / o n n x r u n t i m e / o n n x r u n t i m e / c o r e / m l a s / l i b / a a r c h 6 4 / C o n v S y m S 8 K e r n e l N e o n . S . o < b r / > [ 7 % ] B u i l d i n g C X X o b j e c t _ d e p s / f l a t b u f f e r s - b u i l d / C M a k e F i l e s / f l a t c . d i r / s r c / c ode_generators.cpp.o
[ 7%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/grpc/src/compiler/cpp_generator.cc.o
[ 7%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/grpc/src/compiler/go_generator.cc.o
[ 7%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/ConvSymU8KernelNeon.S.o
[ 7%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/DepthwiseQConvSymS8KernelNeon.S.o
[ 7%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/DepthwiseQConvSymU8KernelNeon.S.o
[ 7%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/DepthwiseQConvKernelSize9Neon.S.o
[ 7%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/QgemmU8X8KernelNeon.S.o
[ 8%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/QgemmS8S8KernelNeon.S.o
[ 8%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/QgemmU8X8KernelUdot.S.o
[ 8%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/QgemmS8S8KernelSdot.S.o
[ 8%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/SgemmKernelNeon.S.o
[ 8%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/SgemvKernelNeon.S.o
[ 8%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/SymQgemmS8KernelNeon.S.o
[ 8%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/SymQgemmS8KernelSdot.S.o
[ 8%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/SymQgemmS8KernelSdotLd64.S.o
[ 8%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/qgemm_kernel_neon.cpp.o
[ 8%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/qgemm_kernel_udot.cpp.o
[ 8%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/qgemm_kernel_sdot.cpp.o
[ 8%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_neon.cpp.o
[ 8%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_neon_fp32.cpp.o
[ 8%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/grpc/src/compiler/java_generator.cc.o
[ 8%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/grpc/src/compiler/python_generator.cc.o
[ 8%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/grpc/src/compiler/swift_generator.cc.o
[ 8%] Building CXX object _deps/flatbuffers-build/CMakeFiles/flatc.dir/grpc/src/compiler/ts_generator.cc.o
[ 8%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_neon_int8.cpp.o
[ 8%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/HalfGemmKernelNeon.S.o
[ 8%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/QgemmS8S8KernelSmmla.S.o
[ 8%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/QgemmU8X8KernelUmmla.S.o
[ 8%] Building ASM object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/aarch64/SbgemmKernelNeon.S.o
[ 8%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/activate_fp16.cpp.o
[ 8%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/dwconv.cpp.o
[ 9%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/halfgemm_kernel_neon.cpp.o
[ 9%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/pooling_fp16.cpp.o
[ 9%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/qgemm_kernel_smmla.cpp.o
[ 9%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/qgemm_kernel_ummla.cpp.o
[ 9%] Building CXX object CMakeFiles/onnxruntime_mlas.dir/root/onnxruntime/onnxruntime/core/mlas/lib/sbgemm_kernel_neon.cpp.o
[ 9%] Linking CXX executable flatc
[ 9%] Built target flatc
[ 9%] Linking CXX static library libonnxruntime_mlas.a
[ 9%] Built target onnxruntime_mlas
gmake: *** [Makefile:146: all] Error 2
Traceback (most recent call last):
File "/root/onnxruntime/tools/ci_build/build.py", line 2971, in
sys.exit(main())
File "/root/onnxruntime/tools/ci_build/build.py", line 2861, in main
build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)
File "/root/onnxruntime/tools/ci_build/build.py", line 1729, in build_targets
run_subprocess(cmd_args, env=env)
File "/root/onnxruntime/tools/ci_build/build.py", line 860, in run_subprocess
return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
File "/root/onnxruntime/tools/python/util/run.py", line 49, in run
completed_process = subprocess.run(
File "/usr/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/root/Downloads/cmake-3.31.0-linux-x86_64/bin/cmake', '--build', 'aarch64-build-gpu/Release', '--config', 'Release', '--', '-j8']' returned non-zero exit status 2.


Я также попробовал несколько дополнительных шагов с https://github.com/microsoft/onnxruntime/issues/1777

Код: Выделить всё

sudo cp /usr/include/cudnn.h /usr/local/cuda/include/
sudo cp /usr/lib/aarch64-linux-gnu/libcudnn* /usr/local/cuda/lib64/
но это не работает по той же причине.
У вас есть какие-либо предложения?

Подробнее здесь: https://stackoverflow.com/questions/792 ... da-support
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение
  • Кросс-компиляция Qt 6.8.0 Windows x86 -> Linux aarch64: не удается найти crt1.o
    Anonymous » » в форуме Linux
    0 Ответы
    36 Просмотры
    Последнее сообщение Anonymous
  • Кросс-компиляция для AArch64 с использованием Clang, собранного из исходного кода.
    Anonymous » » в форуме C++
    0 Ответы
    26 Просмотры
    Последнее сообщение Anonymous
  • Кросс-компиляция для AArch64 и OpenCL в Linux
    Anonymous » » в форуме Android
    0 Ответы
    21 Просмотры
    Последнее сообщение Anonymous
  • Кросс-компиляция для цели x86-64 freebsd в действиях github?
    Anonymous » » в форуме C++
    0 Ответы
    9 Просмотры
    Последнее сообщение Anonymous
  • Есть ли способ запустить библиотеку .so (составленную NDK для Android aarch64) в Linux aarch64 (cent7 Arm)?
    Anonymous » » в форуме Linux
    0 Ответы
    50 Просмотры
    Последнее сообщение Anonymous

Вернуться в «Linux»