AMD ROCm rccl - numa.h issue fix (#19317)
This commit is contained in:
parent
7d546a0145
commit
761348a3af
@ -87,6 +87,17 @@ def filter_sbang(self):
|
||||
]
|
||||
filter_file(match, substitute, *files, **kwargs)
|
||||
|
||||
@run_before('install')
|
||||
def filter_numactl(self):
|
||||
if '@3.7.0:' in self.spec:
|
||||
numactl = self.spec['numactl'].prefix.lib
|
||||
kwargs = {'ignore_absent': False, 'backup': False, 'string': False}
|
||||
|
||||
with working_dir('bin'):
|
||||
match = ' -lnuma'
|
||||
substitute = " -L{numactl} -lnuma".format(numactl=numactl)
|
||||
filter_file(match, substitute, 'hipcc', **kwargs)
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
'-DHIP_COMPILER=clang',
|
||||
|
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3bd1ce0..dc72b16 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -80,6 +80,8 @@ include_directories(src)
|
||||
include_directories(src/include)
|
||||
include_directories(src/collectives)
|
||||
include_directories(src/collectives/device)
|
||||
+include_directories(${NUMACTL_DIR}/include)
|
||||
+link_directories(${NUMACTL_DIR}/lib)
|
||||
|
||||
set(CU_SOURCES
|
||||
src/collectives/device/all_reduce.cu
|
@ -21,13 +21,24 @@ class Rccl(CMakePackage):
|
||||
version('3.7.0', sha256='8273878ff71aac2e7adf5cc8562d2933034c6c6b3652f88fbe3cd4f2691036e3')
|
||||
version('3.5.0', sha256='290b57a66758dce47d0bfff3f5f8317df24764e858af67f60ddcdcadb9337253')
|
||||
|
||||
patch('0001-Fix-numactl-path-issue.patch', when='@3.7.0:')
|
||||
|
||||
depends_on('cmake@3:', type='build')
|
||||
for ver in ['3.5.0', '3.7.0', '3.8.0']:
|
||||
depends_on('rocm-cmake@' + ver, type='build', when='@' + ver)
|
||||
depends_on('hip@' + ver, type='build', when='@' + ver)
|
||||
depends_on('hip@' + ver, type=('build', 'run'), when='@' + ver)
|
||||
depends_on('rocm-device-libs@' + ver, type='build', when='@' + ver)
|
||||
depends_on('comgr@' + ver, type='build', when='@' + ver)
|
||||
depends_on('hsa-rocr-dev@' + ver, type='build', when='@' + ver)
|
||||
if ver in ['3.7.0', '3.8.0']:
|
||||
depends_on('numactl@2.0.12', type=('build', 'link'), when='@' + ver)
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
env.set('CXX', self.spec['hip'].hipcc)
|
||||
|
||||
def cmake_args(self):
|
||||
args = []
|
||||
if '@3.7.0:' in self.spec:
|
||||
numactl_prefix = self.spec['numactl'].prefix
|
||||
args.append('-DNUMACTL_DIR={0}'.format(numactl_prefix))
|
||||
return args
|
||||
|
Loading…
Reference in New Issue
Block a user