|
| 1 | + |
| 2 | + |
| 3 | +easyblock = 'ConfigureMake' |
| 4 | + |
| 5 | +name = 'hwloc' |
| 6 | +version = '2.11.2' |
| 7 | +_rocm_version = '6.4.1' |
| 8 | + |
| 9 | +homepage = 'https://www.open-mpi.org/projects/hwloc/' |
| 10 | + |
| 11 | +description = """ |
| 12 | + The Portable Hardware Locality (hwloc) software package provides a portable |
| 13 | + abstraction (across OS, versions, architectures, ...) of the hierarchical |
| 14 | + topology of modern architectures, including NUMA memory nodes, sockets, shared |
| 15 | + caches, cores and simultaneous multithreading. It also gathers various system |
| 16 | + attributes such as cache and memory information as well as the locality of I/O |
| 17 | + devices such as network interfaces, InfiniBand HCAs or GPUs. It primarily |
| 18 | + aims at helping applications with gathering information about modern computing |
| 19 | + hardware so as to exploit it accordingly and efficiently. |
| 20 | +
|
| 21 | + This provides the ROCm and RSMI plugins for hwloc to discover AMD GPUs. |
| 22 | +""" |
| 23 | + |
| 24 | +toolchain = {'name': 'rocm-compilers', 'version': '19.0.0-ROCm-6.4.1'} |
| 25 | + |
| 26 | +source_urls = ['https://www.open-mpi.org/software/hwloc/v%(version_major_minor)s/downloads/'] |
| 27 | +sources = ['hwloc-%(version)s.tar.gz'] |
| 28 | +checksums = ['866ac8ef07b350a6a2ba0c6826c37d78e8994dcbcd443bdd2b436350de19d540'] |
| 29 | + |
| 30 | +builddependencies = [ |
| 31 | + ('pkgconf', '2.3.0'), |
| 32 | +] |
| 33 | + |
| 34 | +dependencies = [ |
| 35 | + ('HIP', '6.4.1'), |
| 36 | + ('rocm-smi', '7.6.0', f'-ROCm-{_rocm_version}'), |
| 37 | + ('numactl', '2.0.19'), |
| 38 | +] |
| 39 | + |
| 40 | +configopts = ' '.join([ |
| 41 | + '--enable-plugins', |
| 42 | + '--disable-cuda', |
| 43 | + '--disable-nvml', |
| 44 | + '--with-rocm=$EBROOTHIP', |
| 45 | + '--enable-rsmi', |
| 46 | + '--disable-cairo', |
| 47 | + '--disable-opencl', |
| 48 | + '--disable-levelzero', |
| 49 | + '--disable-gl', |
| 50 | + '--disable-libxml2', |
| 51 | + '--disable-pci', |
| 52 | + '--disable-libudev', |
| 53 | +]) |
| 54 | + |
| 55 | +# Build the AMD-specific plugin libraries |
| 56 | +build_cmd = 'cd hwloc && make hwloc_rocm.la hwloc_rsmi.la' |
| 57 | +install_cmd = f'cp hwloc/.libs/hwloc_{{rocm,rsmi}}.{SHLIB_EXT} %(installdir)s' |
| 58 | + |
| 59 | +modextrapaths = { |
| 60 | + 'HWLOC_PLUGINS_PATH': '.', |
| 61 | +} |
| 62 | + |
| 63 | +sanity_check_paths = { |
| 64 | + 'files': [f'hwloc_rocm.{SHLIB_EXT}', f'hwloc_rsmi.{SHLIB_EXT}'], |
| 65 | + 'dirs': [], |
| 66 | +} |
| 67 | + |
| 68 | +# Verify that hwloc can successfully load the new AMD plugins |
| 69 | +sanity_check_commands = [ |
| 70 | + 'HWLOC_COMPONENTS_VERBOSE=1 lstopo 2>&1 | grep %(installdir)s' |
| 71 | +] |
| 72 | + |
| 73 | +moduleclass = 'system' |
0 commit comments