summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Kumar <46193450+gkathirv@users.noreply.github.com>2020-09-05 03:32:33 +0530
committerGitHub <noreply@github.com>2020-09-04 17:02:33 -0500
commit704fc475e3b303464a8f30b09f305e9a41732d39 (patch)
treead2f9832f817aecfb0fc1f79fdaa2529ce31c678
parent61ae21ee4d4004f277b2587b0de48958dd9e890b (diff)
downloadspack-704fc475e3b303464a8f30b09f305e9a41732d39.tar.gz
spack-704fc475e3b303464a8f30b09f305e9a41732d39.tar.bz2
spack-704fc475e3b303464a8f30b09f305e9a41732d39.tar.xz
spack-704fc475e3b303464a8f30b09f305e9a41732d39.zip
ROCm3.5 miopen recipe (#18442)
* ROCm 3.5 miopen recipe * fixing flake8 issues * cmake variant fix * min support fix * variant possible values
-rw-r--r--var/spack/repos/builtin/packages/miopen-hip/package.py44
-rw-r--r--var/spack/repos/builtin/packages/miopen-opencl/package.py46
2 files changed, 90 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/miopen-hip/package.py b/var/spack/repos/builtin/packages/miopen-hip/package.py
new file mode 100644
index 0000000000..3a3dbf7f4f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/miopen-hip/package.py
@@ -0,0 +1,44 @@
+# Copyright 2013-2020 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 import *
+
+
+class MiopenHip(CMakePackage):
+ """AMD's library for high performance machine learning primitives."""
+
+ homepage = "https://github.com/ROCmSoftwarePlatform/MIOpen"
+ url = "https://github.com/ROCmSoftwarePlatform/MIOpen/archive/rocm-3.5.0.tar.gz"
+
+ maintainers = ['srekolam', 'arjun-raj-kuppala']
+
+ version('3.5.0', sha256='aa362e69c4dce7f5751f0ee04c745735ea5454c8101050e9b92cc60fa3c0fb82')
+
+ variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type')
+
+ depends_on('cmake@3:', type='build')
+ depends_on('boost@1.58.0', type='link')
+ depends_on('pkg-config', type='build')
+ depends_on('bzip2', type='link')
+ depends_on('sqlite', type='link')
+ depends_on('half', type='build')
+ for ver in ['3.5.0']:
+ depends_on('hip@' + ver, type='build', when='@' + ver)
+ depends_on('rocm-cmake@' + ver, type='build', when='@' + ver)
+ depends_on('comgr@' + ver, type='link', when='@' + ver)
+ depends_on('llvm-amdgpu@' + ver, type='build', when='@' + ver)
+ depends_on('rocm-clang-ocl@' + ver, type='build', when='@' + ver)
+ depends_on('rocblas@' + ver, type='link', when='@' + ver)
+ depends_on('rocm-device-libs@' + ver, type='link', when='@' + ver)
+
+ def cmake_args(self):
+ args = [
+ '-DMIOPEN_BACKEND=HIP',
+ '-DCMAKE_CXX_COMPILER={0}/bin/clang++'
+ .format(self.spec['llvm-amdgpu'].prefix),
+ '-DBoost_USE_STATIC_LIBS=Off'
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/miopen-opencl/package.py b/var/spack/repos/builtin/packages/miopen-opencl/package.py
new file mode 100644
index 0000000000..9f41f49126
--- /dev/null
+++ b/var/spack/repos/builtin/packages/miopen-opencl/package.py
@@ -0,0 +1,46 @@
+# Copyright 2013-2020 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 import *
+
+
+class MiopenOpencl(CMakePackage):
+ """AMD's library for high performance machine learning primitives."""
+
+ homepage = "https://github.com/ROCmSoftwarePlatform/MIOpen"
+ url = "https://github.com/ROCmSoftwarePlatform/MIOpen/archive/rocm-3.5.0.tar.gz"
+
+ maintainers = ['srekolam', 'arjun-raj-kuppala']
+
+ version('3.5.0', sha256='aa362e69c4dce7f5751f0ee04c745735ea5454c8101050e9b92cc60fa3c0fb82')
+
+ variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type')
+
+ depends_on('cmake@3:', type='build')
+ depends_on('boost@1.58.0', type='link')
+ depends_on('pkg-config', type='build')
+ depends_on('bzip2', type='link')
+ depends_on('sqlite', type='link')
+ depends_on('half', type='build')
+ for ver in ['3.5.0']:
+ depends_on('hip@' + ver, type='build', when='@' + ver)
+ depends_on('rocm-cmake@' + ver, type='build', when='@' + ver)
+ depends_on('comgr@' + ver, type='link', when='@' + ver)
+ depends_on('llvm-amdgpu@' + ver, type='build', when='@' + ver)
+ depends_on('rocm-opencl@' + ver, type='build', when='@' + ver)
+ depends_on('miopengemm@1.1.6:', type='link', when='@' + ver)
+ depends_on('rocm-device-libs@' + ver, type='link', when='@' + ver)
+
+ def cmake_args(self):
+ args = [
+ '-DMIOPEN_BACKEND=OpenCL',
+ '-DMIOPEN_HIP_COMPILER={0}/bin/clang++'
+ .format(self.spec['llvm-amdgpu'].prefix),
+ '-DHIP_CXX_COMPILER={0}/bin/clang++'
+ .format(self.spec['llvm-amdgpu'].prefix),
+ '-DBoost_USE_STATIC_LIBS=Off'
+ ]
+ return args