%global upstreamname AMDMIGraphX %global rocm_release 6.3 %global rocm_patch 1 %global rocm_version %{rocm_release}.%{rocm_patch} %global toolchain rocm # hipcc does not support some clang flags %global build_cxxflags %(echo %{optflags} | sed -e 's/-fstack-protector-strong/-Xarch_host -fstack-protector-strong/' -e 's/-fcf-protection/-Xarch_host -fcf-protection/') %bcond_with test %if %{with test} %global build_test ON %else %global build_test OFF %endif # Needs to match hipblaslt %global _amdgpu_targets "gfx90a:xnack+;gfx90a:xnack-;gfx1100;gfx1101" %global amdgpu_targets "gfx1100" Name: amdmigraphx Version: %{rocm_version} Release: 1%{?dist} Summary: AMD's graph optimization engine Url: https://github.com/ROCm/%{upstreamname} License: MIT Source0: %{url}/archive/rocm-%{rocm_version}.tar.gz#/%{upstreamname}-%{rocm_version}.tar.gz BuildRequires: cmake BuildRequires: half-devel BuildRequires: hipblaslt-devel BuildRequires: hipblas-devel BuildRequires: hipcc BuildRequires: json-devel BuildRequires: msgpack-devel BuildRequires: miopen-devel BuildRequires: ninja-build BuildRequires: protobuf-devel BuildRequires: pybind11-devel BuildRequires: rocblas-devel BuildRequires: rocm-cmake BuildRequires: rocm-comgr-devel BuildRequires: rocm-compilersupport-macros BuildRequires: rocm-hip-devel BuildRequires: rocm-llvm-devel BuildRequires: rocm-runtime-devel BuildRequires: rocm-rpm-macros BuildRequires: sqlite-devel %if %{with test} %endif # Only x86_64 works right now: ExclusiveArch: x86_64 %description AMD MIGraphX is AMD's graph inference engine, which accelerates machine learning model inference. %package devel Summary: Libraries and headers for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel %{summary} %if %{with test} %package test Summary: Tests for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description test %{summary} %endif %prep %autosetup -p1 -n %{upstreamname}-rocm-%{version} %build rocm_clang=`hipconfig -l`/clang++ %cmake -G Ninja \ -DAMDGPU_TARGETS=%{amdgpu_targets} \ -DCMAKE_CXX_COMPILER=$rocm_clang \ -DHIP_PLATFORM=amd \ -DROCM_SYMLINK_LIBS=OFF %cmake_build %install %cmake_install %files %files devel %if %{with test} %files test %endif %changelog * Fri Dec 27 2024 Tom Rix - 6.3.1-1 - Initial try