Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f9638ce9c8 | |||
| c78f006f1c | |||
| f1a170e59f | |||
| 1d0dc4c3a6 | |||
| 036475756a | |||
| 78c6468afd | |||
| 09a815cc30 | |||
| af5d87154b |
@@ -1,84 +0,0 @@
|
||||
From 92a6ab08c424830e38fb480079eb3bedf4f48224 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Rix <Tom.Rix@amd.com>
|
||||
Date: Tue, 12 Aug 2025 08:17:02 -0700
|
||||
Subject: [PATCH] rocblas: remove roctracer
|
||||
|
||||
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
|
||||
---
|
||||
library/CMakeLists.txt | 3 ---
|
||||
library/src/include/logging.hpp | 24 ------------------------
|
||||
2 files changed, 27 deletions(-)
|
||||
|
||||
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
|
||||
index 762580d72791..b975ca9a37c8 100644
|
||||
--- a/library/CMakeLists.txt
|
||||
+++ b/library/CMakeLists.txt
|
||||
@@ -80,9 +80,6 @@ function( rocblas_library_settings lib_target_ )
|
||||
target_link_libraries( ${lib_target_} PRIVATE hip::device )
|
||||
else()
|
||||
target_link_libraries( ${lib_target_} PRIVATE hip::device -lstdc++fs --rtlib=compiler-rt --unwindlib=libgcc)
|
||||
- if (BUILD_SHARED_LIBS)
|
||||
- target_link_libraries(${lib_target_} PRIVATE -lroctx64)
|
||||
- endif()
|
||||
endif()
|
||||
target_link_libraries( ${lib_target_} PRIVATE Threads::Threads )
|
||||
# -fno-gpu-rdc compiler option was used with hcc, so revisit feature at some point
|
||||
diff --git a/library/src/include/logging.hpp b/library/src/include/logging.hpp
|
||||
index 352e4e398485..56d8abfcc321 100644
|
||||
--- a/library/src/include/logging.hpp
|
||||
+++ b/library/src/include/logging.hpp
|
||||
@@ -40,10 +40,6 @@
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
-#if !defined(ROCBLAS_STATIC_LIB) && !defined(WIN32)
|
||||
-#include <roctracer/roctx.h>
|
||||
-#endif
|
||||
-
|
||||
/************************************************************************************
|
||||
* Profile kernel arguments
|
||||
************************************************************************************/
|
||||
@@ -453,17 +449,6 @@ class Logger
|
||||
public:
|
||||
Logger() = default;
|
||||
|
||||
-#if !defined(ROCBLAS_STATIC_LIB) && !defined(WIN32)
|
||||
- void log_range(const std::string& name)
|
||||
- {
|
||||
- if(!m_active)
|
||||
- {
|
||||
- roctxRangePush(name.c_str());
|
||||
- m_active = true;
|
||||
- }
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
template <typename H, typename... Ts>
|
||||
void log_arguments(rocblas_internal_ostream& os, const char* sep, H&& head, Ts&&... xs)
|
||||
{
|
||||
@@ -472,9 +457,6 @@ public:
|
||||
// ((os << sep << std::forward<Ts>(xs)), ...);
|
||||
(void)(int[]){(os << sep << std::forward<Ts>(xs), 0)...};
|
||||
|
||||
-#if !defined(ROCBLAS_STATIC_LIB) && !defined(WIN32)
|
||||
- log_range(os.str());
|
||||
-#endif
|
||||
os << std::endl;
|
||||
}
|
||||
|
||||
@@ -527,12 +509,6 @@ public:
|
||||
|
||||
~Logger()
|
||||
{
|
||||
-#if !defined(ROCBLAS_STATIC_LIB) && !defined(WIN32)
|
||||
- if(m_active)
|
||||
- {
|
||||
- roctxRangePop();
|
||||
- }
|
||||
-#endif
|
||||
}
|
||||
|
||||
private:
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
From: Egbert Eich <eich@suse.com>
|
||||
Date: Wed Apr 30 16:18:49 2025 +0200
|
||||
Subject: Modify CMakeLists.txt files to allow to build modules independently
|
||||
Patch-mainline: Not yet
|
||||
Git-commit: f4724507a2770b2ed5ecc633aa406ad70a675e6f
|
||||
References:
|
||||
|
||||
Signed-off-by: Egbert Eich <eich@suse.com>
|
||||
Signed-off-by: Egbert Eich <eich@suse.de>
|
||||
---
|
||||
library/src/CMakeLists.txt | 24 +++++-------------------
|
||||
library/src/TensileInstall/CMakeLists.txt | 19 +++++++++++++++++++
|
||||
2 files changed, 24 insertions(+), 19 deletions(-)
|
||||
diff --git a/library/src/CMakeLists.txt b/library/src/CMakeLists.txt
|
||||
index 35342e1..efa732c 100644
|
||||
--- a/library/src/CMakeLists.txt
|
||||
+++ b/library/src/CMakeLists.txt
|
||||
@@ -97,7 +97,9 @@ if( BUILD_WITH_TENSILE )
|
||||
set_target_properties( TensileHost PROPERTIES OUTPUT_NAME rocblas-tensile CXX_EXTENSIONS NO )
|
||||
|
||||
# Tensile host depends on libs build target
|
||||
- add_dependencies( TensileHost TENSILE_LIBRARY_TARGET )
|
||||
+ if(NOT DEFINED ENV{TENSILE_SKIP_LIBRARY} OR NOT $ENV{TENSILE_SKIP_LIBRARY})
|
||||
+ add_dependencies( TensileHost TENSILE_LIBRARY_TARGET )
|
||||
+ endif()
|
||||
|
||||
if( ROCBLAS_SHARED_LIBS )
|
||||
set( BUILD_SHARED_LIBS ON )
|
||||
@@ -823,24 +825,8 @@ rocm_install_targets(
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
||||
-if( BUILD_WITH_TENSILE )
|
||||
- if (WIN32)
|
||||
- set( ROCBLAS_TENSILE_LIBRARY_DIR "\${CPACK_PACKAGING_INSTALL_PREFIX}/bin/rocblas" CACHE PATH "path to tensile library" )
|
||||
- else()
|
||||
- set( ROCBLAS_TENSILE_LIBRARY_DIR "${CMAKE_INSTALL_LIBDIR}/rocblas" CACHE PATH "path to tensile library" )
|
||||
- endif()
|
||||
- # For ASAN package, Tensile library files(which are not shared libraries) are not required
|
||||
- if( NOT ENABLE_ASAN_PACKAGING )
|
||||
- if( BUILD_SHARED_LIBS )
|
||||
- set( TENSILE_DATA_COMPONENT_NAME ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} )
|
||||
- else()
|
||||
- set( TENSILE_DATA_COMPONENT_NAME devel )
|
||||
- endif()
|
||||
- rocm_install(
|
||||
- DIRECTORY ${CMAKE_BINARY_DIR}/Tensile/library
|
||||
- DESTINATION ${ROCBLAS_TENSILE_LIBRARY_DIR}
|
||||
- COMPONENT ${TENSILE_DATA_COMPONENT_NAME}) # Use this cmake variable to be compatible with rocm-cmake 0.6 and 0.7
|
||||
- endif()
|
||||
+if(NOT DEFINED ENV{TENSILE_SKIP_LIBRARY} OR NOT $ENV{TENSILE_SKIP_LIBRARY})
|
||||
+ add_subdirectory( TensileInstall )
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
diff --git a/library/src/TensileInstall/CMakeLists.txt b/library/src/TensileInstall/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..fa39e9f
|
||||
--- /dev/null
|
||||
+++ b/library/src/TensileInstall/CMakeLists.txt
|
||||
@@ -0,0 +1,19 @@
|
||||
+if( BUILD_WITH_TENSILE )
|
||||
+ if (WIN32)
|
||||
+ set( ROCBLAS_TENSILE_LIBRARY_DIR "\${CPACK_PACKAGING_INSTALL_PREFIX}/bin/rocblas" CACHE PATH "path to tensile library" )
|
||||
+ else()
|
||||
+ set( ROCBLAS_TENSILE_LIBRARY_DIR "${CMAKE_INSTALL_LIBDIR}/rocblas" CACHE PATH "path to tensile library" )
|
||||
+ endif()
|
||||
+ # For ASAN package, Tensile library files(which are not shared libraries) are not required
|
||||
+ if( NOT ENABLE_ASAN_PACKAGING )
|
||||
+ if( BUILD_SHARED_LIBS )
|
||||
+ set( TENSILE_DATA_COMPONENT_NAME ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} )
|
||||
+ else()
|
||||
+ set( TENSILE_DATA_COMPONENT_NAME devel )
|
||||
+ endif()
|
||||
+ rocm_install(
|
||||
+ DIRECTORY ${CMAKE_BINARY_DIR}/Tensile/library
|
||||
+ DESTINATION ${ROCBLAS_TENSILE_LIBRARY_DIR}
|
||||
+ COMPONENT ${TENSILE_DATA_COMPONENT_NAME}) # Use this cmake variable to be compatible with rocm-cmake 0.6 and 0.7
|
||||
+ endif()
|
||||
+endif()
|
||||
25
changelog
Normal file
25
changelog
Normal file
@@ -0,0 +1,25 @@
|
||||
* Sun Oct 22 2023 Tom Rix <trix@redhat.com> - 5.7.1-3
|
||||
- Change url
|
||||
- capitalize AND
|
||||
|
||||
* Sat Oct 21 2023 Tom Rix <trix@redhat.com> - 5.7.1-2
|
||||
- Fix so location
|
||||
- glob gpu family location
|
||||
|
||||
* Sun Oct 15 2023 Tom Rix <trix@redhat.com> - 5.7.1-1
|
||||
- Update to 5.7.1
|
||||
- Use rocm-rpm-macros
|
||||
|
||||
* Sat Oct 7 2023 Tom Rix <trix@redhat.com> - 5.7.0-1
|
||||
- Update to 5.7
|
||||
- Use WIP rocm-rpm-macros
|
||||
- Convert to environent modules
|
||||
|
||||
* Sun Oct 1 2023 Tom Rix <trix@redhat.com> - 5.6.0-2
|
||||
- Split the build into gpu families
|
||||
|
||||
* Sat Sep 23 2023 Tom Rix <trix@redhat.com> - 5.6.0-1
|
||||
- Update to 5.6
|
||||
|
||||
* Tue Jun 6 2023 Tom Rix <trix@redhat.com> - 5.5.1-1
|
||||
- Initial package
|
||||
3
rocblas.rpmlintrc
Normal file
3
rocblas.rpmlintrc
Normal file
@@ -0,0 +1,3 @@
|
||||
# librocblas4-arch-.* are no shared libraries but modules loaded onto the GPU.
|
||||
addFilter("rocblas-arch-.*: W: shared-lib-without-dependency-information")
|
||||
addFilter("rocblas-arch-.*: E: shlib-fixed-dependency.")
|
||||
218
rocblas.spec
218
rocblas.spec
@@ -1,24 +1,3 @@
|
||||
#
|
||||
# Copyright Fedora Project Authors.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
%if 0%{?suse_version}
|
||||
%global rocblas_name librocblas4
|
||||
%else
|
||||
@@ -30,15 +9,31 @@
|
||||
%global rocm_patch 2
|
||||
%global rocm_version %{rocm_release}.%{rocm_patch}
|
||||
|
||||
%if 0%{?suse_version}
|
||||
# On SUSE build the .so module only - tensile modules are built in a separate package
|
||||
%bcond_with tensile_package
|
||||
|
||||
%define build_tensile_separately 1
|
||||
%else
|
||||
%define build_tensile_separately 0
|
||||
%endif
|
||||
|
||||
%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/' -e 's/-mtls-dialect=gnu2//')
|
||||
|
||||
%bcond_with debug
|
||||
%if 0%{?suse_version}
|
||||
%if %{without debug}
|
||||
%global build_type RELEASE
|
||||
%global build_cxxflags %(echo %{optflags} | sed -e 's/-g\\( \\|$\\)/ /')
|
||||
%endif
|
||||
%else
|
||||
%if %{with debug}
|
||||
%global build_type DEBUG
|
||||
%else
|
||||
%global build_type RelWithDebInfo
|
||||
%global build_type RELEASE
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%bcond_without compress
|
||||
@@ -49,7 +44,7 @@
|
||||
%endif
|
||||
|
||||
%bcond_with test
|
||||
%if %{with test}
|
||||
%if %{with test} && %{without tensile_package}
|
||||
%global build_test ON
|
||||
%global __brp_check_rpaths %{nil}
|
||||
%else
|
||||
@@ -70,6 +65,24 @@
|
||||
%global build_tensile OFF
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel}
|
||||
%bcond_with msgpack
|
||||
%else
|
||||
%bcond_without msgpack
|
||||
%endif
|
||||
|
||||
# Use ninja if it is available
|
||||
%if 0%{?fedora} || 0%{?suse_version}
|
||||
%bcond_without ninja
|
||||
%else
|
||||
%bcond_with ninja
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} < 10
|
||||
# On CS9: /usr/bin/debugedit: Cannot handle 8-byte build ID
|
||||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
# Compression type and level for source/binary package payloads.
|
||||
# "w7T0.xzdio" xz level 7 using %%{getncpus} threads
|
||||
%global _source_payload w7T0.xzdio
|
||||
@@ -83,14 +96,6 @@
|
||||
# OracleLinux 9 has a problem with it's strip not recognizing *.co's
|
||||
%global __strip %rocmllvm_bindir/llvm-strip
|
||||
|
||||
# Use ninja if it is available
|
||||
# Ninja is available on suse but obs times out with ninja build, make doesn't
|
||||
%if 0%{?fedora}
|
||||
%bcond_without ninja
|
||||
%else
|
||||
%bcond_with ninja
|
||||
%endif
|
||||
|
||||
%if %{with ninja}
|
||||
%global cmake_generator -G Ninja
|
||||
%else
|
||||
@@ -98,14 +103,12 @@
|
||||
%endif
|
||||
|
||||
%global cmake_config \\\
|
||||
-DBLAS_INCLUDE_DIR=%{_includedir}/%{blaslib} \\\
|
||||
-DBLAS_LIBRARY=%{blaslib} \\\
|
||||
-DCMAKE_CXX_COMPILER=hipcc \\\
|
||||
-DCMAKE_C_COMPILER=hipcc \\\
|
||||
-DCMAKE_LINKER=%rocmllvm_bindir/ld.lld \\\
|
||||
-DCMAKE_AR=%rocmllvm_bindir/llvm-ar \\\
|
||||
-DCMAKE_RANLIB=%rocmllvm_bindir/llvm-ranlib \\\
|
||||
-DCMAKE_BUILD_TYPE=%{build_type} \\\
|
||||
%{?build_type:-DCMAKE_BUILD_TYPE=%{build_type}} \\\
|
||||
-DCMAKE_PREFIX_PATH=%{rocmllvm_cmakedir}/.. \\\
|
||||
-DCMAKE_SKIP_RPATH=ON \\\
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \\\
|
||||
@@ -116,6 +119,7 @@
|
||||
-DBUILD_CLIENTS_TESTS=%{build_test} \\\
|
||||
-DBUILD_CLIENTS_TESTS_OPENMP=OFF \\\
|
||||
-DBUILD_FORTRAN_CLIENTS=OFF \\\
|
||||
-DBLAS_LIBRARY=cblas \\\
|
||||
-DBUILD_OFFLOAD_COMPRESS=%{build_compress} \\\
|
||||
-DBUILD_WITH_HIPBLASLT=OFF \\\
|
||||
-DTensile_COMPILER=hipcc \\\
|
||||
@@ -123,6 +127,7 @@
|
||||
-DTensile_LIBRARY_FORMAT=%{tensile_library_format} \\\
|
||||
-DTensile_VERBOSE=%{tensile_verbose} \\\
|
||||
-DTensile_DIR=${TP}/cmake \\\
|
||||
-DDISABLE_ROCTRACER=ON \\\
|
||||
-DBUILD_WITH_PIP=OFF
|
||||
|
||||
%bcond_with generic
|
||||
@@ -135,15 +140,28 @@
|
||||
|
||||
Name: %{rocblas_name}
|
||||
Version: %{rocm_version}
|
||||
Release: 10%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: BLAS implementation for ROCm
|
||||
Url: https://github.com/ROCmSoftwarePlatform/%{upstreamname}
|
||||
License: MIT AND BSD-3-Clause
|
||||
|
||||
Source0: %{url}/archive/refs/tags/rocm-%{rocm_version}.tar.gz#/%{upstreamname}-%{rocm_version}.tar.gz
|
||||
Source1: rocblas.rpmlintrc
|
||||
Patch2: 0001-fixup-install-of-tensile-output.patch
|
||||
Patch3: Modify-CMakeLists.txt-files-to-allow-to-build-modules-independently.patch
|
||||
Patch4: 0001-offload-compress-option.patch
|
||||
Patch6: 0001-rocblas-remove-roctracer.patch
|
||||
Patch6: 0001-option-to-disable-roctracer-logging.patch
|
||||
|
||||
%if 0%{build_tensile_separately}
|
||||
Requires: rocblas-tensile = %version
|
||||
%if %{with check}
|
||||
# If %check is enabled, we need to serialize the builds which will introduce
|
||||
# a circular dependency. The flag below causes OBS to ignore this.
|
||||
#
|
||||
#!BuildIgnore: %name
|
||||
BuildRequires: rocblas-tensile = %version
|
||||
%endif
|
||||
%endif
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
@@ -153,26 +171,28 @@ BuildRequires: rocm-compilersupport-macros
|
||||
BuildRequires: rocm-hip-devel
|
||||
BuildRequires: rocm-runtime-devel
|
||||
BuildRequires: rocm-rpm-macros
|
||||
BuildRequires: rocm-rpm-macros-modules
|
||||
|
||||
%if %{with tensile}
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: msgpack-cxx-devel
|
||||
%global tensile_library_format msgpack
|
||||
# OBS vm times out without console output
|
||||
%global tensile_verbose 2
|
||||
BuildRequires: %{python_module tensile-devel}
|
||||
BuildRequires: %{python_module joblib}
|
||||
%{?with_msgpack:BuildRequires: msgpack-cxx-devel}
|
||||
%else
|
||||
BuildRequires: python3dist(tensile)
|
||||
%if 0%{?rhel}
|
||||
%global tensile_verbose 2
|
||||
%global tensile_library_format yaml
|
||||
%else
|
||||
BuildRequires: msgpack-devel
|
||||
%global tensile_verbose 1
|
||||
%global tensile_library_format msgpack
|
||||
%endif
|
||||
%{?with_msgpack:BuildRequires: msgpack-devel}
|
||||
%endif # suse_version
|
||||
# OBS vm times out without console output
|
||||
%if 0%{?rhel} || 0%{?suse_version}
|
||||
%global tensile_verbose 2
|
||||
%else
|
||||
%global tensile_verbose 1
|
||||
%endif
|
||||
%if %{with msgpack}
|
||||
%global tensile_library_format msgpack
|
||||
%else
|
||||
%global tensile_library_format yaml
|
||||
%endif
|
||||
%else
|
||||
%global tensile_verbose %{nil}
|
||||
%global tensile_library_format %{nil}
|
||||
@@ -183,29 +203,25 @@ BuildRequires: pkgconfig(libzstd)
|
||||
%endif
|
||||
|
||||
%if %{with test}
|
||||
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: %{python_module PyYAML}
|
||||
%else
|
||||
BuildRequires: python3dist(pyyaml)
|
||||
%endif
|
||||
BuildRequires: blas-devel
|
||||
BuildRequires: libomp-devel
|
||||
BuildRequires: rocminfo
|
||||
BuildRequires: rocm-smi-devel
|
||||
BuildRequires: roctracer-devel
|
||||
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: openblas-devel
|
||||
BuildRequires: gtest
|
||||
BuildRequires: cblas-devel
|
||||
BuildRequires: gcc-fortran
|
||||
BuildRequires: %{python_module PyYAML}
|
||||
%global blaslib openblas
|
||||
BuildRequires: gtest
|
||||
%else
|
||||
BuildRequires: gcc-gfortran
|
||||
BuildRequires: gtest-devel
|
||||
BuildRequires: python3dist(pyyaml)
|
||||
%if 0%{?rhel}
|
||||
BuildRequires: flexiblas-devel
|
||||
%global blaslib flexiblas
|
||||
%else
|
||||
BuildRequires: blas-devel
|
||||
%global blaslib cblas
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
%if %{with ninja}
|
||||
@@ -240,11 +256,18 @@ Provides: rocblas-devel = %{version}-%{release}
|
||||
%description devel
|
||||
%{summary}
|
||||
|
||||
%if %{with test}
|
||||
%package -n rocblas-tensile
|
||||
Summary: ROCBlas Tensile Modules
|
||||
Requires: %{name} = %version
|
||||
|
||||
%description -n rocblas-tensile
|
||||
BLAS architecture modules for all AMDGPU architectures
|
||||
|
||||
%if %{with test} && %{without tensile_package}
|
||||
%package test
|
||||
Summary: Tests for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: diffutils
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description test
|
||||
%{summary}
|
||||
@@ -252,8 +275,8 @@ Requires: diffutils
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{upstreamname}-rocm-%{version}
|
||||
sed -i -e 's@set( BLAS_LIBRARY "blas" )@set( BLAS_LIBRARY "%blaslib" )@' clients/CMakeLists.txt
|
||||
sed -i -e 's@target_link_libraries( rocblas-test PRIVATE ${BLAS_LIBRARY} ${GTEST_BOTH_LIBRARIES} roc::rocblas )@target_link_libraries( rocblas-test PRIVATE %blaslib ${GTEST_BOTH_LIBRARIES} roc::rocblas )@' clients/gtest/CMakeLists.txt
|
||||
sed -i -e 's@set( BLAS_LIBRARY "blas" )@set( BLAS_LIBRARY "cblas" )@' clients/CMakeLists.txt
|
||||
sed -i -e 's@target_link_libraries( rocblas-test PRIVATE ${BLAS_LIBRARY} ${GTEST_BOTH_LIBRARIES} roc::rocblas )@target_link_libraries( rocblas-test PRIVATE cblas ${GTEST_BOTH_LIBRARIES} roc::rocblas )@' clients/gtest/CMakeLists.txt
|
||||
|
||||
# no git in this build
|
||||
sed -i -e 's@find_package(Git REQUIRED)@find_package(Git)@' library/CMakeLists.txt
|
||||
@@ -296,19 +319,31 @@ if [ ${CORES} = 1 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
%if %{build_tensile_separately} && %{without tensile_package}
|
||||
export TENSILE_SKIP_LIBRARY=true
|
||||
%endif
|
||||
|
||||
%{?suse_version:%{?build_cxxflags:CXXFLAGS="%{build_cxxflags}"}}
|
||||
%cmake %{cmake_generator} %{cmake_config} \
|
||||
-DGPU_TARGETS=%{gpu_list} \
|
||||
-DBUILD_WITH_TENSILE=%{build_tensile} \
|
||||
-DCMAKE_INSTALL_LIBDIR=%_libdir \
|
||||
|
||||
%cmake_build
|
||||
%cmake_build %{?with_tensile_package:TENSILE_LIBRARY_TARGET}
|
||||
|
||||
%install
|
||||
%if %{with tensile_package}
|
||||
DESTDIR=%{buildroot} /usr/bin/cmake -P build/library/src/TensileInstall/cmake_install.cmake
|
||||
%else
|
||||
%cmake_install
|
||||
|
||||
rm -f %{buildroot}%{_prefix}/share/doc/rocblas/LICENSE.md
|
||||
if [ -f %{buildroot}%{_prefix}/share/doc/rocblas/LICENSE.md ]; then
|
||||
rm %{buildroot}%{_prefix}/share/doc/rocblas/LICENSE.md
|
||||
fi
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{without tensile_package}
|
||||
%if %{with test}
|
||||
%if %{with check}
|
||||
%if 0%{?suse_version}
|
||||
@@ -320,16 +355,20 @@ export LD_LIBRARY_PATH=%{_vpath_builddir}/library/src:$LD_LIBRARY_PATH
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if %{without tensile_package}
|
||||
%files
|
||||
%license LICENSE.md
|
||||
%{_libdir}/librocblas.so.4{,.*}
|
||||
%if %{with tensile}
|
||||
%if ! %{build_tensile_separately}
|
||||
%dir %{_libdir}/rocblas
|
||||
%dir %{_libdir}/rocblas/library
|
||||
%{_libdir}/rocblas/library/Kernels*
|
||||
%{_libdir}/rocblas/library/Tensile*
|
||||
%endif
|
||||
%endif # with tensile
|
||||
|
||||
%files devel
|
||||
%doc README.md
|
||||
@@ -344,28 +383,31 @@ export LD_LIBRARY_PATH=%{_vpath_builddir}/library/src:$LD_LIBRARY_PATH
|
||||
%{_bindir}/rocblas*
|
||||
%endif
|
||||
|
||||
%else # ?tensile_package
|
||||
|
||||
%if %{with tensile}
|
||||
%files -n rocblas-tensile
|
||||
%dir %{_libdir}/rocblas
|
||||
%dir %{_libdir}/rocblas/library
|
||||
%{_libdir}/rocblas/library/Kernels*
|
||||
%{_libdir}/rocblas/library/Tensile*
|
||||
%endif
|
||||
|
||||
%endif # ?tensile_package
|
||||
|
||||
%changelog
|
||||
* Wed Aug 27 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-10
|
||||
- Add Fedora copyright
|
||||
|
||||
* Mon Aug 25 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-9
|
||||
- Simplify file removal
|
||||
|
||||
* Wed Aug 20 2025 Egbert Eich <eich@suse.com> - 6.4.2-8
|
||||
- Consoldiate Python module BuildRequires for SUSE.
|
||||
|
||||
* Sat Aug 16 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-7
|
||||
- set default build type to RelWithDebInfo
|
||||
|
||||
* Sat Aug 16 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-6
|
||||
- Use msgpack on SUSE
|
||||
|
||||
* Wed Aug 13 2025 Egbert Eich <eich@suse.com> - 6.4.2-5
|
||||
* Fri Aug 1 2025 Egbert Eich <eich@suse.com> - 6.4.2-5
|
||||
- Fix build and runtime dependencies of test package.
|
||||
|
||||
* Tue Aug 12 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-5
|
||||
- remove roctracer
|
||||
- Use distro appropriate blas libs
|
||||
- Enable Ninja on SUSE and Move bcond_with* settings to the top of spec file.
|
||||
- Add rpmlitrc to suppress erroneous error messages when
|
||||
building tensile module package.
|
||||
- Enable msgpack on SUSE, restructure build requires and build settings.
|
||||
- Consoldiate Python module BuildRequires for SUSE.
|
||||
- Restructure tensile verbosity option.
|
||||
- Fix buildinfo and compiler flags handling for SUSE.
|
||||
- Build and package core library and arch dependent
|
||||
tensile modules separately to parallelize the build.
|
||||
Add: Modify-CMakeLists.txt-files-to-allow-to-build-modules-independently.patch
|
||||
|
||||
* Tue Jul 29 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-4
|
||||
- Remove -mtls-dialect cflag
|
||||
|
||||
Reference in New Issue
Block a user