diff --git a/onnxruntime/python/tools/transformers/benchmark.py b/onnxruntime/python/tools/transformers/benchmark.py index 55ce8d752a9d6..450474d96da4a 100644 --- a/onnxruntime/python/tools/transformers/benchmark.py +++ b/onnxruntime/python/tools/transformers/benchmark.py @@ -117,6 +117,7 @@ def run_onnxruntime( if ( use_gpu and ("CUDAExecutionProvider" not in onnxruntime.get_available_providers()) + and ("MIGraphXExecutionProvider" not in onnxruntime.get_available_providers()) and ("ROCMExecutionProvider" not in onnxruntime.get_available_providers()) and ("DmlExecutionProvider" not in onnxruntime.get_available_providers()) ): diff --git a/onnxruntime/test/perftest/ort_test_session.cc b/onnxruntime/test/perftest/ort_test_session.cc index 08c2cff8058c2..b62ae48e07b39 100644 --- a/onnxruntime/test/perftest/ort_test_session.cc +++ b/onnxruntime/test/perftest/ort_test_session.cc @@ -505,10 +505,6 @@ select from 'TF8', 'TF16', 'UINT8', 'FLOAT', 'ITENSOR'. \n)"); } else if (provider_name_ == onnxruntime::kMIGraphXExecutionProvider) { #ifdef USE_MIGRAPHX Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_MIGraphX(session_options, 0)); - OrtROCMProviderOptions rocm_options; - rocm_options.miopen_conv_exhaustive_search = performance_test_config.run_config.cudnn_conv_algo; - rocm_options.do_copy_in_default_stream = !performance_test_config.run_config.do_cuda_copy_in_separate_stream; - session_options.AppendExecutionProvider_ROCM(rocm_options); #else ORT_THROW("MIGraphX is not supported in this build\n"); #endif diff --git a/setup.py b/setup.py index c1580eeb9e8f9..8e1d0451a3fb2 100644 --- a/setup.py +++ b/setup.py @@ -66,6 +66,8 @@ def parse_arg_remove_string(argv, arg_name_equal): elif parse_arg_remove_boolean(sys.argv, "--use_rocm"): is_rocm = True rocm_version = parse_arg_remove_string(sys.argv, "--rocm_version=") + if parse_arg_remove_boolean(sys.argv, "--use_migraphx"): + is_migraphx = True elif parse_arg_remove_boolean(sys.argv, "--use_migraphx"): is_migraphx = True elif parse_arg_remove_boolean(sys.argv, "--use_openvino"): @@ -90,8 +92,10 @@ def parse_arg_remove_string(argv, arg_name_equal): is_qnn = True package_name = "onnxruntime-qnn" -if is_rocm or is_migraphx: - package_name = "onnxruntime-rocm" +if is_rocm: + package_name = "onnxruntime-rocm" if not nightly_build else "ort-rocm-nightly" +elif is_migraphx: + package_name = "onnxruntime-migraphx" if not nightly_build else "ort-migraphx-nightly" # PEP 513 defined manylinux1_x86_64 and manylinux1_i686 # PEP 571 defined manylinux2010_x86_64 and manylinux2010_i686 diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index 53dcdc6e0c6fa..e91c30ad94e99 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -2265,6 +2265,8 @@ def build_python_wheel( args.append("--use_rocm") if rocm_version: args.append(f"--rocm_version={rocm_version}") + if use_migraphx: + args.append("--use_migraphx") elif use_migraphx: args.append("--use_migraphx") elif use_openvino: