Rocm 3.7 rocm smi (#18522)

* ROCm 3.5 miopen recipe

* fixing flake8 issues

* cmake variant fix

* min support fix

* variant possible values

* ROCm 3.7 support for rocm-smi

* review comments change

* miopen merge conflict resolve

* reverting back from copy_tree to install_tree
This commit is contained in:
Ganesh Kumar 2020-09-09 18:52:40 +05:30 committed by GitHub
parent 290b77fe43
commit a18700a86a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 16 deletions

View file

@ -13,13 +13,15 @@ class RocmSmiLib(CMakePackage):
for applications to monitor and control GPU applications.""" for applications to monitor and control GPU applications."""
homepage = "https://github.com/RadeonOpenCompute/rocm_smi_lib" homepage = "https://github.com/RadeonOpenCompute/rocm_smi_lib"
url = "https://github.com/RadeonOpenCompute/rocm_smi_lib/archive/rocm-3.5.0.tar.gz" url = "https://github.com/RadeonOpenCompute/rocm_smi_lib/archive/rocm-3.7.0.tar.gz"
maintainers = ['srekolam', 'arjun-raj-kuppala'] maintainers = ['srekolam', 'arjun-raj-kuppala']
version('3.7.0', sha256='72d2a3deda0b55a2d92833cd648f50c7cb64f8341b254a0badac0152b26f1391')
version('3.5.0', sha256='a5d2ec3570d018b60524f0e589c4917f03d26578443f94bde27a170c7bb21e6e') version('3.5.0', sha256='a5d2ec3570d018b60524f0e589c4917f03d26578443f94bde27a170c7bb21e6e')
variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type') variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type')
depends_on('cmake@3:', type='build') depends_on('cmake@3:', type='build')
@run_after('install') @run_after('install')

View file

@ -5,7 +5,7 @@
from spack import * from spack import *
from os import popen import os
class RocmSmi(MakefilePackage): class RocmSmi(MakefilePackage):
@ -13,22 +13,21 @@ class RocmSmi(MakefilePackage):
management of your ROCm enabled system""" management of your ROCm enabled system"""
homepage = "https://github.com/RadeonOpenCompute/ROC-smi" homepage = "https://github.com/RadeonOpenCompute/ROC-smi"
url = "https://github.com/RadeonOpenCompute/ROC-smi/archive/rocm-3.5.0.tar.gz" url = "https://github.com/RadeonOpenCompute/ROC-smi/archive/rocm-3.7.0.tar.gz"
maintainers = ['srekolam', 'arjun-raj-kuppala'] maintainers = ['srekolam', 'arjun-raj-kuppala']
version('3.7.0', sha256='4e34b3b4e409bb89677882f47d9988d56bc2d9bb9893f0712c22a4b73789e06a')
version('3.5.0', sha256='4f46e947c415a4ac12b9f6989f15a42afe32551706b4f48476fba3abf92e8e7c') version('3.5.0', sha256='4f46e947c415a4ac12b9f6989f15a42afe32551706b4f48476fba3abf92e8e7c')
variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type') depends_on('python@3:', type='run')
phases = ['edit', 'build'] def install(self, spec, prefix):
filter_file(
@run_after('build') '^#!/usr/bin/python3',
def post_build(self): '#!/usr/bin/env {0}'.format(
popen('cp -R {0}/rocm_smi.py {1}'.format(self.build_directory, prefix)) os.path.basename(self.spec['python'].command.path)),
popen('ln -srf {0}/rocm_smi.py {1}/rocm-smi'.format(prefix, prefix)) 'rocm_smi.py'
)
popen('mkdir -p {0}/smi-test/tests'.format(prefix)) copy('rocm_smi.py', prefix)
popen('cp -R {0}/tests/ {1}/smi-test/'.format(self.build_directory, symlink('rocm_smi.py', prefix.rocm_smi)
prefix))
popen('cp -R {0}/test-rocm-smi.sh {1}/smi-test'.format(
self.build_directory, prefix))