2020-09-05 06:02:33 +08:00
|
|
|
# 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"
|
2020-09-17 23:00:45 +08:00
|
|
|
url = "https://github.com/ROCmSoftwarePlatform/MIOpen/archive/rocm-3.7.0.tar.gz"
|
2020-09-05 06:02:33 +08:00
|
|
|
|
|
|
|
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
|
|
|
|
2020-09-17 23:00:45 +08:00
|
|
|
version('3.7.0', sha256='f6a6ddd8d39bb76b7f7d91e68ade3b45e0201181145658c43b967065a354b103')
|
2020-09-05 06:02:33 +08:00
|
|
|
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')
|
2020-09-24 10:29:47 +08:00
|
|
|
depends_on('pkgconfig', type='build')
|
2020-09-05 06:02:33 +08:00
|
|
|
depends_on('bzip2', type='link')
|
|
|
|
depends_on('sqlite', type='link')
|
|
|
|
depends_on('half', type='build')
|
2020-09-17 23:00:45 +08:00
|
|
|
for ver in ['3.5.0', '3.7.0']:
|
2020-09-05 06:02:33 +08:00
|
|
|
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
|