Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving ROCm execution provider not supported in this build #1130

Open
r4ghu opened this issue Dec 9, 2024 · 6 comments
Open

Receiving ROCm execution provider not supported in this build #1130

r4ghu opened this issue Dec 9, 2024 · 6 comments

Comments

@r4ghu
Copy link

r4ghu commented Dec 9, 2024

Describe the bug
Hi team,
I am currently building OnnxRuntime-GenAI from source for AMD GPUs. With some tweaks to the main branch, I was able to successfully build the wheel and install the python package. I was able to use the Model builder to convert LLMs to ROCm supported models. But when I try to run the inference, I am seeing the following error -

onnxruntime_genai.onnxruntime_genai.OrtException: ROCm execution provider is not enabled in this build.

I am sure there is no issue with onnxruntime dependency because I received the following supported EPs from it -

/workspace# python -c "import onnxruntime as ort; print(ort.get_available_providers())"
['MIGraphXExecutionProvider', 'ROCMExecutionProvider', 'CPUExecutionProvider']

Please suggest how I can solve this problem.

To Reproduce
Steps to reproduce the behavior:

  1. Build and Install OnnxRuntime-Genai from source on a machine with AMD GPU.

Expected behavior
I expect no errors and LLMs should output same as they do in Nvidia GPUs.

Desktop (please complete the following information):

  • OS: RunPod - Ubuntu 22.04 - ROCm 6.1
@skyline75489
Copy link
Contributor

Hi! The ROCm support is currently very experimental. You can try pass --use_rocm with build.py but I still cannot guarantee it'll work as expected.

@Looong01
Copy link

Hi! The ROCm support is currently very experimental. You can try pass --use_rocm with build.py but I still cannot guarantee it'll work as expected.

No, when I build with --use_rocm, the build script only build cpu codes.

[  2%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/noexcep_operators.dir/base/base64.cc.o
[  2%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jaricom.c.o
[  2%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jcapimin.c.o
[  6%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/noexcep_operators.dir/base/string_tensor.cc.o
[  6%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/arm/filter_neon_intrinsics.c.o
[  3%] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[  3%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/noexcep_operators.dir/base/ocos.cc.o
[  4%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jcapistd.c.o
[  5%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/arm/arm_init.c.o
[  7%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/arm/palette_neon_intrinsics.c.o
[  8%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/noexcep_operators.dir/base/string_utils.cc.o
[  8%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/png.c.o
[  8%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jcarith.c.o
[  9%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/pngerror.c.o
[  9%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/noexcep_operators.dir/operators/audio/audio.cc.o
[ 10%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jccoefct.c.o
[ 11%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/noexcep_operators.dir/operators/audio/audio_decoder.cc.o
[ 11%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jccolor.c.o
[ 12%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jcdctmgr.c.o
[ 13%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/pngmem.c.o
[ 13%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/pngget.c.o
[ 13%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/pngpread.c.o
[ 14%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/pngread.c.o
[ 14%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jchuff.c.o
[ 14%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/pngrio.c.o
[ 15%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jcinit.c.o
[ 16%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdarith.c.o
[ 16%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jcmaster.c.o
[ 16%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jcmainct.c.o
[ 17%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jcomapi.c.o
[ 19%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdapimin.c.o
[ 19%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jcmarker.c.o
[ 17%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jcparam.c.o
[ 19%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdatadst.c.o
[ 19%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jcsample.c.o
[ 20%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jcprepct.c.o
[ 20%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdapistd.c.o
[ 21%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/pngrtran.c.o
[ 21%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/pngrutil.c.o
[ 22%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/pngset.c.o
[ 22%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/pngtrans.c.o
[ 23%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/pngwio.c.o
[ 24%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/pngwtran.c.o
[ 24%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/pngwrite.c.o
[ 25%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/adler32.c.o
[ 25%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/libpng/pngwutil.c.o
[ 25%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/compress.c.o
[ 26%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdatasrc.c.o
[ 26%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdcoefct.c.o
[ 27%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/crc32.c.o
[ 28%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdcolor.c.o
[ 28%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/deflate.c.o
[ 29%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/gzclose.c.o
[ 29%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jddctmgr.c.o
[ 29%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/gzlib.c.o
[ 30%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdhuff.c.o
[ 31%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/gzread.c.o
[ 31%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdinput.c.o
[ 32%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdmainct.c.o
[ 32%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdmarker.c.o
[ 34%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdmaster.c.o
[ 34%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/gzwrite.c.o
[ 36%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/inflate.c.o
[ 35%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/infback.c.o
[ 35%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/inffast.c.o
[ 37%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdsample.c.o
[ 36%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/inftrees.c.o
[ 37%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdpostct.c.o
[ 38%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jerror.c.o
[ 38%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jdmerge.c.o
[ 39%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jfdctflt.c.o
[ 39%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/trees.c.o
[ 40%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jfdctint.c.o
[ 40%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jfdctfst.c.o
[ 40%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/uncompr.c.o
[ 41%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libpng_static_c.dir/__/dlib-src/dlib/external/zlib/zutil.c.o
[ 42%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jidctflt.c.o
[ 43%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jidctfst.c.o
[ 43%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jidctint.c.o
[ 44%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jmemmgr.c.o
[ 44%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jmemnobs.c.o
[ 45%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jquant1.c.o
[ 45%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jquant2.c.o
[ 46%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/libjpeg_static_c.dir/__/dlib-src/dlib/external/libjpeg/jutils.c.o
[ 46%] Linking C static library liblibjpeg_static_c.a
[ 46%] Built target libjpeg_static_c
[ 46%] Linking C static library liblibpng_static_c.a
[ 46%] Built target libpng_static_c
[ 46%] Linking CXX static library ../../lib/libnoexcep_operators.a
[ 46%] Built target noexcep_operators
[ 47%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ocos_operators.dir/operators/ocos_operators_placeholder.cc.o
[ 47%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ocos_operators.dir/operators/math/math.cc.o
[ 48%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ocos_operators.dir/operators/math/segment_extraction.cc.o
[ 48%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ocos_operators.dir/operators/math/segment_sum.cc.o
[ 49%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ocos_operators.dir/__/dlib-src/dlib/test_for_odr_violations.cpp.o
[ 49%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ocos_operators.dir/operators/tokenizer/bpe_kernels.cc.o
[ 50%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ocos_operators.dir/operators/tokenizer/unicode.cc.o
[ 50%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ocos_operators.dir/operators/tokenizer/tokenizers.cc.o
[ 50%] Linking CXX static library ../../../lib/libgtest.a
[ 50%] Built target gtest
[ 51%] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
[ 51%] Linking CXX static library ../../../lib/libgtest_main.a
[ 51%] Built target gtest_main
[ 52%] Linking CXX static library ../../lib/libocos_operators.a
[ 52%] Built target ocos_operators
[ 53%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ortcustomops.dir/shared/lib/ops_registry.cc.o
[ 53%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ortcustomops.dir/shared/api/c_api_utils.cc.o
[ 54%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ortcustomops.dir/shared/api/c_api_tokenizer.cc.o
[ 54%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ortcustomops.dir/shared/api/tokenizer_impl.cc.o
[ 55%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ortcustomops.dir/shared/api/c_api_feature_extraction.cc.o
[ 55%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ortcustomops.dir/shared/api/speech_extractor.cc.o
[ 56%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ortcustomops.dir/shared/api/c_api_processor.cc.o
[ 56%] Building CXX object _deps/onnxruntime_extensions-build/CMakeFiles/ortcustomops.dir/shared/api/image_processor.cc.o
[ 57%] Building C object _deps/onnxruntime_extensions-build/CMakeFiles/ortcustomops.dir/shared/api/image_resample.c.o
[ 57%] Linking CXX static library ../../lib/libortcustomops.a
[ 57%] Built target ortcustomops
[ 57%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/beam_search_scorer.cpp.o
[ 58%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/config.cpp.o
[ 57%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/beam_search_scorer.cpp.o
[ 59%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/config.cpp.o
[ 60%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/cpu/interface.cpp.o
[ 60%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/cpu/interface.cpp.o
[ 60%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/generators.cpp.o
[ 61%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/generators.cpp.o
[ 62%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/json.cpp.o
[ 62%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/json.cpp.o
[ 63%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/logging.cpp.o
[ 64%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/audio_processor.cpp.o
[ 64%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/logging.cpp.o
[ 64%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/audio_processor.cpp.o
[ 65%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/adapters.cpp.o
[ 67%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/captured_graph_pool.cpp.o
[ 64%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/adapters.cpp.o
[ 67%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/captured_graph_pool.cpp.o
[ 68%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/debugging.cpp.o
[ 69%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/decoder_only.cpp.o
[ 69%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/debugging.cpp.o
[ 69%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/decoder_only.cpp.o
[ 70%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/decoder_only_pipeline.cpp.o
[ 70%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/decoder_only_pipeline.cpp.o
[ 70%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/embeddings.cpp.o
[ 71%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/env_utils.cpp.o
[ 72%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/extra_inputs.cpp.o
[ 72%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/embeddings.cpp.o
[ 72%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/env_utils.cpp.o
[ 73%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/extra_inputs.cpp.o
[ 74%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/gpt.cpp.o
[ 74%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/gpt.cpp.o
[ 74%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/image_features.cpp.o
[ 75%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/image_features.cpp.o
[ 76%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/input_ids.cpp.o
[ 76%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/input_ids.cpp.o
[ 77%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/kv_cache.cpp.o
[ 77%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/logits.cpp.o
[ 78%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/kv_cache.cpp.o
[ 77%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/model.cpp.o
[ 79%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/multi_modal_vision_model.cpp.o
[ 79%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/logits.cpp.o
[ 80%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/model.cpp.o
[ 80%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/position_inputs.cpp.o
[ 82%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/prompt_image_processor.cpp.o
[ 80%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/multi_modal_vision_model.cpp.o
[ 83%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/utils.cpp.o
[ 81%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/position_inputs.cpp.o
[ 84%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/static_buffer.cpp.o
[ 82%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/static_buffer.cpp.o
[ 83%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/models/whisper.cpp.o
[ 83%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/prompt_image_processor.cpp.o
[ 84%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/utils.cpp.o
[ 85%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/models/whisper.cpp.o
[ 86%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/ort_genai_c.cpp.o
[ 87%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/search.cpp.o
[ 86%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/runtime_settings.cpp.o
[ 88%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/runtime_settings.cpp.o
[ 87%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/ort_genai_c.cpp.o
[ 87%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/sequences.cpp.o
[ 89%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/softmax_cpu.cpp.o
[ 89%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/search.cpp.o
[ 90%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/sequences.cpp.o
[ 90%] Building CXX object CMakeFiles/onnxruntime-genai.dir/src/top_k_cpu.cpp.o
[ 90%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/softmax_cpu.cpp.o
[ 91%] Building CXX object CMakeFiles/onnxruntime-genai-static.dir/src/top_k_cpu.cpp.o
[ 92%] Linking CXX shared library libonnxruntime-genai.so
[ 92%] Linking CXX static library libonnxruntime-genai-static.a
[ 92%] Built target onnxruntime-genai
[ 92%] Built target onnxruntime-genai-static
[ 93%] Building CXX object test/CMakeFiles/unit_tests.dir/main.cpp.o
[ 93%] Building CXX object test/CMakeFiles/unit_tests.dir/c_api_tests.cpp.o
[ 94%] Building CXX object test/CMakeFiles/unit_tests.dir/model_tests.cpp.o
[ 95%] Building CXX object src/python/CMakeFiles/python.dir/python.cpp.o
[ 96%] Building CXX object benchmark/c/CMakeFiles/model_benchmark.dir/main.cpp.o
[ 96%] Building CXX object benchmark/c/CMakeFiles/model_benchmark.dir/options.cpp.o
[ 96%] Building CXX object test/CMakeFiles/unit_tests.dir/sampling_tests.cpp.o
[ 97%] Building CXX object benchmark/c/CMakeFiles/model_benchmark.dir/posix/resource_utils.cpp.o
[ 98%] Building CXX object test/CMakeFiles/unit_tests.dir/sampling_benchmark.cpp.o
[ 98%] Linking CXX executable model_benchmark
[ 98%] Built target model_benchmark
[100%] Linking CXX executable ../unit_tests
[100%] Built target unit_tests
[100%] Linking CXX shared module onnxruntime_genai.cpython-310-x86_64-linux-gnu.so

@Looong01
Copy link

Looong01 commented Dec 18, 2024

Hi! The ROCm support is currently very experimental. You can try pass --use_rocm with build.py but I still cannot guarantee it'll work as expected.

Different with building onnxruntime-rocm, build onnxruntime-genai-rocm even didn't use hipify to convert cuda codes(.cu) to hip codes(.hip). And it didn't try to find hipcc or /opt/rocm/llvm/bin/clang++ to compile hip codes. Instead, it just use gcc's cc1plus to compile cpu codes.

Please, U need to fix it.

@Looong01
Copy link

Hi! The ROCm support is currently very experimental. You can try pass --use_rocm with build.py but I still cannot guarantee it'll work as expected.

Also, u need to change the version of Microsoft.ML.OnnxRuntime.Rocm from 1.19.2 to 1.21.0-dev-20241211-0046-64d8e25b in cmake/ortlib.cmake at line 39, because it's wrong.

@r4ghu
Copy link
Author

r4ghu commented Dec 18, 2024

True! I updated it to 1.20.0 and it was able to pull the Rocm library. Maybe I need to update to the one you mentioned @Looong01 !

Do you have any suggestions on how can we make the hip compilation successful for getting the Rocm working?

@Looong01
Copy link

Looong01 commented Dec 18, 2024

True! I updated it to 1.20.0 and it was able to pull the Rocm library. Maybe I need to update to the one you mentioned @Looong01 !

Do you have any suggestions on how can we make the hip compilation successful for getting the Rocm working?

Compared to the build procedure of onnxruntime, the cmake files, U will know that it still needs a big effort to fill the CMake compile codes for ROCm. It's lack of a lot of codes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants