Puppet Class: amd_rocm

Defined in:
modules/amd_rocm/manifests/init.pp

Overview

Class amd_rocm

Deploy AMD's ROCm suite and GPU drivers. rocm.github.io/ROCmInstall.html

Parameters

version

The ROCm version to deploy in digits without dots. The version corresponds to a component in reprepro, so please check the supported versions before setting it. Default: “25”

Parameters:

  • version (String) (defaults to: '25')


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'modules/amd_rocm/manifests/init.pp', line 14

class amd_rocm (
    String $version = '25',
) {

    $supported_versions = ['25', '26', '271', '33']

    if ! ($version in $supported_versions) {
        fail('The version of ROCm requested is not supported or misspelled.')
    }

    if os_version('debian < buster'){
        fail('The class is supported only from Debian Buster onward.')
    }

    # AMD firmwares for GPU cards
    package { 'firmware-amd-graphics':
        ensure => present,
    }

    # Note: the miopen-opencl package is imported
    # in the amd-rocm component, but not listed
    # in the packages below for the following reason:
    # Unpacking miopen-opencl (2.0.0-7a8f787) ...
    # [..]
    # trying to overwrite '/opt/rocm/miopen/bin/MIOpenDriver',
    # which is also in package miopen-hip 2.0.0-7a8f787
    $packages = [
        'hcc',
        'hsa-rocr-dev',
        'hsakmt-roct',
        'miopen-hip',
        'mivisionx',
        'radeontop',
        'rocblas',
        'rocfft',
        'rocm-cmake',
        'rocm-dev',
        'rocm-device-libs',
        'rocm-opencl',
        'rocm-opencl-dev',
        'rocm-utils',
        'rocrand',
        'rocm-smi',
        'rccl',
        'rocm-libs',
    ]

    apt::package_from_component { "amd-rocm${version}":
        component => "thirdparty/amd-rocm${version}",
        packages  => $packages,
    }
}