diff options
author | Sreenivasa Murthy Kolam <67086238+srekolam@users.noreply.github.com> | 2023-02-07 04:30:10 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-06 15:00:10 -0800 |
commit | 358cc5ed1a2510d45e7342c651e7cc5d16448357 (patch) | |
tree | c95d8398d16c16c09f78438caee8de31ba0e23d1 /var/spack/repos/builtin/packages/rocmlir/package.py | |
parent | 30b8cfad98fbebd24e4dd59e4ac3a9ebb99b5b4d (diff) | |
download | spack-358cc5ed1a2510d45e7342c651e7cc5d16448357.tar.gz spack-358cc5ed1a2510d45e7342c651e7cc5d16448357.tar.bz2 spack-358cc5ed1a2510d45e7342c651e7cc5d16448357.tar.xz spack-358cc5ed1a2510d45e7342c651e7cc5d16448357.zip |
Update the ROCm packages for ROCm-5.4.0 release. (#35071)
* initial commit for rocm-5.4.0 release
* update the versions for more packages for 5.4.0 release
* update the gallium patch for mesa for libllvm-15 for ROCm-5.4.0 release
* update rocm-openmp-extras and rocwmma recipes for 5.4.0 release
* fix build error for rocfft for 5.4.0
* address review comments for rocfft for 5.4.0 change
* undo the removal of the older patch file
* bump up the version for hipfft for 5.4.0
* fix the failure after the merge with develop
* add recipes updates for 5.4.0 for migraphx.miopen-hip,miopen-opencl
* address the review comments on the mesa patch.update the rdc package for
5.4.0 release
* fix style errors
Diffstat (limited to 'var/spack/repos/builtin/packages/rocmlir/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/rocmlir/package.py | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/rocmlir/package.py b/var/spack/repos/builtin/packages/rocmlir/package.py new file mode 100644 index 0000000000..9442d47ba1 --- /dev/null +++ b/var/spack/repos/builtin/packages/rocmlir/package.py @@ -0,0 +1,68 @@ +# Copyright 2013-2022 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 Rocmlir(CMakePackage): + """This is the repository for a MLIR-based convolution and GEMM kernel generator + targetting AMD hardware. This generator is mainly used from MIOpen and MIGraphX, + but it can be used on a standalone basis.""" + + homepage = "https://github.com/ROCmSoftwarePlatform/rocMLIR" + git = "https://github.com/ROCmSoftwarePlatform/rocMLIR.git" + url = "https://github.com/ROCmSoftwarePlatform/rocMLIR/archive/refs/tags/rocm-5.4.0.tar.gz" + + maintainers = ["srekolam"] + + version("5.4.0", sha256="3823f455ee392118c3281e27d45fa0e5381f3c4070eb4e06ba13bc6b34a90a60") + version("5.3.0", sha256="e8471a13cb39d33adff34730d3162adaa5d20f9544d61a6a94b39b9b5762ad6d") + variant( + "build_type", + default="Release", + values=("Release", "Debug", "RelWithDebInfo"), + description="CMake build type", + ) + + def patch(self): + if self.spec.satisfies("@5.3.0:"): + filter_file( + "${ROCM_PATH}/bin", + self.spec["rocminfo"].prefix.bin, + "external/llvm-project/mlir/lib/ExecutionEngine/CMakeLists.txt", + string=True, + ) + + depends_on("python", type="build") + depends_on("z3", type="link") + depends_on("zlib", type="link") + depends_on("ncurses+termlib", type="link") + depends_on("bzip2") + depends_on("sqlite") + depends_on("half") + depends_on("pkgconfig", type="build") + + for ver in [ + "5.3.0", + "5.4.0", + ]: + depends_on("hip@" + ver, when="@" + ver) + depends_on("llvm-amdgpu@" + ver, when="@" + ver) + depends_on("hsa-rocr-dev@" + ver, when="@" + ver) + depends_on("rocm-cmake@" + ver, type="build", when="@" + ver) + depends_on("rocminfo@" + ver, type="build", when="@" + ver) + + def cmake_args(self): + spec = self.spec + args = [ + self.define( + "CMAKE_CXX_COMPILER", "{0}/bin/clang++".format(spec["llvm-amdgpu"].prefix) + ), + self.define("CMAKE_C_COMPILER", "{0}/bin/clang".format(spec["llvm-amdgpu"].prefix)), + self.define("HIP_PATH", spec["hip"].prefix), + self.define("BUILD_FAT_LIBROCKCOMPILER", "ON"), + ] + return args |