diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2022-07-30 15:19:18 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2022-07-31 13:29:20 -0700 |
commit | f52f6e99dbf1131886a80112b8c79dfc414afb7c (patch) | |
tree | 05cb7d64b2395922f2f24683da49f472075be12c /var/spack/repos/builtin/packages/rccl/package.py | |
parent | 549ba1ed32372c67fc57271cde3797d58b7dec6e (diff) | |
download | spack-f52f6e99dbf1131886a80112b8c79dfc414afb7c.tar.gz spack-f52f6e99dbf1131886a80112b8c79dfc414afb7c.tar.bz2 spack-f52f6e99dbf1131886a80112b8c79dfc414afb7c.tar.xz spack-f52f6e99dbf1131886a80112b8c79dfc414afb7c.zip |
black: reformat entire repository with black
Diffstat (limited to 'var/spack/repos/builtin/packages/rccl/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/rccl/package.py | 191 |
1 files changed, 131 insertions, 60 deletions
diff --git a/var/spack/repos/builtin/packages/rccl/package.py b/var/spack/repos/builtin/packages/rccl/package.py index 1acc66fefd..cc2d727d0f 100644 --- a/var/spack/repos/builtin/packages/rccl/package.py +++ b/var/spack/repos/builtin/packages/rccl/package.py @@ -15,82 +15,153 @@ class Rccl(CMakePackage): and reduce-scatter.""" homepage = "https://github.com/ROCmSoftwarePlatform/rccl" - git = "https://github.com/ROCmSoftwarePlatform/rccl.git" - url = "https://github.com/ROCmSoftwarePlatform/rccl/archive/rocm-5.1.3.tar.gz" - tags = ['rocm'] - - maintainers = ['srekolam', 'arjun-raj-kuppala'] - libraries = ['librccl'] - - version('5.1.3', sha256='56491257f27b48bf85f4b91434a2a6e49a448337c889db181b02c8a4a260a4bc') - version('5.1.0', sha256='02b0180857e615326f9cab775573436b9162899ad8e526830f54392b8a51b1f5') - version('5.0.2', sha256='a2377ad2332b93d3443a8ee74f4dd9f965ae8cbbfad473f8f57ca17905389a39') - version('5.0.0', sha256='80eb70243f11b80e215458a67c278cd5a655f6e486289962b92ba3504e50af5c') - version('4.5.2', sha256='36de0d3f3ffad491758d89c208ef72c5be5e0db766053a9c766e9c5c6a33a487') - version('4.5.0', sha256='f806f9f65c490abddc562cb4812e12701582bbb449e41cc4797d00e0dedf084e') - version('4.3.1', sha256='c5db71423dc654e8d2c3111e142e65c89436bc636827d95d41a09a87f44fe246', deprecated=True) - version('4.3.0', sha256='b5231d8c5ab034a583feceebcef68d0cc0b05ec5a683f802fc7747c89f27d5f6', deprecated=True) - version('4.2.0', sha256='2829fae40ebc1d8be201856d2193a941c87e9cf38dca0a2f4414e675c1742f20', deprecated=True) - version('4.1.0', sha256='88ec9b43c31cb054fe6aa28bcc0f4b510213635268f951939d6980eee5bb3680', deprecated=True) - version('4.0.0', sha256='0632a15b3d6b5981c05377cf4aeb51546f4c4901fd7c37fb0c98071851ad531a', deprecated=True) - version('3.10.0', sha256='d9dd0b0d8b9d056fc5e6c7b814520800190952acd30dac3a7c462c4cb6f42bb3', deprecated=True) - version('3.9.0', sha256='ff9d03154d668093309ff814a33788f2cc093b3c627e78e42ae246e6017408b0', deprecated=True) - version('3.8.0', sha256='0b6676d06bdb1f65d511a95db9f842a3443def83d75759dfdf812b5e62d8c910', deprecated=True) - version('3.7.0', sha256='8273878ff71aac2e7adf5cc8562d2933034c6c6b3652f88fbe3cd4f2691036e3', deprecated=True) - version('3.5.0', sha256='290b57a66758dce47d0bfff3f5f8317df24764e858af67f60ddcdcadb9337253', deprecated=True) + git = "https://github.com/ROCmSoftwarePlatform/rccl.git" + url = "https://github.com/ROCmSoftwarePlatform/rccl/archive/rocm-5.1.3.tar.gz" + tags = ["rocm"] + + maintainers = ["srekolam", "arjun-raj-kuppala"] + libraries = ["librccl"] + + version("5.1.3", sha256="56491257f27b48bf85f4b91434a2a6e49a448337c889db181b02c8a4a260a4bc") + version("5.1.0", sha256="02b0180857e615326f9cab775573436b9162899ad8e526830f54392b8a51b1f5") + version("5.0.2", sha256="a2377ad2332b93d3443a8ee74f4dd9f965ae8cbbfad473f8f57ca17905389a39") + version("5.0.0", sha256="80eb70243f11b80e215458a67c278cd5a655f6e486289962b92ba3504e50af5c") + version("4.5.2", sha256="36de0d3f3ffad491758d89c208ef72c5be5e0db766053a9c766e9c5c6a33a487") + version("4.5.0", sha256="f806f9f65c490abddc562cb4812e12701582bbb449e41cc4797d00e0dedf084e") + version( + "4.3.1", + sha256="c5db71423dc654e8d2c3111e142e65c89436bc636827d95d41a09a87f44fe246", + deprecated=True, + ) + version( + "4.3.0", + sha256="b5231d8c5ab034a583feceebcef68d0cc0b05ec5a683f802fc7747c89f27d5f6", + deprecated=True, + ) + version( + "4.2.0", + sha256="2829fae40ebc1d8be201856d2193a941c87e9cf38dca0a2f4414e675c1742f20", + deprecated=True, + ) + version( + "4.1.0", + sha256="88ec9b43c31cb054fe6aa28bcc0f4b510213635268f951939d6980eee5bb3680", + deprecated=True, + ) + version( + "4.0.0", + sha256="0632a15b3d6b5981c05377cf4aeb51546f4c4901fd7c37fb0c98071851ad531a", + deprecated=True, + ) + version( + "3.10.0", + sha256="d9dd0b0d8b9d056fc5e6c7b814520800190952acd30dac3a7c462c4cb6f42bb3", + deprecated=True, + ) + version( + "3.9.0", + sha256="ff9d03154d668093309ff814a33788f2cc093b3c627e78e42ae246e6017408b0", + deprecated=True, + ) + version( + "3.8.0", + sha256="0b6676d06bdb1f65d511a95db9f842a3443def83d75759dfdf812b5e62d8c910", + deprecated=True, + ) + version( + "3.7.0", + sha256="8273878ff71aac2e7adf5cc8562d2933034c6c6b3652f88fbe3cd4f2691036e3", + deprecated=True, + ) + version( + "3.5.0", + sha256="290b57a66758dce47d0bfff3f5f8317df24764e858af67f60ddcdcadb9337253", + deprecated=True, + ) amdgpu_targets = ROCmPackage.amdgpu_targets - variant('amdgpu_target', values=auto_or_any_combination_of(*amdgpu_targets)) - variant('build_type', default='Release', values=("Release", "Debug", "RelWithDebInfo"), description='CMake build type') - - patch('0001-Fix-numactl-path-issue.patch', when='@3.7.0:4.3.2') - patch('0002-Fix-numactl-rocm-smi-path-issue.patch', when='@4.5.0:') - - depends_on('cmake@3.5:', type='build') - for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0', - '4.2.0', '4.3.0', '4.3.1', '4.5.0', '4.5.2', '5.0.0', - '5.0.2', '5.1.0', '5.1.3']: - depends_on('rocm-cmake@%s:' % ver, type='build', when='@' + ver) - depends_on('hip@' + ver, when='@' + ver) - depends_on('comgr@' + ver, when='@' + ver) - depends_on('hsa-rocr-dev@' + ver, when='@' + ver) - - for ver in ['3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0', '4.2.0', - '4.3.0', '4.3.1', '4.5.0', '4.5.2', '5.0.0', '5.0.2', '5.1.0', '5.1.3']: - depends_on('numactl@2:', when='@' + ver) - for ver in ['4.5.0', '4.5.2', '5.0.0', '5.0.2', '5.1.0', '5.1.3']: - depends_on('rocm-smi-lib@' + ver, when='@' + ver) + variant("amdgpu_target", values=auto_or_any_combination_of(*amdgpu_targets)) + variant( + "build_type", + default="Release", + values=("Release", "Debug", "RelWithDebInfo"), + description="CMake build type", + ) + + patch("0001-Fix-numactl-path-issue.patch", when="@3.7.0:4.3.2") + patch("0002-Fix-numactl-rocm-smi-path-issue.patch", when="@4.5.0:") + + depends_on("cmake@3.5:", type="build") + for ver in [ + "3.5.0", + "3.7.0", + "3.8.0", + "3.9.0", + "3.10.0", + "4.0.0", + "4.1.0", + "4.2.0", + "4.3.0", + "4.3.1", + "4.5.0", + "4.5.2", + "5.0.0", + "5.0.2", + "5.1.0", + "5.1.3", + ]: + depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver) + depends_on("hip@" + ver, when="@" + ver) + depends_on("comgr@" + ver, when="@" + ver) + depends_on("hsa-rocr-dev@" + ver, when="@" + ver) + + for ver in [ + "3.7.0", + "3.8.0", + "3.9.0", + "3.10.0", + "4.0.0", + "4.1.0", + "4.2.0", + "4.3.0", + "4.3.1", + "4.5.0", + "4.5.2", + "5.0.0", + "5.0.2", + "5.1.0", + "5.1.3", + ]: + depends_on("numactl@2:", when="@" + ver) + for ver in ["4.5.0", "4.5.2", "5.0.0", "5.0.2", "5.1.0", "5.1.3"]: + depends_on("rocm-smi-lib@" + ver, when="@" + ver) @classmethod def determine_version(cls, lib): - match = re.search(r'lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)', - lib) + match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib) if match: - ver = '{0}.{1}.{2}'.format(int(match.group(1)), - int(match.group(2)), - int(match.group(3))) + ver = "{0}.{1}.{2}".format( + int(match.group(1)), int(match.group(2)), int(match.group(3)) + ) else: ver = None return ver def setup_build_environment(self, env): - env.set('CXX', self.spec['hip'].hipcc) + env.set("CXX", self.spec["hip"].hipcc) def cmake_args(self): args = [] - if '@3.7.0:' in self.spec: - args.append(self.define( - 'NUMACTL_DIR', - self.spec['numactl'].prefix - )) + if "@3.7.0:" in self.spec: + args.append(self.define("NUMACTL_DIR", self.spec["numactl"].prefix)) - if 'auto' not in self.spec.variants['amdgpu_target']: - args.append(self.define_from_variant('AMDGPU_TARGETS', 'amdgpu_target')) + if "auto" not in self.spec.variants["amdgpu_target"]: + args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target")) - if self.spec.satisfies('^cmake@3.21.0:3.21.2'): - args.append(self.define('__skip_rocmclang', 'ON')) + if self.spec.satisfies("^cmake@3.21.0:3.21.2"): + args.append(self.define("__skip_rocmclang", "ON")) - if self.spec.satisfies('@4.5.0:'): - args.append(self.define('ROCM_SMI_DIR', self.spec['rocm-smi-lib'].prefix)) + if self.spec.satisfies("@4.5.0:"): + args.append(self.define("ROCM_SMI_DIR", self.spec["rocm-smi-lib"].prefix)) return args |