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:
Sreenivasa Murthy Kolam 2020-09-24 08:49:46 -07:00 committed by GitHub
parent 69d618e90d
commit 6ec3c4d35e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 16 deletions

View File

@ -7,8 +7,8 @@
from spack import *
class Rocclr(CMakePackage):
"""ROCclr is a virtual device interface that compute runtimes interact
class HipRocclr(CMakePackage):
"""Hip-ROCclr is a virtual device interface that compute runtimes interact
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."""

View File

@ -26,7 +26,7 @@ class Hip(CMakePackage):
depends_on('mesa~llvm@18.3:')
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('hsa-rocr-dev@' + ver, type='link', 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)
# 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
# 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):
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))
return (flags, None, None)
@ -92,6 +92,7 @@ def cmake_args(self):
'-DHIP_COMPILER=clang',
'-DHIP_PLATFORM=rocclr',
'-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

View File

@ -28,8 +28,8 @@ class HsaRocrDev(CMakePackage):
depends_on('libelf@0.8:', type='link')
for ver in ['3.5.0', '3.7.0', '3.8.0']:
depends_on('hsakmt-roct@' + ver, type=('link', 'run'), when='@' + ver)
if '@3.7.0:' in ver:
depends_on('llvm-amdgpu@' + ver, type=('link', 'run'), when='@' + ver)
for ver in ['3.7.0', '3.8.0']:
depends_on('llvm-amdgpu@' + ver, type=('link', 'run'), when='@' + ver)
# Both 3.5.0 and 3.7.0 force INSTALL_RPATH in different ways
patch('0001-Do-not-set-an-explicit-rpath-by-default-since-packag.patch', when='@3.5.0')

View File

@ -7,8 +7,8 @@
from spack import *
class Rocgdb(AutotoolsPackage):
"""This is ROCgdb, the ROCm source-level debugger for Linux,
class RocmGdb(AutotoolsPackage):
"""This is ROCmgdb, the ROCm source-level debugger for Linux,
based on GDB, the GNU source-level debugger."""
homepage = "https://github.com/ROCm-Developer-Tools/ROCgdb/"
@ -16,8 +16,10 @@ class Rocgdb(AutotoolsPackage):
maintainers = ['srekolam', 'arjun-raj-kuppala']
version('3.8.0', sha256='a7c11dc30c952587c616bf7769bad603c3bf80522afc8b73ccda5b78d27bed41')
version('3.7.0', sha256='7a29ef584fd7b6c66bb03aaf8ec2f5a8c758370672a28a4d0d95066e5f6fbdc1')
version('3.5.0', sha256='cf36d956e84c7a5711b71f281a44b0a9708e13e941d8fca0247d01567e7ee7d1')
depends_on('cmake@3:', type='build')
depends_on('texinfo', type='build')
depends_on('bison', type='build')
@ -26,7 +28,7 @@ class Rocgdb(AutotoolsPackage):
depends_on('expat', type='build')
depends_on('python', type='build')
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('comgr@' + ver, type='link', when='@' + ver)

View File

@ -25,8 +25,10 @@ def url_for_version(self, version):
depends_on('cmake@3:', type='build')
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']:
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('hsa-rocr-dev@' + ver, type='build', when='@' + ver)
@ -38,7 +40,7 @@ def flag_handler(self, name, flags):
# all the includes...
if name in ('cflags', 'cxxflags'):
rocclr = self.spec['rocclr'].prefix.include
rocclr = self.spec['hip-rocclr'].prefix.include
extra_includes = [
'include',
'compiler/lib',
@ -57,7 +59,8 @@ def cmake_args(self):
args = [
'-DUSE_COMGR_LIBRARY=yes',
'-DROCclr_DIR={0}'.format(self.spec['rocclr'].prefix),
'-DLIBROCclr_STATIC_DIR={0}/lib'.format(self.spec['rocclr'].prefix)
'-DROCclr_DIR={0}'.format(self.spec['hip-rocclr'].prefix),
'-DLIBROCclr_STATIC_DIR={0}/lib'.format
(self.spec['hip-rocclr'].prefix)
]
return args

View File

@ -37,7 +37,7 @@ def setup_build_environment(self, build_env):
depends_on('hip@' + 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('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('hsa-rocr-dev@' + ver, type='link', when='@' + ver)
depends_on('rocminfo@' + ver, type='build', when='@' + ver)