41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
From 08ee1c9743fb707ef230232d3419218d2f147d89 Mon Sep 17 00:00:00 2001
|
|
From: Tom Rix <Tom.Rix@amd.com>
|
|
Date: Sat, 28 Sep 2024 04:24:51 -0700
|
|
Subject: [PATCH] rocsparse offload compress
|
|
|
|
---
|
|
CMakeLists.txt | 1 +
|
|
library/CMakeLists.txt | 4 ++++
|
|
2 files changed, 5 insertions(+)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 1ad198d96f9b..b8f2a76d33ab 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -77,6 +77,7 @@ option(BUILD_MEMSTAT "Build rocSPARSE with memory statistics enabled" OFF)
|
|
option(BUILD_ROCSPARSE_ILP64 "Build rocSPARSE with rocsparse_int equal to int64_t" OFF)
|
|
option(BUILD_COMPRESSED_DBG "Enable compressed debug symbols" ON)
|
|
option(BUILD_WITH_ROCBLAS "Enable building rocSPARSE with rocBLAS" ON)
|
|
+option( BUILD_OFFLOAD_COMPRESS "Build with offload compress?" OFF )
|
|
|
|
# Clients utilize rocsparse fortran API and a fortran compiler
|
|
if( NOT BUILD_FORTRAN_CLIENTS )
|
|
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
|
|
index 9ddc654be565..56dfc873ee99 100644
|
|
--- a/library/CMakeLists.txt
|
|
+++ b/library/CMakeLists.txt
|
|
@@ -73,6 +73,10 @@ add_library(roc::rocsparse ALIAS rocsparse)
|
|
# Target compile options
|
|
target_compile_options(rocsparse PRIVATE -Wno-unused-command-line-argument -Wall)
|
|
|
|
+if ( BUILD_OFFLOAD_COMPRESS )
|
|
+ target_compile_options( rocsparse PRIVATE --offload-compress )
|
|
+endif ()
|
|
+
|
|
# Target include directories
|
|
target_include_directories(rocsparse
|
|
PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/include>
|
|
--
|
|
2.46.0
|
|
|