diff --git a/rocblas.spec b/rocblas.spec index cbed74ab6de062fe8f1db757865e8f190b1be410..ef50709f0122e766eb9383024ca600a319f17489 100644 --- a/rocblas.spec +++ b/rocblas.spec @@ -18,19 +18,8 @@ %endif %bcond_with test -%if %{with test} -%global build_test ON -%global __brp_check_rpaths %{nil} -%else -%global build_test OFF -%endif %bcond_with tensile -%if %{with tensile} -%global build_tensile ON -%else -%global build_tensile OFF -%endif Name: rocblas Version: %{rocm_version} @@ -76,6 +65,34 @@ rocBLAS is the AMD library for Basic Linear Algebra Subprograms (BLAS) on the ROCm platform. It is implemented in the HIP programming language and optimized for AMD GPUs. +%package gfx90a +Summary: %{name} for MI200 +%description gfx90a +%{summary} + +%package gfx942 +Summary: %{name} for MI300 +%description gfx942 +%{summary} + +%package gfx1100 +Summary: %{name} for W7900 +%description gfx1100 +%{summary} + +%package gfx1103 +Summary: %{name} for gfx1103 (experimental) +%description gfx1103 +%{summary} + +%package devel +Summary: Libraries and headers for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-gfx90a%{?_isa} = %{version}-%{release} +Requires: %{name}-gfx942%{?_isa} = %{version}-%{release} +Requires: %{name}-gfx1100%{?_isa} = %{version}-%{release} +Requires: %{name}-gfx1103%{?_isa} = %{version}-%{release} + %package devel Summary: Libraries and headers for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} @@ -110,20 +127,22 @@ do module load rocm/$gpu %cmake -G Ninja \ -DCMAKE_BUILD_TYPE=%build_type \ - -DCMAKE_SKIP_RPATH=ON \ -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \ -DROCM_SYMLINK_LIBS=OFF \ -DHIP_PLATFORM=amd \ -DAMDGPU_TARGETS=${ROCM_GPUS} \ -DCMAKE_INSTALL_LIBDIR=$ROCM_LIB \ -DCMAKE_INSTALL_BINDIR=$ROCM_BIN \ +%if %{with test} -DBUILD_CLIENTS_BENCHMARKS=%{build_test} \ -DBUILD_CLIENTS_TESTS=%{build_test} \ - -DBUILD_CLIENTS_TESTS_OPENMP=OFF \ - -DBUILD_FORTRAN_CLIENTS=OFF \ - -DBLAS_LIBRARY=cblas \ - -DBUILD_WITH_TENSILE=%{build_tensile} \ +%endif +%if %{with tensile} + -DBUILD_WITH_TENSILE=ON \ -DBUILD_WITH_PIP=OFF +%else + -DBUILD_WITH_TENSILE=OFF +%endif %cmake_build module purge @@ -134,25 +153,57 @@ for gpu in %{rocm_gpu_list} do %cmake_install done -echo s@%{buildroot}@@ > br.sed -find %{buildroot}%{_libdir} -name '*.so.*.[0-9]' | sed -f br.sed > %{name}.files -find %{buildroot}%{_libdir} -name '*.so.[0-9]' | sed -f br.sed >> %{name}.files -find %{buildroot}%{_libdir} -name 'library' | sed -f br.sed >> %{name}.files -find %{buildroot}%{_libdir} -name '*.so' | sed -f br.sed > %{name}.devel -find %{buildroot}%{_libdir} -name '*.cmake' | sed -f br.sed >> %{name}.devel -find %{buildroot} -name 'rocblas-*' | sed -f br.sed > %{name}.test -find %{buildroot} -name 'rocblas_*' | sed -f br.sed >> %{name}.test - -%files -f %{name}.files + +%files +%dir %{_libdir}/cmake/%{name}/ %license LICENSE.md %exclude %{_docdir}/%{name}/LICENSE.md +%{_libdir}/lib%{name}.so.* +%{_libdir}/rocm/gfx{8,9,10,11}/lib/lib%{name}.so.* + +%if %{with tensile} +%{_libdir}/rocblas/library/* +%{_libdir}/rocm/gfx{8,9,10,11}/lib/rocblas/library/* +%endif + +%files gfx90a +%{_libdir}/rocm/gfx90a/lib/lib%{name}.so.* +%if %{with tensile} +%{_libdir}/rocm/gfx90a/lib/rocblas/library/* +%endif + +%files gfx942 +%{_libdir}/rocm/gfx942/lib/lib%{name}.so.* +%if %{with tensile} +%{_libdir}/rocm/gfx942/lib/rocblas/library/* +%endif + +%files gfx1100 +%{_libdir}/rocm/gfx1100/lib/lib%{name}.so.* +%if %{with tensile} +%{_libdir}/rocm/gfx1100/lib/rocblas/library/* +%endif + +%files gfx1103 +%{_libdir}/rocm/gfx1103/lib/lib%{name}.so.* +%if %{with tensile} +%{_libdir}/rocm/gfx1103/lib/rocblas/library/* +%endif -%files devel -f %{name}.devel +%files devel %doc README.md -%{_includedir}/%{name} +%dir %{_includedir}/%{name} +%dir %{_libdir}/cmake/%{name} +%{_includedir}/%{name}/* +%{_libdir}/cmake/%{name}/* +%{_libdir}/lib%{name}.so +%{_libdir}/rocm/gfx*/lib/lib%{name}.so +%{_libdir}/rocm/gfx*/lib/cmake/%{name}/ %if %{with test} -%files test -f %{name}.test +%files test +%{_bindir}/%{name}* +%{_libdir}/rocm/gfx*/bin/%{name}* %endif %changelog