public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Tom Rix <Tom.Rix@amd.com>
To: git-commits@fedoraproject.org
Subject: [rpms/onnxruntime] rawhide: Add migraphx backend
Date: Fri, 26 Jun 2026 23:56:03 GMT [thread overview]
Message-ID: <178251816339.1.17089115357119171293.rpms-onnxruntime-cd90c5331b33@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/onnxruntime
Branch : rawhide
Commit : cd90c5331b339be84d8d3fb725ac0694bdf261a0
Author : Tom Rix <Tom.Rix@amd.com>
Date : 2026-06-26T23:55:49+00:00
Stats : +86/-0 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/onnxruntime/c/cd90c5331b339be84d8d3fb725ac0694bdf261a0?branch=rawhide
Log:
Add migraphx backend
In preparation for 1.23 when the rocm backend will be removed,
add conditionally off migraphx backend as the rocm replacement.
Because rocm will removed, reuse rocm paths.
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
---
diff --git a/onnxruntime.spec b/onnxruntime.spec
index 35526e6..75ad76f 100644
--- a/onnxruntime.spec
+++ b/onnxruntime.spec
@@ -11,6 +11,9 @@
%bcond rocm 0
%endif
+%bcond migraphx 0
+
+%bcond migraphx_test 0
%bcond rocm_test 0
%bcond test 1
@@ -20,6 +23,9 @@
%if %{with rocm}
%global backends %backends rocm
%endif
+%if %{with migraphx}
+%global backends %backends migraphx
+%endif
Summary: A cross-platform inferencing and training accelerator
Name: onnxruntime
@@ -141,6 +147,10 @@ BuildRequires: rocthrust-devel
BuildRequires: roctracer-devel
%endif
+%if %{with migraphx}
+BuildRequires: migraphx-devel
+%endif
+
Provides: bundled(utf8_range)
%description
@@ -177,6 +187,28 @@ Requires: %{name}-rocm%{_isa} = %{version}-%{release}
%{summary}
%endif
+%if %{with migraphx}
+%package migraphx
+Summary: The MIGraphX runtime backend for the %{name} package
+
+%description migraphx
+%{summary}
+
+%package migraphx-devel
+Summary: The MIGraphX development part of the %{name} package
+Requires: %{name}-migraphx%{_isa} = %{version}-%{release}
+
+%description migraphx-devel
+%{summary}
+
+%package migraphx-test
+Summary: The MIGraphX tests for the %{name} package
+Requires: %{name}-migraphx%{_isa} = %{version}-%{release}
+
+%description migraphx-test
+%{summary}
+%endif
+
%package -n python3-onnxruntime
Summary: %{summary}
Requires: %{name}%{_isa} = %{version}-%{release}
@@ -264,6 +296,26 @@ backend=rocm
%cmake_build
%endif
+%if %{with migraphx}
+backend=migraphx
+%cmake %cmake_config \
+ -DCMAKE_INSTALL_BINDIR=%{_lib}/rocm/bin \
+ -DCMAKE_INSTALL_INCLUDEDIR=%{_lib}/rocm/include \
+ -DCMAKE_INSTALL_LIBDIR=%{_lib}/rocm/lib \
+ -Donnxruntime_ENABLE_CPUINFO=ON \
+ -DCMAKE_HIP_PLATFORM=amd \
+%if %{with migraphx_test}
+ -Donnxruntime_INSTALL_UNIT_TESTS=ON \
+%else
+ -Donnxruntime_INSTALL_UNIT_TESTS=OFF \
+%endif
+ -Donnxruntime_ROCM_HOME=%{_prefix} \
+ -Donnxruntime_USE_COMPOSABLE_KERNEL=OFF \
+ -Donnxruntime_USE_MIGRAPHX=ON
+
+%cmake_build
+%endif
+
backend=cpu
%cmake %cmake_config \
-DCMAKE_INSTALL_LIBDIR=%{_lib} \
@@ -288,6 +340,11 @@ backend=rocm
%cmake_install
%endif
+%if %{with migraphx}
+backend=migraphx
+%cmake_install
+%endif
+
backend=cpu
%cmake_install
mkdir -p "%{buildroot}/%{_docdir}/"
@@ -301,6 +358,12 @@ ln -s "../../../../libonnxruntime_providers_shared.so.%{version}" "%{buildroot}/
%if %{with test}
%check
+%if %{with migraphx_test}
+backend=migraphx
+export GTEST_FILTER=-CApiTensorTest.load_huge_tensor_with_external_data
+%ctest
+%endif
+
%if %{with rocm_test}
backend=rocm
export GTEST_FILTER=-CApiTensorTest.load_huge_tensor_with_external_data
@@ -357,6 +420,29 @@ export GTEST_FILTER=-CApiTensorTest.load_huge_tensor_with_external_data
%endif
%endif
+%if %{with migraphx}
+%files migraphx
+%license LICENSE
+%doc ThirdPartyNotices.txt
+%{_libdir}/rocm/lib/libonnxruntime.so.%{version}
+%{_libdir}/rocm/lib/libonnxruntime_providers_shared.so.%{version}
+%{_libdir}/rocm/lib/libonnxruntime_providers_migraphx.so
+
+%files migraphx-devel
+%dir %{_libdir}/rocm/include/onnxruntime/
+%dir %{_libdir}/rocm/lib/cmake/onnxruntime/
+%{_libdir}/rocm/include/onnxruntime/*
+%{_libdir}/rocm/lib/libonnxruntime.so*
+%{_libdir}/rocm/lib/libonnxruntime_providers_shared.so
+%{_libdir}/rocm/lib/pkgconfig/libonnxruntime.pc
+%{_libdir}/rocm/lib/cmake/onnxruntime/*
+
+%if %{with migraphx_test}
+%files migraphx-test
+%{_libdir}/rocm/bin/*
+%endif
+%endif
+
%changelog
%autochangelog
reply other threads:[~2026-06-26 23:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178251816339.1.17089115357119171293.rpms-onnxruntime-cd90c5331b33@fedoraproject.org \
--to=tom.rix@amd.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox