AMDMIGraphX icon indicating copy to clipboard operation
AMDMIGraphX copied to clipboard

Issue in MIGraphX execution provider for onnxruntime.

Open aravindhv10 opened this issue 3 months ago • 2 comments

Hi, I was trying to use the rust bindings for onnxruntime (ort crate) with with the MIGraphX execution provider. I compiled onnxruntime library to support this execution provider using the script build_and_test_onnxrt.sh. The full code to get this environment can be found in

https://github.com/aravindhv10/rust_onnx_batched/tree/main

The relevant commit is dd899f33b79db057053ebf6b71ec48800de788dd

Code to construct the environment can be found in the Dockerfile.

I followed the build instructions from AMD's offician documentation to build onnxruntime from source.

The actual rust code using ort to run inference on onnx models can be found inside the folder /src. When I ran the inference with MIGraphX execution provider, I was getting the following error:

WARNING: LAYERNORM does not support stash_type, it will be ignored.
error: unknown warning option '-Wnrvo' [-Werror,-Wunknown-warning-option]

MIGraphX Error: /longer_pathname_so_that_rpms_can_support_packaging_the_debug_info_for_all_os_profiles/src/AMDMIGraphX/src/file_buffer.cpp:77: write_buffer: Failure opening file: ""/20d00-8ffa4d70b7fff899-d184a70c0b974516-0.mxr
Error: Status { code: Internal, message: "inference error: Non-zero status code returned while running MGXKernel_graph_main_graph_12615810092392341640_0 node. Name:'MIGraphXExecutionProvider_MGXKernel_graph_main_graph_12615810092392341640_0_0' Status Message: Failed to call function", metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Wed, 24 Sep 2025 04:25:40 GMT"} }, source: None }

I was able to run the same code using other execution providers like CUDA and OpenVino fine. So I wanted help in getting MLGraphX or ROCM execution providers working, any pointers to documentation will be extremely helpful too. Also, please feel free to inform me if I need to raise an issue with rocm MLGraphX repo, I have raised similar issue with ort.

Thanks!

aravindhv10 avatar Sep 24 '25 05:09 aravindhv10

Can you check where 20d00-8ffa4d70b7fff899-d184a70c0b974516-0.mxr is being saved to? Seems like the path may be incorrect.

kahmed10 avatar Sep 26 '25 16:09 kahmed10

How do I control this? I was not able to find where it would be saved to.

aravindhv10 avatar Oct 02 '25 04:10 aravindhv10