diff options
Diffstat (limited to 'var')
3 files changed, 35 insertions, 9 deletions
diff --git a/var/spack/repos/builtin/packages/miopen-opencl/package.py b/var/spack/repos/builtin/packages/miopen-opencl/package.py index c4c04ba60c..b5c4176bbb 100644 --- a/var/spack/repos/builtin/packages/miopen-opencl/package.py +++ b/var/spack/repos/builtin/packages/miopen-opencl/package.py @@ -11,10 +11,11 @@ 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.7.0.tar.gz" + url = "https://github.com/ROCmSoftwarePlatform/MIOpen/archive/rocm-3.8.0.tar.gz" maintainers = ['srekolam', 'arjun-raj-kuppala'] + version('3.8.0', sha256='612b30d4a967bf18c7fa7aa3ef12ed558314ed04cee2775b842bf6a96cd7276f') version('3.7.0', sha256='f6a6ddd8d39bb76b7f7d91e68ade3b45e0201181145658c43b967065a354b103') version('3.5.0', sha256='aa362e69c4dce7f5751f0ee04c745735ea5454c8101050e9b92cc60fa3c0fb82') @@ -26,15 +27,17 @@ class MiopenOpencl(CMakePackage): depends_on('bzip2', type='link') depends_on('sqlite', type='link') depends_on('half', type='build') - for ver in ['3.5.0', '3.7.0']: + depends_on('miopengemm@1.1.6', type='link', when='@3.5.0') + for ver in ['3.5.0', '3.7.0', '3.8.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) depends_on('hsa-rocr-dev@' + ver, type='link', when='@' + ver) + for ver in ['3.7.0', '3.8.0']: + depends_on('miopengemm@' + ver, type='link', when='@' + ver) def cmake_args(self): args = [ diff --git a/var/spack/repos/builtin/packages/miopengemm/package.py b/var/spack/repos/builtin/packages/miopengemm/package.py index 1bc40504f6..8ffcc2092d 100644 --- a/var/spack/repos/builtin/packages/miopengemm/package.py +++ b/var/spack/repos/builtin/packages/miopengemm/package.py @@ -11,15 +11,25 @@ class Miopengemm(CMakePackage): and kernel generator""" homepage = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM" - url = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM/archive/1.1.6.tar.gz" + url = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM/archive/rocm-3.8.0.tar.gz" maintainers = ['srekolam', 'arjun-raj-kuppala'] + def url_for_version(self, version): + if version == Version('1.1.6'): + return "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM/archive/1.1.6.tar.gz" + url = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM/archive/rocm-{0}.tar.gz" + return url.format(version) + + version('3.8.0', sha256='d76f5b4b3b9d1e3589a92f667f39eab5b5ab54ec3c4e04d412035be3ec623547') + version('3.7.0', sha256='392b280ca564b120f6b24ec1fe8782cba08a8a5fb52938e8bc3dc887d3fd08fa') version('1.1.6', sha256='9ab04903794c6a59432928eaec92c687d51e2b4fd29630cf227cbc49d56dc69b') variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type') depends_on('cmake@3:', type='build') - for ver in ['1.1.6']: - depends_on('rocm-cmake@' + '3.7.0', type='build', when='@' + ver) - depends_on('rocm-opencl@' + '3.7.0', type='build', when='@' + ver) + depends_on('rocm-cmake@3.5.0', type='build', when='@1.1.6') + depends_on('rocm-opencl@3.5.0', type='build', when='@1.1.6') + for ver in ['3.7.0', '3.8.0']: + depends_on('rocm-cmake@' + ver, type='build', when='@' + ver) + depends_on('rocm-opencl@' + ver, type='build', when='@' + ver) diff --git a/var/spack/repos/builtin/packages/rocm-opencl/package.py b/var/spack/repos/builtin/packages/rocm-opencl/package.py index aad5c4c5fb..97d795689f 100644 --- a/var/spack/repos/builtin/packages/rocm-opencl/package.py +++ b/var/spack/repos/builtin/packages/rocm-opencl/package.py @@ -20,6 +20,7 @@ class RocmOpencl(CMakePackage): url = "https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-{0}.tar.gz" return url.format(version) + version('3.8.0', sha256='7f75dd1abf3d771d554b0e7b0a7d915ab5f11a74962c92b013ee044a23c1270a') version('3.7.0', sha256='283e1dfe4c3d2e8af4d677ed3c20e975393cdb0856e3ccd77b9c7ed2a151650b') version('3.5.0', sha256='511b617d5192f2d4893603c1a02402b2ac9556e9806ff09dd2a91d398abf39a0') @@ -27,10 +28,10 @@ class RocmOpencl(CMakePackage): depends_on('mesa~llvm@18.3:', type='link') depends_on('numactl', type='link', when='@3.7.0') - for ver in ['3.5.0', '3.7.0']: + for ver in ['3.5.0', '3.7.0', '3.8.0']: depends_on('hip-rocclr@' + ver, type='build', when='@' + ver) depends_on('comgr@' + ver, type='build', when='@' + ver) - depends_on('hsa-rocr-dev@' + ver, type='build', when='@' + ver) + depends_on('hsa-rocr-dev@' + ver, type='link', when='@' + ver) def flag_handler(self, name, flags): # The includes are messed up in ROCm 3.5.0: @@ -64,3 +65,15 @@ class RocmOpencl(CMakePackage): (self.spec['hip-rocclr'].prefix) ] return args + + def setup_run_environment(self, env): + env.set('OCL_ICD_VENDORS', self.prefix.vendors + '/') + + @run_after('install') + def post_install(self): + vendor_config_path = join_path(self.prefix + '/vendors') + mkdirp(vendor_config_path) + + config_file_name = 'amdocl64_30800.icd' + with open(join_path(vendor_config_path, config_file_name), 'w') as f: + f.write('libamdocl64.so') |