Added package for the hipTT library (#39388)

This commit is contained in:
Brian Van Essen 2023-08-14 07:11:30 -07:00 committed by GitHub
parent c7cca3aa8d
commit 1673d3e322
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,18 @@
diff --git a/Makefile b/Makefile
index 14a7aae..c7e39f2 100755
--- a/Makefile
+++ b/Makefile
@@ -93,11 +93,11 @@ CUDAROOT = $(subst /bin/,,$(dir $(shell which $(CUDAC))))
#CFLAGS = -I${CUDAROOT}/include -std=c++11 $(DEFS) $(OPTLEV) -fPIC -D__HIP_PLATFORM_NVCC__
CFLAGS = -I${CUDAROOT}/include -std=c++11 $(DEFS) $(OPTLEV) -fPIC -D__HIP_PLATFORM_HCC__ -D__HIP_ROCclr__
ifeq ($(CPU),x86_64)
-CFLAGS += -march=native
+CFLAGS += -march=native -fPIC
endif
#CUDA_CFLAGS = -ccbin $(GPU_CC) -I${CUDAROOT}/include -std=c++11 $(OPTLEV) -Xptxas -dlcm=ca -lineinfo $(GENCODE_FLAGS) --resource-usage -Xcompiler -fPIC -D_FORCE_INLINES -x cu -Wno-deprecated-declarations
-CUDA_CFLAGS = --amdgpu-target=gfx906,gfx908 -std=c++11 $(OPTLEV) -D_FORCE_INLINES
+CUDA_CFLAGS = --amdgpu-target=gfx906,gfx908,gfx90a -std=c++11 $(OPTLEV) -D_FORCE_INLINES -fPIC
ifeq ($(OS),osx)
CUDA_LFLAGS = -L$(CUDAROOT)/lib

View File

@ -0,0 +1,35 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Hiptt(MakefilePackage, ROCmPackage):
"""hipTT - Fast GPU Tensor Transpose for NVIDIA and AMD GPU."""
homepage = "https://github.com/DmitryLyakh/hipTT"
url = "https://github.com/DmitryLyakh/hipTT"
git = "https://github.com/DmitryLyakh/hipTT.git"
tags = ["ecp", "radiuss"]
maintainers("bvanessen")
version("master", branch="master")
patch("bugfix_make.patch")
# To enable this package add it to the LD_LIBRARY_PATH
def setup_dependent_build_environment(self, env, dependent_spec):
hiptt_home = self.spec["hiptt"].prefix
env.prepend_path("cuTT_ROOT", hiptt_home)
env.prepend_path("cuTT_LIBRARY", hiptt_home.lib)
env.prepend_path("cuTT_INCLUDE_PATH", hiptt_home.include)
def install(self, spec, prefix):
mkdir(prefix.bin)
install("bin/cutt_test", prefix.bin)
install("bin/cutt_bench", prefix.bin)
install_tree("lib", prefix.lib)
install_tree("include", prefix.include)

View File

@ -258,6 +258,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage):
depends_on("hwloc@1.11.0:1.11", when="@0.95:0.101 +hwloc")
depends_on("hwloc +cuda +nvml", when="+cuda")
depends_on("hwloc@2.3.0:", when="+rocm")
depends_on("hiptt", when="+rocm")
depends_on("half", when="+half")