diff options
author | Nichols A. Romero <naromero77@users.noreply.github.com> | 2020-04-07 17:02:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-07 17:02:38 -0500 |
commit | 46bcbac7197e96cc6ddf5ebbec8255eda6a88c46 (patch) | |
tree | 85443753151edb3b4b34c1872321373003f2aebe | |
parent | 36f7def30734297ee1354d7e21ca59dcf6e445cf (diff) | |
download | spack-46bcbac7197e96cc6ddf5ebbec8255eda6a88c46.tar.gz spack-46bcbac7197e96cc6ddf5ebbec8255eda6a88c46.tar.bz2 spack-46bcbac7197e96cc6ddf5ebbec8255eda6a88c46.tar.xz spack-46bcbac7197e96cc6ddf5ebbec8255eda6a88c46.zip |
Make use of Spack's builtin CUDA build system. (#15924)
-rw-r--r-- | var/spack/repos/builtin/packages/llvm/package.py | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 810203a9f0..a05e9e1cb0 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -7,7 +7,7 @@ from spack import * import sys -class Llvm(CMakePackage): +class Llvm(CMakePackage, CudaPackage): """The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Despite its name, LLVM has little to do with traditional virtual machines, though it does provide helpful @@ -57,19 +57,6 @@ class Llvm(CMakePackage): default=True, description="Build the LLVM C/C++/Objective-C compiler frontend", ) - - variant( - "cuda", - default=False, - description="Build LLVM with CUDA, required for nvptx offload", - ) - variant( - "nvptx_offload_ccs", - default="35,60,70,75", - multi=True, - description="NVIDIA compute cabailities to make inlining capable", - ) - variant( "omp_debug", default=False, @@ -256,10 +243,10 @@ class Llvm(CMakePackage): [ "-DCUDA_TOOLKIT_ROOT_DIR:PATH=" + spec["cuda"].prefix, "-DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES={0}".format( - ",".join(spec.variants["nvptx_offload_ccs"].value) + ",".join(spec.variants["cuda_arch"].value) ), "-DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_{0}".format( - spec.variants["nvptx_offload_ccs"].value[-1] + spec.variants["cuda_arch"].value[-1] ), ] ) |