renaming of Rocclr ,rocgdb to hip-rocclr and rocm-gdb ,fix build error for rocm-opencl (#18900)
* renaming of rocclr , rocgdb to hip-rocclr and rocm-gdb * fix flake8 errors and fix build error for luma
This commit is contained in:
parent
69d618e90d
commit
6ec3c4d35e
@ -7,8 +7,8 @@
|
|||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
class Rocclr(CMakePackage):
|
class HipRocclr(CMakePackage):
|
||||||
"""ROCclr is a virtual device interface that compute runtimes interact
|
"""Hip-ROCclr is a virtual device interface that compute runtimes interact
|
||||||
with to different backends such as ROCr or PAL This abstraction allows
|
with to different backends such as ROCr or PAL This abstraction allows
|
||||||
runtimes to work on Windows as well as on Linux without much effort."""
|
runtimes to work on Windows as well as on Linux without much effort."""
|
||||||
|
|
@ -26,7 +26,7 @@ class Hip(CMakePackage):
|
|||||||
depends_on('mesa~llvm@18.3:')
|
depends_on('mesa~llvm@18.3:')
|
||||||
|
|
||||||
for ver in ['3.5.0', '3.7.0', '3.8.0']:
|
for ver in ['3.5.0', '3.7.0', '3.8.0']:
|
||||||
depends_on('rocclr@' + ver, type='build', when='@' + ver)
|
depends_on('hip-rocclr@' + ver, type='build', when='@' + ver)
|
||||||
depends_on('hsakmt-roct@' + ver, type='build', when='@' + ver)
|
depends_on('hsakmt-roct@' + ver, type='build', when='@' + ver)
|
||||||
depends_on('hsa-rocr-dev@' + ver, type='link', when='@' + ver)
|
depends_on('hsa-rocr-dev@' + ver, type='link', when='@' + ver)
|
||||||
depends_on('comgr@' + ver, type='build', when='@' + ver)
|
depends_on('comgr@' + ver, type='build', when='@' + ver)
|
||||||
@ -35,7 +35,7 @@ class Hip(CMakePackage):
|
|||||||
depends_on('rocminfo@' + ver, type='build', when='@' + ver)
|
depends_on('rocminfo@' + ver, type='build', when='@' + ver)
|
||||||
|
|
||||||
# Notice: most likely this will only be a hard dependency on 3.7.0
|
# Notice: most likely this will only be a hard dependency on 3.7.0
|
||||||
depends_on('numactl', when='@3.7.0')
|
depends_on('numactl', when='@3.7.0:')
|
||||||
|
|
||||||
# Note: the ROCm ecosystem expects `lib/` and `bin/` folders with symlinks
|
# Note: the ROCm ecosystem expects `lib/` and `bin/` folders with symlinks
|
||||||
# in the parent directory of the package, which is incompatible with spack.
|
# in the parent directory of the package, which is incompatible with spack.
|
||||||
@ -68,7 +68,7 @@ def patch(self):
|
|||||||
|
|
||||||
def flag_handler(self, name, flags):
|
def flag_handler(self, name, flags):
|
||||||
if name == 'cxxflags' and '@3.7.0:' in self.spec:
|
if name == 'cxxflags' and '@3.7.0:' in self.spec:
|
||||||
incl = self.spec['rocclr'].prefix.include
|
incl = self.spec['hip-rocclr'].prefix.include
|
||||||
flags.append('-I {0}/compiler/lib/include'.format(incl))
|
flags.append('-I {0}/compiler/lib/include'.format(incl))
|
||||||
|
|
||||||
return (flags, None, None)
|
return (flags, None, None)
|
||||||
@ -92,6 +92,7 @@ def cmake_args(self):
|
|||||||
'-DHIP_COMPILER=clang',
|
'-DHIP_COMPILER=clang',
|
||||||
'-DHIP_PLATFORM=rocclr',
|
'-DHIP_PLATFORM=rocclr',
|
||||||
'-DHSA_PATH={0}'.format(self.spec['hsa-rocr-dev'].prefix),
|
'-DHSA_PATH={0}'.format(self.spec['hsa-rocr-dev'].prefix),
|
||||||
'-DLIBROCclr_STATIC_DIR={0}/lib'.format(self.spec['rocclr'].prefix)
|
'-DLIBROCclr_STATIC_DIR={0}/lib'.format
|
||||||
|
(self.spec['hip-rocclr'].prefix)
|
||||||
]
|
]
|
||||||
return args
|
return args
|
||||||
|
@ -28,7 +28,7 @@ class HsaRocrDev(CMakePackage):
|
|||||||
depends_on('libelf@0.8:', type='link')
|
depends_on('libelf@0.8:', type='link')
|
||||||
for ver in ['3.5.0', '3.7.0', '3.8.0']:
|
for ver in ['3.5.0', '3.7.0', '3.8.0']:
|
||||||
depends_on('hsakmt-roct@' + ver, type=('link', 'run'), when='@' + ver)
|
depends_on('hsakmt-roct@' + ver, type=('link', 'run'), when='@' + ver)
|
||||||
if '@3.7.0:' in ver:
|
for ver in ['3.7.0', '3.8.0']:
|
||||||
depends_on('llvm-amdgpu@' + ver, type=('link', 'run'), when='@' + ver)
|
depends_on('llvm-amdgpu@' + ver, type=('link', 'run'), when='@' + ver)
|
||||||
|
|
||||||
# Both 3.5.0 and 3.7.0 force INSTALL_RPATH in different ways
|
# Both 3.5.0 and 3.7.0 force INSTALL_RPATH in different ways
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
class Rocgdb(AutotoolsPackage):
|
class RocmGdb(AutotoolsPackage):
|
||||||
"""This is ROCgdb, the ROCm source-level debugger for Linux,
|
"""This is ROCmgdb, the ROCm source-level debugger for Linux,
|
||||||
based on GDB, the GNU source-level debugger."""
|
based on GDB, the GNU source-level debugger."""
|
||||||
|
|
||||||
homepage = "https://github.com/ROCm-Developer-Tools/ROCgdb/"
|
homepage = "https://github.com/ROCm-Developer-Tools/ROCgdb/"
|
||||||
@ -16,8 +16,10 @@ class Rocgdb(AutotoolsPackage):
|
|||||||
|
|
||||||
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
maintainers = ['srekolam', 'arjun-raj-kuppala']
|
||||||
|
|
||||||
|
version('3.8.0', sha256='a7c11dc30c952587c616bf7769bad603c3bf80522afc8b73ccda5b78d27bed41')
|
||||||
version('3.7.0', sha256='7a29ef584fd7b6c66bb03aaf8ec2f5a8c758370672a28a4d0d95066e5f6fbdc1')
|
version('3.7.0', sha256='7a29ef584fd7b6c66bb03aaf8ec2f5a8c758370672a28a4d0d95066e5f6fbdc1')
|
||||||
version('3.5.0', sha256='cf36d956e84c7a5711b71f281a44b0a9708e13e941d8fca0247d01567e7ee7d1')
|
version('3.5.0', sha256='cf36d956e84c7a5711b71f281a44b0a9708e13e941d8fca0247d01567e7ee7d1')
|
||||||
|
|
||||||
depends_on('cmake@3:', type='build')
|
depends_on('cmake@3:', type='build')
|
||||||
depends_on('texinfo', type='build')
|
depends_on('texinfo', type='build')
|
||||||
depends_on('bison', type='build')
|
depends_on('bison', type='build')
|
||||||
@ -26,7 +28,7 @@ class Rocgdb(AutotoolsPackage):
|
|||||||
depends_on('expat', type='build')
|
depends_on('expat', type='build')
|
||||||
depends_on('python', type='build')
|
depends_on('python', type='build')
|
||||||
depends_on('zlib', type='link')
|
depends_on('zlib', type='link')
|
||||||
for ver in ['3.5.0', '3.7.0']:
|
for ver in ['3.5.0', '3.7.0', '3.8.0']:
|
||||||
depends_on('rocm-dbgapi@' + ver, type='link', when='@' + ver)
|
depends_on('rocm-dbgapi@' + ver, type='link', when='@' + ver)
|
||||||
depends_on('comgr@' + ver, type='link', when='@' + ver)
|
depends_on('comgr@' + ver, type='link', when='@' + ver)
|
||||||
|
|
@ -25,8 +25,10 @@ def url_for_version(self, version):
|
|||||||
|
|
||||||
depends_on('cmake@3:', type='build')
|
depends_on('cmake@3:', type='build')
|
||||||
depends_on('mesa~llvm@18.3:', type='link')
|
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']:
|
||||||
depends_on('rocclr@' + ver, type='build', when='@' + ver)
|
depends_on('hip-rocclr@' + ver, type='build', when='@' + ver)
|
||||||
depends_on('comgr@' + 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='build', when='@' + ver)
|
||||||
|
|
||||||
@ -38,7 +40,7 @@ def flag_handler(self, name, flags):
|
|||||||
# all the includes...
|
# all the includes...
|
||||||
|
|
||||||
if name in ('cflags', 'cxxflags'):
|
if name in ('cflags', 'cxxflags'):
|
||||||
rocclr = self.spec['rocclr'].prefix.include
|
rocclr = self.spec['hip-rocclr'].prefix.include
|
||||||
extra_includes = [
|
extra_includes = [
|
||||||
'include',
|
'include',
|
||||||
'compiler/lib',
|
'compiler/lib',
|
||||||
@ -57,7 +59,8 @@ def cmake_args(self):
|
|||||||
|
|
||||||
args = [
|
args = [
|
||||||
'-DUSE_COMGR_LIBRARY=yes',
|
'-DUSE_COMGR_LIBRARY=yes',
|
||||||
'-DROCclr_DIR={0}'.format(self.spec['rocclr'].prefix),
|
'-DROCclr_DIR={0}'.format(self.spec['hip-rocclr'].prefix),
|
||||||
'-DLIBROCclr_STATIC_DIR={0}/lib'.format(self.spec['rocclr'].prefix)
|
'-DLIBROCclr_STATIC_DIR={0}/lib'.format
|
||||||
|
(self.spec['hip-rocclr'].prefix)
|
||||||
]
|
]
|
||||||
return args
|
return args
|
||||||
|
@ -37,7 +37,7 @@ def setup_build_environment(self, build_env):
|
|||||||
depends_on('hip@' + ver, type='build', when='@' + ver)
|
depends_on('hip@' + ver, type='build', when='@' + ver)
|
||||||
depends_on('rocm-device-libs@' + ver, type='build', when='@' + ver)
|
depends_on('rocm-device-libs@' + ver, type='build', when='@' + ver)
|
||||||
depends_on('comgr@' + ver, type='build', when='@' + ver)
|
depends_on('comgr@' + ver, type='build', when='@' + ver)
|
||||||
depends_on('rocclr@' + ver, type='build', when='@' + ver)
|
depends_on('hip-rocclr@' + ver, type='build', when='@' + ver)
|
||||||
depends_on('hsakmt-roct@' + ver, type='build', when='@' + ver)
|
depends_on('hsakmt-roct@' + ver, type='build', when='@' + ver)
|
||||||
depends_on('hsa-rocr-dev@' + ver, type='link', when='@' + ver)
|
depends_on('hsa-rocr-dev@' + ver, type='link', when='@' + ver)
|
||||||
depends_on('rocminfo@' + ver, type='build', when='@' + ver)
|
depends_on('rocminfo@' + ver, type='build', when='@' + ver)
|
||||||
|
Loading…
Reference in New Issue
Block a user