diff --git a/distro_install_scripts/OpenSUSE/Leap_15/README.md b/distro_install_scripts/OpenSUSE/Leap_15/README.md new file mode 100644 index 0000000..b20e6ae --- /dev/null +++ b/distro_install_scripts/OpenSUSE/Leap_15/README.md @@ -0,0 +1,17 @@ +## Scripts for Installing ROCm on Fedora 29 + +This directory contains directions and scripts for installing ROCm on OpenSUSE Leap 15. +There files for installing are in the following subfolder + +- [./src_install](src_install) will download, build, and install ROCm from source code downloaded from AMD's ROCm GitHub repositories + - These scripts can also be used to build custom versions of any one of the ROCm software packages after installing the rest of the ROCm software system from binary packages. + - These scriptscan also be used to build binary packages of any of the ROCm software. + +Note that the installation mechanisms will, by default, attempt to update system-wide software (such as your kernel) in order to allow ROCm to successfully install. +You will need sudo access in order to complete those steps. +The source code installation method can optionally install all of the user-space components into local folders and thus avoid the need for sudo or root access. + +### ROCm on OpenSUSE Leap 15 is Experimental +Please note that OpenSUSE Leap 15 is not a ROCm platform that AMD officially supports or tests against at this time. +As such, tools that target this distribution should be considered experimental. +Bug reports and pull requests for OpenSUSE Leap 15 are welcome, but AMD does not guarantee any level of support for this setup. diff --git a/distro_install_scripts/OpenSUSE/Leap_15/common b/distro_install_scripts/OpenSUSE/Leap_15/common new file mode 120000 index 0000000..60d3b0a --- /dev/null +++ b/distro_install_scripts/OpenSUSE/Leap_15/common @@ -0,0 +1 @@ +../common \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/Leap_15/src_install/00_prepare_system_opensuse_15.sh b/distro_install_scripts/OpenSUSE/Leap_15/src_install/00_prepare_system_opensuse_15.sh new file mode 120000 index 0000000..409a152 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/Leap_15/src_install/00_prepare_system_opensuse_15.sh @@ -0,0 +1 @@ +../../common/prepare_system_opensuse.sh \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/Leap_15/src_install/01_install_rocm_opensuse_15.sh b/distro_install_scripts/OpenSUSE/Leap_15/src_install/01_install_rocm_opensuse_15.sh new file mode 120000 index 0000000..4dca7ab --- /dev/null +++ b/distro_install_scripts/OpenSUSE/Leap_15/src_install/01_install_rocm_opensuse_15.sh @@ -0,0 +1 @@ +../../common/src_install_rocm.sh \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/Leap_15/src_install/02_setup_rocm_users.sh b/distro_install_scripts/OpenSUSE/Leap_15/src_install/02_setup_rocm_users.sh new file mode 120000 index 0000000..9967af3 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/Leap_15/src_install/02_setup_rocm_users.sh @@ -0,0 +1 @@ +../../common/setup_rocm_users.sh \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/Leap_15/src_install/03_install_rocm_libraries_opensuse_15.sh b/distro_install_scripts/OpenSUSE/Leap_15/src_install/03_install_rocm_libraries_opensuse_15.sh new file mode 120000 index 0000000..10fe3c4 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/Leap_15/src_install/03_install_rocm_libraries_opensuse_15.sh @@ -0,0 +1 @@ +../../common/src_install_rocm_libraries.sh \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/Leap_15/src_install/README.md b/distro_install_scripts/OpenSUSE/Leap_15/src_install/README.md new file mode 100644 index 0000000..7b9a488 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/Leap_15/src_install/README.md @@ -0,0 +1,602 @@ +## Tools to Install ROCm 2.0.0 on OpenSUSE Leap 15 From Source +The scripts in this directory will download, build, and install ROCm 2.0.0 from source on OpenSUSE Leap 15. +These scripts will download the source code for the ROCm software from AMD's public repositories, build the software locally, and install it onto your system in a desired location. +These scripts assume a fresh system install, so, by default, they will attempt to add system-wide packages that are required for building the various ROCm projects. + +- [Directions for Globally Installing ROCm](#directions-for-globally-installing-rocm) + * [Updating the Kernel](#updating-the-kernel) + * [Installing ROCm and ROCm Utilities Globally](#installing-rocm-and-rocm-utilities-globally) + * [Configuring Users to have GPU Access](#configuring-users-to-have-gpu-access) + * [Installing ROCm Libraries Globally](#installing-rocm-libraries-globally) +- [Directions for Locally Installing ROCm](#directions-for-locally-installing-rocm) + * [Install Basic System-Wide Dependencies.](#install-basic-system-wide-dependencies) + * [Installing or Building ROCm and ROCm Utilities Locally](#installing-or-building-rocm-and-rocm-utilities-locally) + * [Configuring Your Account and Environment](#configuring-your-account-and-environment) + * [Installing ROCm Libraries Locally](#installing-rocm-libraries-locally) +- [Directions for Building ROCm Packages](#directions-for-building-rocm-packages) + * [Packaging ROCm and ROCm Utilities](#packaging-rocm-and-rocm-utilities) + * [Packaging ROCm Libraries](#packaging-rocm-libraries) +- [Rebuilding or Customizing a Single Piece of Software](#rebuilding-or-customizing-a-single-piece-of-software) + * [Installing Dependencies](#installing-dependencies) + * [Downloading the Software Package](#downloading-the-software-package) + * [Modifying the Software Package](#modifying-the-software-package) + * [Building the Modified Software Package](#building-the-modified-software-package) + + [Building with Debug Symbols](#building-with-debug-symbols) + * [Testing the Modified Software](#testing-the-modified-software) + +### Directions for Globally Installing ROCm +The following directions will set up a fresh installation of OpenSUSE with ROCm built from public source repositories. +The goal of the scripts run in these directions is to create a software installation that includes the same software and files created from a .rpm package installation of ROCm. +In addition, there are scripts that will perform some of the same system setup commands that are included in the normal ROCm installation directions from . + +#### Updating the Kernel +The following script will prepare the system for ROCm by updating the kernel on your system to its newest version. +This script will ask you for your password, since it attempts to run a number of commands with `sudo` to install software to your system. + +```bash +./00_prepare_system_opensuse_15.sh +``` + +It is recommended that you reboot after running this script. +The script will automatically query the user to ask if it should try to reboot the system after it finishes. +To skip this interactive query, pass "-y" or "-n" on the command line. + +#### Installing ROCm and ROCm Utilities Globally +The following script will install ROCm and the user-land tools and utilities used in ROCm. + +While this script runs, it may sometimes pause to ask you for your password, since it attempts to run a number of commands with `sudo`. +It does this in order to install software globally on your system. +If you want to avoid the need to enter your password at various points throughout the script, you could run the script itself with `sudo`. +This will cause all of the software builds to run with root access, which is not necessarily secure. +You could instead change time amount of time between password requests by modifying the `timestamp_timeout` value in your [sudoers file](https://www.sudo.ws/man/sudoers.man.html). + +```bash +./01_install_rocm_opensuse_15.sh +``` + +This script will install the following software: + +- ROCK kernel drivers (amdgpu and amdkfd) +- ROCt Thunk (kernel/driver interface) +- ROCr user-land runtime +- ROCm OpenCL runtime and compiler +- HCC runtime and compiler +- HIP compiler +- ROCm device-optimized low-level libraries +- ATMI (Asynchronous Task and Memory Interface) runtime +- ROCr debug agent tool +- ROC Profiler tool +- rocm-smi system management tool +- rocminfo system reporting tool +- ROCm bandwidth test tool +- ROCm cmake scripts +- clang-ocl tool to offline compile OpenCL kernels for ROCm +- ROCm code object manager tool + +This script can take a number of optional arguments that may be useful when making a system-wide ROCm installation: + - Options to control the script: + - `b / --build_only` + - This will force the script to only **B**uild the software, but not to install or package it. This can be useful when trying to make code modifications or debug builds. This flag cannot be set with `-g / --get_code_only`. + - `-g / --get_code_only` + - This tells the script to only **G**et the code for this component, but not to do any of the build or install steps. The data will be stored into the directory specified by the `-s / --source_dir` argument. If `-s` is not set when `-g` is set, the script will fail since there is nowhere to store the code. Cannot be passed in with `-b / --build_only`. + - Options for configuring the build and installation: + - `-d / --debug {#}` + - This sets the **D**ebug level to build the ROCm software with. The default is "0", which is release mode with symbols stripped. "1" includes debug symbols and compiler optimizations. "2" is no compiler optimizations and with debug symbols. + - `-i / --input_dir {PATH}` + - This sets the **I**nput path where any ROCm software required to build these packages can be found. For instance, if you only want to build a subset of the ROCm packages because you have already installed ROCm into "/opt/rocm/", then this should be set to /opt/rocm/ (which may differ from your output path). By default, this points to /opt/rocm/, but if you are trying to build ROCm entirely into a different directory, you may want to set this to be the same as the output directory above. + - `-o / --output_dir {PATH}` + - This sets the **O**utput path for the ROCm software to be installed into. By default, the software will be put into "/opt/rocm/". Note that not all ROCm software has been tested outside of this directory structure. + - `-p / --package {PATH}` + - This requests that, rather than just installing the software after building it, the tool instead builds a system-specific package (e.g. deb, rpm) of the software. The package will be stored in this flag's argument. The package's target installation directory will be based on `-o / --output_dir` option. + - After building the package, the script will then attempt to install it onto the system. + - `-s / --source_dir {PATH}` + - This tells the scripts to keep the ROCm **S**ource code in the target location after it is built so that it can be modified and rebuilt later. By default, the scripts will download the source code into temporary directories and delete the source after installing the compiled ROCm software. + - Options for interacting with the script: + - `-y` + - Answer **Y**es to any questions the script will ask, without requiring user interaction. + - `-n` + - Answer **N**o to any questions the script will ask, without requiring user interaction. + +The script will automatically query the user to ask if it should try to run the next script after it finishes. +To skip this interactive query, pass "-y" or "-n" on the command line. + +Note that this will not install the ROCK kernel drivers. +Instead, OpenSUSE Leap 15 uses the drivers included in the upstream Linux kernel. + +#### Configuring Users to have GPU Access +If you want to allow all users on the system to use ROCm GPUs, you may want to run the following script that enables GPU access for all users that will be added from this point on. +It will also add ROCm software into every user's `PATH` environment variable. +This script will ask you for your password, since it attempts to run a number of commands with `sudo` to install software to your system. + +```bash +./02_setup_rocm_users.sh +``` + +If you do not want to enable GPU access for all users on your system, then you can choose to manually set the following things for users who should have GPU access: + + - Add GPU users to the `video` group + - Put the following ROCm binary directories in the user's `PATH` environment variable. This assumes that your ROCm installation directory is `/opt/rocm/` + - `/opt/rocm/bin/` + - `/opt/rocm/opencl/bin/x86_64/` + - If you are not using `/opt/rocm/` as your installation directory, you will need to set the following environment variables for any GPU users: + - `HIP_PLATFORM=hcc` + - `HCC_HOME=${rocm_installation_directory}/hcc/` + - `HSA_PATH=${rocm_installation_directory}/hsa/` + - `ROCM_PATH=${rocm_installation_directory}` + +It is recommended that you reboot after running this script. +The script will automatically query the user to ask if it should try to reboot the system after it finishes. +To skip this interactive query, pass "-y" or "-n" on the command line. + +#### Installing ROCm Libraries Globally +The following script will download, build, and install the ROCm libraries. + +While this script runs, it may sometimes pause to ask you for your password, since it attempts to run a number of commands with `sudo`. +It does this in order to install software globally on your system. +If you want to avoid the need to enter your password at various points throughout the script, you could run the script itself with `sudo`. +This will cause all of the software builds to run with root access, which is not necessarily secure. +You could instead change time amount of time between password requests by modifying the `timestamp_timeout` value in your [sudoers file](https://www.sudo.ws/man/sudoers.man.html). + +```bash +./03_install_rocm_libraries_opensuse_15.sh +``` + +This script will install the following libraries: + + - rocBLAS + - hipBLAS + - rocFFT + - rocRAND + - rocPRIM + - rocSPARSE + - hipSPARSE + - rocALUTION + - MIOpenGEMM + - MIOpen + - This will install the HIP version of MIOpen by default. + - HIP Thrust + - ROCm SMI Lib + - RCCL + +This script can take a number of optional arguments that may be useful when making a system-wide ROCm installation: + - Options to control the script: + - `b / --build_only` + - This will force the script to only **B**uild the software, but not to install or package it. This can be useful when trying to make code modifications or debug builds. This flag cannot be set with `-g / --get_code_only`. + - `-g / --get_code_only` + - This tells the script to only **G**et the code for this component, but not to do any of the build or install steps. The data will be stored into the directory specified by the `-s / --source_dir` argument. If `-s` is not set when `-g` is set, the script will fail since there is nowhere to store the code. Cannot be passed in with `-b / --build_only`. + - Options for configuring the build and installation: + - `-d / --debug {#}` + - This sets the **D**ebug level to build the ROCm software with. The default is "0", which is release mode with symbols stripped. "1" includes debug symbols and compiler optimizations. "2" is no compiler optimizations and with debug symbols. + - `-i / --input_dir {PATH}` + - This sets the **I**nput path where any ROCm software required to build these packages can be found. For instance, if you only want to build a subset of the ROCm packages because you have already installed ROCm into "/opt/rocm/", then this should be set to /opt/rocm/ (which may differ from your output path). By default, this points to /opt/rocm/, but if you are trying to build ROCm entirely into a different directory, you may want to set this to be the same as the output directory above. + - `-o / --output_dir {PATH}` + - This sets the **O**utput path for the ROCm software to be installed into. By default, the software will be put into "/opt/rocm/". Note that not all ROCm software has been tested outside of this directory structure. + - `-p / --package {PATH}` + - This requests that, rather than just installing the software after building it, the tool instead builds a system-specific package (e.g. deb, rpm) of the software. The package will be stored in this flag's argument. The package's target installation directory will be based on `-o / --output_dir` option. + - After building the package, the script will then attempt to install it onto the system. + - `-s / --source_dir {PATH}` + - This tells the scripts to keep the ROCm **S**ource code in the target location after it is built so that it can be modified and rebuilt later. By default, the scripts will download the source code into temporary directories and delete the source after installing the compiled ROCm software. + - Options for interacting with the script: + - `-y` + - Answer **Y**es to any questions the script will ask, without requiring user interaction. + - `-n` + - Answer **N**o to any questions the script will ask, without requiring user interaction. + +### Directions for Locally Installing ROCm +The following directions will set up ROCm into a local installation. +In other words, rather than installing into some system-wide location that can be seen by all users (such as `/opt/rocm/`), these directions will instead download and build ROCm and put the resulting files in a local folder without modifying system-wide configuration parameters or folder. + +This can be useful if you want to build a local ROCm installation for debug, research, or experimentation purposes. +The goal of the scripts run in these directions is to create a software installation that includes the same software and files created from a .rpm package installation of ROCm, except installed to a non-global location. +In addition, there are scripts that will attempt to set up your account (rather than all accounts on the system) to have the right environment variables set to run ROCm. + +Note that these tools will **NOT** install or set up the ROCm kernel driver, as this almost by definition requires system-wide access. +If you want to run ROCm on your system, you must first install system-wide kernel drivers (and other software dependencies). +In addition, any user that wants to use the GPU must be added to the `video` group in order to access the GPU. +These local installation directions to **not** perform this step for you. + +#### Install Basic System-Wide Dependencies. +The following script will optionally install some system-wide dependencies that you will need to run ROCm. +This may be useful if you plan to build and install ROCm to a non-standard location, but you still want it to work later. +If you do not want to install any system-wide dependencies, you can skip this step. + +```bash +./00_prepare_system_opensuse_15.sh -r +``` + +The `-r / --required` flag asks this script to install any required dependencies that would normally be needed if you ran this script to perform a system-wide software installation. +It will not, however, update the kernel or other system-wide software as would normally be done for a system-wide software installation. + +#### Installing or Building ROCm and ROCm Utilities Locally +The following scripts will build ROCm and the user-land tools and utilities used in ROCm. +These will be installed into a local directory or built into a package, and system-wide settings will not be changed. + +To begin with, you may need to install system-wide software dependencies to even build ROCm. +This *will* require making some system-wide changes. +But, for instance, you need proper compilers and libraries installed on your system to even build ROCm. +These dependencies can be installed by running: + +```bash +./01_install_rocm_opensuse_15.sh -r +``` + +After installing all of the system-wide dependencies, you can download, build, and install ROCm and its utilities to a local destination with the following command: + +```bash +./01_install_rocm_opensuse_15.sh -l -i {rocm_installation_directory} -o {rocm_installation_directory} +``` + +This script will install the following software: + +- ROCK kernel drivers (amdgpu and amdkfd) +- ROCt Thunk (kernel/driver interface) +- ROCr user-land runtime +- ROCm OpenCL runtime and compiler +- HCC runtime and compiler +- HIP compiler +- ROCm device-optimized low-level libraries +- ATMI (Asynchronous Task and Memory Interface) runtime +- ROCr debug agent tool +- ROC Profiler tool +- rocm-smi system management tool +- rocminfo system reporting tool +- ROCm bandwidth test tool +- ROCm cmake scripts +- clang-ocl tool to offline compile OpenCL kernels for ROCm +- ROCm code object manager tool + +This script can take a number of optional arguments that may be useful when making a system-wide ROCm installation: + - Options to control the script: + - `b / --build_only` + - This will force the script to only **B**uild the software, but not to install or package it. This can be useful when trying to make code modifications or debug builds. This flag cannot be set with `-g / --get_code_only`. + - `-g / --get_code_only` + - This tells the script to only **G**et the code for this component, but not to do any of the build or install steps. The data will be stored into the directory specified by the `-s / --source_dir` argument. If `-s` is not set when `-g` is set, the script will fail since there is nowhere to store the code. Cannot be passed in with `-b / --build_only`. + - `r / --required` + - This will force the system-wide installation of any **R**equired software or packages needed for the software to that will be built. This can be used at the same time as `-g / --get_code_only` + - Options for configuring the build and installation: + - `-d / --debug {#}` + - This sets the **D**ebug level to build the ROCm software with. The default is "0", which is release mode with symbols stripped. "1" includes debug symbols and compiler optimizations. "2" is no compiler optimizations and with debug symbols. + - `-i / --input_dir {PATH}` + - This sets the **I**nput path where any ROCm software required to build these packages can be found. For instance, if you only want to build a subset of the ROCm packages because you have already installed ROCm into "/opt/rocm/", then this should be set to /opt/rocm/ (which may differ from your output path). By default, this points to /opt/rocm/, but if you are trying to build ROCm entirely into a different directory, you may want to set this to be the same as the output directory above. + - `-o / --output_dir {PATH}` + - This sets the **O**utput path for the ROCm software to be installed into. By default, the software will be put into "/opt/rocm/". Note that not all ROCm software has been tested outside of this directory structure. + - `-p / --package {PATH}` + - This requests that, rather than just installing the software after building it, the tool instead builds a system-specific package (e.g. deb, rpm) of the software. The package will be stored in this flag's argument. The package's target installation directory will be based on `-o / --output_dir` option. + - `-s / --source_dir {PATH}` + - This tells the scripts to keep the ROCm **S**ource code in the target location after it is built so that it can be modified and rebuilt later. By default, the scripts will download the source code into temporary directories and delete the source after installing the compiled ROCm software. + - Options for interacting with the script: + - `-y` + - Answer **Y**es to any questions the script will ask, without requiring user interaction. + - `-n` + - Answer **N**o to any questions the script will ask, without requiring user interaction. + +The script will automatically query the user to ask if it should try to run the next script after it finishes. +To skip this interactive query, pass "-y" or "-n" on the command line. + +#### Configuring Your Account and Environment +Running ROCm software requires some environment variables to be set so that binaries and libraries can be found when you try to run GPU-using software. +This script will add these proper environment variables into your local account (your `~/.bash_profile`) to ease the use of ROCm software. + +Note that this script will **not** add your account into the `video` group. +This is required to use ROCm, and these local installation scripts do not do this. + +```bash +./02_setup_rocm_users.sh -l -o {rocm_installation_directory} +``` +#### Installing ROCm Libraries Locally +The following script will download, build, and install the ROCm libraries. +These will be installed into a local directory and system-wide settings will not be changed. + +To begin with, you may need to install system-wide software dependencies that are required to build these libraries. +This *will* require making some system-wide changes. +But, for instance, you need proper compilers and dependencies installed to build some of these libraries. +These dependencies can be installed by running: + +```bash +./03_install_rocm_libraries_opensuse_15.sh -r +``` + +After installing all of the system-wide dependencies, you can download, build, and install the ROCm libraries to a local destination with the following command: + +```bash +./03_install_rocm_libraries_opensuse_15.sh -l -i ${rocm_installation_directory} -o {rocm_installation_directory} +``` + +This script will install the following libraries: + + - rocBLAS + - hipBLAS + - rocFFT + - rocRAND + - rocSPARSE + - hipSPARSE + - rocALUTION + - MIOpenGEMM + - MIOpen + - This will install the HIP version of MIOpen by default. + - HIP Thrust + - ROCm SMI Lib + - RCCL + +This script can take a number of optional arguments that may be useful when making a system-wide ROCm installation: + - Options to control the script: + - `b / --build_only` + - This will force the script to only **B**uild the software, but not to install or package it. This can be useful when trying to make code modifications or debug builds. This flag cannot be set with `-g / --get_code_only`. + - `-g / --get_code_only` + - This tells the script to only **G**et the code for this component, but not to do any of the build or install steps. The data will be stored into the directory specified by the `-s / --source_dir` argument. If `-s` is not set when `-g` is set, the script will fail since there is nowhere to store the code. Cannot be passed in with `-b / --build_only`. + - `r / --required` + - This will force the system-wide installation of any **R**equired software or packages needed for the software to that will be built. This can be used at the same time as `-g / --get_code_only` + - Options for configuring the build and installation: + - `-d / --debug {#}` + - This sets the **D**ebug level to build the ROCm software with. The default is "0", which is release mode with symbols stripped. "1" includes debug symbols and compiler optimizations. "2" is no compiler optimizations and with debug symbols. + - `-i / --input_dir {PATH}` + - This sets the **I**nput path where any ROCm software required to build these packages can be found. For instance, if you only want to build a subset of the ROCm packages because you have already installed ROCm into "/opt/rocm/", then this should be set to /opt/rocm/ (which may differ from your output path). By default, this points to /opt/rocm/, but if you are trying to build ROCm entirely into a different directory, you may want to set this to be the same as the output directory above. + - `-o / --output_dir {PATH}` + - This sets the **O**utput path for the ROCm software to be installed into. By default, the software will be put into "/opt/rocm/". Note that not all ROCm software has been tested outside of this directory structure. + - `-p / --package {PATH}` + - This requests that, rather than just installing the software after building it, the tool instead builds a system-specific package (e.g. deb, rpm) of the software. The package will be stored in this flag's argument. The package's target installation directory will be based on `-o / --output_dir` option. + - After building the package, the script will then attempt to install it onto the system. + - `-s / --source_dir {PATH}` + - This tells the scripts to keep the ROCm **S**ource code in the target location after it is built so that it can be modified and rebuilt later. By default, the scripts will download the source code into temporary directories and delete the source after installing the compiled ROCm software. + - Options for interacting with the script: + - `-y` + - Answer **Y**es to any questions the script will ask, without requiring user interaction. + - `-n` + - Answer **N**o to any questions the script will ask, without requiring user interaction. + +### Directions for Building ROCm Packages +Besides building and immediately installing ROCm, these scripts can also be used to make ROCm binary packages (e.g., .deb and .rpm files). +This can be useful if you want to build and deploy custom versions of ROCm without needing to rebuild on each machine, or if you want to make sure any packages with dependencies on ROCm software are correctly handled by your package manager. +Building and installing from packages can also allow users to mix custom-build versions of ROCm tools with other tools installed from AMD's binary repositories without causing package manger dependency problems. + +Some ROCm software builds require other ROCm software to be installed. +For example, the user-level libraries like rocBLAS are compiled using HIP and HCC. +As such, it is recommended that you either install ROCm from these packages as you build them (by not passing in the `-l / --local` option) or that you first install ROCm and then build these packages. + +#### Packaging ROCm and ROCm Utilities +The following scripts will build and package ROCm and the user-land tools and utilities used in ROCm. +These packages will be configured to install into a user-desired location with the `-o / --output_dir` option). +The packages themselves will be saved into a separate user-defined location through the argument to the `-p / --package` option. +In addition, these packages will be automatically installed on the local system after they are built if the `-l / --local` option is not passed. +If you do not wish to install these packages on your system, pass the `-l / --local` option when building the packages. + +To begin with, you may need to install system-wide software dependencies needed to build ROCm software. +These dependencies can be installed by running: + +```bash +./01_install_rocm_opensuse_15.sh -r +``` + +After installing all of the system-wide dependencies, you can download, build, and package ROCm and its utilities to a local destination with the following command: + +```bash +./01_install_rocm_opensuse_15.sh -p {directory_to_store_packages} -o {rocm_installation_directory} +``` + +This script will build and package the following software: + +- ROCK kernel drivers (amdgpu and amdkfd) +- ROCt Thunk (kernel/driver interface) +- ROCr user-land runtime +- ROCm OpenCL runtime and compiler +- HCC runtime and compiler +- HIP compiler +- ROCm device-optimized low-level libraries +- ATMI (Asynchronous Task and Memory Interface) runtime +- ROCr debug agent tool +- ROC Profiler tool +- rocm-smi system management tool +- rocminfo system reporting tool +- ROCm bandwidth test tool +- ROCm cmake scripts +- clang-ocl tool to offline compile OpenCL kernels for ROCm +- ROCm code object manager tool + +This script can take a number of optional arguments that may be useful when making a system-wide ROCm installation: + - Options to control the script: + - `b / --build_only` + - This will force the script to only **B**uild the software, but not to install or package it. This can be useful when trying to make code modifications or debug builds. This flag cannot be set with `-g / --get_code_only`. + - `-g / --get_code_only` + - This tells the script to only **G**et the code for this component, but not to do any of the build or install steps. The data will be stored into the directory specified by the `-s / --source_dir` argument. If `-s` is not set when `-g` is set, the script will fail since there is nowhere to store the code. Cannot be passed in with `-b / --build_only`. + - `-l / --local` + - Setting this flag will cause the scripts to attempt to build the package, but the script will not try to install the package afterwards. + - If you do not set the flag, each package that is built will then subsequently be installed on your system. + - Options for configuring the build and packaging: + - `-d / --debug {#}` + - This sets the **D**ebug level to build the ROCm software with. The default is "0", which is release mode with symbols stripped. "1" includes debug symbols and compiler optimizations. "2" is no compiler optimizations and with debug symbols. + - `-i / --input_dir {PATH}` + - This sets the **I**nput path where any ROCm software required to build these packages can be found. For instance, if you only want to build a subset of the ROCm packages because you have already installed ROCm into "/opt/rocm/", then this should be set to /opt/rocm/ (which may differ from your output path). By default, this points to /opt/rocm/, but if you are trying to build ROCm entirely into a different directory, you may want to set this to be the same as the output directory above. + - `-o / --output_dir {PATH}` + - This sets the **O**utput path for the ROCm software to be installed into. The binary package that is built will install into this location. By default, the software will be targeted at "/opt/rocm/". Note that not all ROCm software has been tested outside of this directory structure. + - `-s / --source_dir {PATH}` + - This tells the scripts to keep the ROCm **S**ource code in the target location after it is built so that it can be modified and rebuilt later. By default, the scripts will download the source code into temporary directories and delete the source after installing the compiled ROCm software. + - Options for interacting with the script: + - `-y` + - Answer **Y**es to any questions the script will ask, without requiring user interaction. + - `-n` + - Answer **N**o to any questions the script will ask, without requiring user interaction. + +#### Packaging ROCm Libraries +The following script will build and package the ROCm libraries. +These packages will be configured to install into a user-desired location with the `-o / --output_dir` option). +The packages themselves will be saved into a separate user-defined location through the argument to the `-p / --package` option. +In addition, these packages will be automatically installed on the local system after they are built if the `-l / --local` option is not passed. +If you do not wish to install these packages on your system, pass the `-l / --local` option when building the packages. + +To begin with, you may need to install system-wide software dependencies needed to build ROCm software. +These dependencies can be installed by running: + +```bash +./03_install_rocm_libraries_opensuse_15.sh -r +``` + +After installing all of the system-wide dependencies, you can download, build, and package the ROCm libraries to a local destination with the following command: + +```bash +./03_install_rocm_libraries_opensuse_15.sh -p {directory_to_store_packages} -o {rocm_installation_directory} +``` + +This script will install the following libraries: + + - rocBLAS + - hipBLAS + - rocFFT + - rocRAND + - rocSPARSE + - hipSPARSE + - rocALUTION + - MIOpenGEMM + - MIOpen + - This will install the HIP version of MIOpen by default. + - HIP Thrust + - ROCm SMI Lib + - RCCL + +This script can take a number of optional arguments that may be useful when making a system-wide ROCm installation: + - Options to control the script: + - `b / --build_only` + - This will force the script to only **B**uild the software, but not to install or package it. This can be useful when trying to make code modifications or debug builds. This flag cannot be set with `-g / --get_code_only`. + - `-g / --get_code_only` + - This tells the script to only **G**et the code for this component, but not to do any of the build or install steps. The data will be stored into the directory specified by the `-s / --source_dir` argument. If `-s` is not set when `-g` is set, the script will fail since there is nowhere to store the code. Cannot be passed in with `-b / --build_only`. + - `-l / --local` + - Setting this flag will cause the scripts to attempt to build the package, but the script will not try to install the package afterwards. + - If you do not set the flag, each package that is built will then subsequently be installed on your system. + - Options for configuring the build and packaging: + - `-d / --debug {#}` + - This sets the **D**ebug level to build the ROCm software with. The default is "0", which is release mode with symbols stripped. "1" includes debug symbols and compiler optimizations. "2" is no compiler optimizations and with debug symbols. + - `-i / --input_dir {PATH}` + - This sets the **I**nput path where any ROCm software required to build these packages can be found. For instance, if you only want to build a subset of the ROCm packages because you have already installed ROCm into "/opt/rocm/", then this should be set to /opt/rocm/ (which may differ from your output path). By default, this points to /opt/rocm/, but if you are trying to build ROCm entirely into a different directory, you may want to set this to be the same as the output directory above. + - `-o / --output_dir {PATH}` + - This sets the **O**utput path for the ROCm software to be installed into. The binary package that is built will install into this location. By default, the software will be targeted at "/opt/rocm/". Note that not all ROCm software has been tested outside of this directory structure. + - `-s / --source_dir {PATH}` + - This tells the scripts to keep the ROCm **S**ource code in the target location after it is built so that it can be modified and rebuilt later. By default, the scripts will download the source code into temporary directories and delete the source after installing the compiled ROCm software. + - Options for interacting with the script: + - `-y` + - Answer **Y**es to any questions the script will ask, without requiring user interaction. + - `-n` + - Answer **N**o to any questions the script will ask, without requiring user interaction. + +### Rebuilding or Customizing a Single Piece of Software +One of the benefits of building ROCm software from source is that you can make modifications to software in order to fix bugs, test new ideas, experiment, add new features, or build with debug symbols. +This section will demonstrate how to use these scripts to make small custom modifications to a piece of software in the ROCm stack and then build it for your own use. + +This section assumes that you have a ROCm 2.0.0 installation in the default `/opt/rocm/` location, though the directions would also work if you have ROCm installed into some other custom location. + +The running example will show you how to make a custom version of the ROCr runtime which sits at the base of all ROCm software. +We will modify ROCr so that it prints a debug message to the screen whenever it is initialized. + +#### Installing Dependencies +The installation scripts for each of the ROCm software packages can be found in the `./component_scripts/` directory. +These scripts can be used to download the source code for the software, install any system-wide dependencies, build the software, and install it. + +Before downloading, modifying, or building any component, we need to install any dependencies. +For example, most of the ROCm source code is downloaded with the `git` utility, which may not yet be installed on your system. + +In this example, we want to make a small modification to the ROCr runtime. +To install its dependencies, first run: +```bash +./component_scripts/01_02_rocr.sh -r +``` + +The `-r` flag (which can alternately be passed as `--required`) will install any required software for this package. + +#### Downloading the Software Package +The next step in making a customization to some ROCm software is to download the source code. +Again, we are making a small modification to the ROCr runtime. +To download this software into the `~/rocm_source/` directory, use the following command: + +```bash +./component_scripts/01_02_rocr.sh -g -s ~/rocm_source/ +``` + +The `-g` flag (which can alternately be passed as `--get_code_only`) will cause this script to download ROCr without attempting to build it. +The destination directory, into which ROCr will be downloaded, is controlled by the `-s` flag (which can also be passed as `--source_dir`). + +#### Modifying the Software Package +With the source code downloaded, the next step is to make any desired modifications to the software. +In this case, we would like to add a small debug printout whenever the ROCr runtime is initialized. + +In this case, the ROCr runtime is initialized with the function `hsa_init()`, which can be found in the file `~/rocm_source/ROCR-Runtime/src/core/runtime/hsa.cpp` + +We can make the following modifications to cause a printout whenever the initialization function is called: +```patch +--- a/src/core/runtime/hsa.cpp ++++ b/src/core/runtime/hsa.cpp +@@ -204,6 +204,7 @@ namespace HSA { + // Init/Shutdown routines + //---------------------------------------------------------------------------// + hsa_status_t hsa_init() { ++ printf("Attempting to initialize ROCr!\n"); + TRY; + return core::Runtime::runtime_singleton_->Acquire(); + CATCH; +``` + +#### Building the Modified Software Package +With the modification complete, we must next build the software. +In this example, we will build our customized ROCr and put the resulting binaries into the directory `~/custom_rocm/` + +```bash +./component_scripts/01_02_rocr.sh -l -s ~/rocm_source/ -i /opt/rocm/ -o ~/custom_rocm/ +``` + +The `-s` flag (which can also be passed as `--source_dir`) points the script towards the location of our modification source code. +It will then build that modified source code and output it into the directory pointed to be the `-o` flag (which can alternately be passed as `--output_dir`). + +The `-i` flag (which can be passed as `--input_dir`) should point to your normal ROCm installation directory. +This is used to handle the dependencies on other ROCm software. +For instance, the ROCr runtime we are building here depends on the ROCt Thunk that is installed as part of ROCm. +If you already have a full ROCm installation in `/opt/rocm/` then you can simply pass in `-i /opt/rocm/`. +However, if you installed ROCm into a non-standard location, you should pass that location in with the `-i` flag. + +The `-l` flag (which can be passed as `--local` tells the script that you are not trying to install the resulting software into a system-wide location (and thus it will not try to call `sudo`). +If your output directory is something like `/opt/rocm`, you should not pass the `-l` flag. + +##### Building with Debug Symbols +Note that this is also a good time to decide if you want to build your custom software with debug symbols (to help with debugging any problems that may come up). +By default, software will be built in Release mode with symbols stripped to reduce binary size. + +If you would like to build your software in debug mode, just pass in `-d 1` or `-d 2`. +The former will build with compiler optimizations and debug symbols (RelWithDebInfo mode), while the latter will build without optimizations but with symbols (Debug mode). + +#### Testing the Modified Software +After the above script has finished, your software should now be installed into `~/custom_rocm/`. +The ROCr runtime installs a number of headers into the directory `~/custom_rocm/include/` directory, and its main library into `~/custom_rocm/hsa/lib/`. + +To test the modified ROCr runtime, we need to point new applications towards it. +ROCr is a shared library, and the environment variable `LD_LIBRARY_PATH` can be used to point applications towards new shared libraries instead of the ones normally found in system-defined paths. + +First, let's look at a ROCm application that uses the default ROCr runtime. +`rocminfo` is an application that prints out information about the ROCm hardware on your system. + +If we look at the output of the `ldd` command, we can see that it normally loads the ROCr runtime (`libhsa-runtime64.so.1`) from the system installation `/opt/rocm/hsa/lib/libhsa-runtime64.so.1`: + +```bash +$ ldd /opt/rocm/bin/rocminfo + linux-vdso.so.1 (0x00007ffff7ffa000) + libhsa-runtime64.so.1 => /opt/rocm/hsa/lib/libhsa-runtime64.so.1 (0x00007ffff7b24000) +... +``` + +When we run this application, it prints out information as normal: +```bash +$ /opt/rocm/bin/rocminfo +===================== +HSA System Attributes +===================== +Runtime Version: 1.1 +``` + +If we set the `LD_LIBRARY_PATH` environment variable to point towards our modified ROCr runtime library, we should see a different output: +```bash +$ LD_LIBRARY_PATH=~/custom_rocm/hsa/lib/ ldd /opt/rocm/bin/rocminfo + linux-vdso.so.1 (0x00007ffff7ffa000) + libhsa-runtime64.so.1 => /home/testuser/hsa/lib/libhsa-runtime64.so.1 (0x00007ffff7b24000) +... +$ LD_LIBRARY_PATH=~/custom_rocm/hsa/lib/ /opt/rocm/bin/rocminfo +Attempting to initialize ROCr! +===================== +HSA System Attributes +===================== +Runtime Version: 1.1 +``` diff --git a/distro_install_scripts/OpenSUSE/Leap_15/src_install/common b/distro_install_scripts/OpenSUSE/Leap_15/src_install/common new file mode 120000 index 0000000..60d3b0a --- /dev/null +++ b/distro_install_scripts/OpenSUSE/Leap_15/src_install/common @@ -0,0 +1 @@ +../common \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/Leap_15/src_install/component_scripts b/distro_install_scripts/OpenSUSE/Leap_15/src_install/component_scripts new file mode 120000 index 0000000..6e853dc --- /dev/null +++ b/distro_install_scripts/OpenSUSE/Leap_15/src_install/component_scripts @@ -0,0 +1 @@ +../common/component_scripts \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/README.md b/distro_install_scripts/OpenSUSE/README.md new file mode 100644 index 0000000..f15383c --- /dev/null +++ b/distro_install_scripts/OpenSUSE/README.md @@ -0,0 +1,14 @@ +## Scripts for Installing ROCm on OpenSUSE + +This directory contains directions and scripts for installing ROCm on various versions of OpenSUSE. +Each folder has scripts for installing ROCm on a particular version of Fedora; these scripts can be used to install from AMD's binary files or to build, install ROCm from AMD's source distributions, and build binary packages. + +At this time, these tools have been tested on: + +- [Leap 15](Leap_15)† + +†Distributions marked with this symbol are not targets that AMD officially supports or tests against. +As such, tools that target such distributions should be considered experimental. +Bug reports and pull requests for these distros are welcome, but AMD does not guarantee any level of support for them. + +The folder `common` contains scripts that are common between multiple OpenSUSE versions and can be safely ignored if you want to directly run the installation or build scripts. diff --git a/distro_install_scripts/OpenSUSE/common/common_options.sh b/distro_install_scripts/OpenSUSE/common/common_options.sh new file mode 120000 index 0000000..38491b7 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/common_options.sh @@ -0,0 +1 @@ +../../shared_files/common_options.sh \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_00_rock-dkms.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_00_rock-dkms.sh new file mode 100755 index 0000000..29278eb --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_00_rock-dkms.sh @@ -0,0 +1,186 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. We need DKMS for installing and building the driver. +# If getting the driver source by extracting the RPM, we will need wget +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build ROCK kernel driver." + echo "You will need to have root privileges to do this." + sudo zypper -n in kernel-devel dkms wget xz +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR}/rock/ + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR} ]; then + rm -rf ${SOURCE_DIR} + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} +mkdir -p install_files/ + +# Download rocm-dkms source code +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/install_files/usr/ ]; then + echo "Downloading ROCK kernel drivers." + # One way to download this is to get the already-packaged DKMS and extract + # the source code from it. Unlike the rest of the ROCm packages, the kernel + # driver package actually includes the source code, since DKMS modules are + # rebuilt every time the kernel is updated. + #cd ${SOURCE_DIR}/install_files/ + #wget http://repo.radeon.com/rocm/yum/rpm/rock-dkms-2.0-89.noarch.rpm + #rpm2cpio rock-dkms-2.0-89.noarch.rpm | cpio -idm + # However, this work below gets our source from github and "recreates" the + # package. These build scripts carry some of the DKMS files with them + # so you don't need to download the entire thing from repo.radeon.com + cd ${SOURCE_DIR}/ + git clone --branch ${ROCM_VERSION_BRANCH} --single-branch --depth 1 https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver.git + cd ${SOURCE_DIR}/ROCK-Kernel-Driver + git fetch --depth=1 origin "+refs/${ROCM_ROCK_CHECKOUT}:refs/${ROCM_ROCK_CHECKOUT}" + git checkout ${ROCM_ROCK_CHECKOUT} + + cd ${SOURCE_DIR}/install_files/ + pushd ${BASE_DIR}/rock_files/ + cp -RL ./* ${SOURCE_DIR}/install_files/ + popd + + cd ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/ + cp -R ${SOURCE_DIR}/ROCK-Kernel-Driver/drivers/gpu/drm/amd ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/ + cd ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/ + tar -xJf ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/firmware.tar.xz + cd ${SOURCE_DIR}/install_files/ + mkdir -p ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/include/drm/ttm + for file in amd_rdma.h gpu_scheduler.h spsc_queue.h; do + cp ${SOURCE_DIR}/ROCK-Kernel-Driver/include/drm/${file} ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/include/drm/ + done + cp ${SOURCE_DIR}/ROCK-Kernel-Driver/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/include/drm/ + cp ${SOURCE_DIR}/ROCK-Kernel-Driver/include/drm/ttm/* ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/include/drm/ttm/ + mkdir -p ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/include/kcl + cp ${SOURCE_DIR}/ROCK-Kernel-Driver/include/kcl/* ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/include/kcl/ + mkdir -p ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/include/uapi/drm + cp ${SOURCE_DIR}/ROCK-Kernel-Driver/include/uapi/drm/amdgpu_drm.h ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/include/uapi/drm/ + mkdir -p ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/include/uapi/linux + cp ${SOURCE_DIR}/ROCK-Kernel-Driver/include/uapi/linux/kfd_ioctl.h ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/include/uapi/linux/ + mkdir -p ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/radeon/ + cp ${SOURCE_DIR}/ROCK-Kernel-Driver/drivers/gpu/drm/radeon/cik_reg.h ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/radeon/ + cp -R ${SOURCE_DIR}/ROCK-Kernel-Driver/drivers/gpu/drm/scheduler ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/ + cp ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/amd/dkms/sources ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/ + cp -R ${SOURCE_DIR}/ROCK-Kernel-Driver/drivers/gpu/drm/ttm ${SOURCE_DIR}/install_files/usr/src/amdgpu-2.0-89/ +else + echo "Skipping download of ROCK kernel drivers, since ${SOURCE_DIR}/install_files/usr/ already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading ROCK kernel drivers. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Nothing to build for ROCK kernel driver unless you are installing. Exiting." + exit 0 +fi + +ROCM_SKIP_INSTALLING=false +if [ ${ROCM_LOCAL_INSTALL} = false ]; then + # Check to see if the kernel-devel package exists for this kernel. + # If it does not, we likely will not be able to build the ROCK + # driver when it tries to install the DKMS package. As such, we + # should ask the user if they want to go ahead and try. + ROCM_SKIP_INSTALLING=false + KERNEL_DEVEL_PKGS=kernel-devel + if [ ${KERNEL_DEVEL_PKGS} -lt 1 ]; then + if [ ${ROCM_FORCE_YES} = true ]; then + ROCM_SKIP_INSTALLING=true + elif [ ${ROCM_FORCE_NO} = true ]; then + ROCM_SKIP_INSTALLING=false + else + echo "" + echo "Cannot find kernel development packages for kernel `uname -r`." + echo "It is likely that the installation of the ROCK driver will not" + echo "complete successfully because it cannot build against your kernel." + echo "" + echo "This can happen if you are running in a container or you are running" + echo "a custom kernel." + read -p "Do you want to skip installing the ROCK driver? (y/n)? " answer + case ${answer:0:1} in + y|Y ) + ROCM_SKIP_INSTALLING=true + echo 'User chose "yes". Skipping the installation of ROCK driver.' + ;; + * ) + echo 'User chose "no". Attempting to install the ROCK driver.' + ;; + esac + fi + fi +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + cd ${SOURCE_DIR}/install_files/ + pushd ${BASE_DIR}/../common/ + cp ./rock-dkms.spec ${SOURCE_DIR}/install_files/ + popd + RPM_TEMP_DIR=`mktemp -d` + rpmbuild -bb --clean --define "_topdir ${RPM_TEMP_DIR}" ./rock-dkms.spec + cp ${RPM_TEMP_DIR}/RPMS/noarch/rock-dkms-*.rpm . + rm -rf ${RPM_TEMP_DIR} + echo "Copying `ls -1 rock-dkms-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp rock-dkms-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ] && [ ${ROCM_SKIP_INSTALLING} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rock-dkms | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rock-dkms | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i rock-dkms-*.rpm + fi +else + if [ ${ROCM_LOCAL_INSTALL} = false ] && [ ${ROCM_SKIP_INSTALLING} = false ]; then + ${ROCM_SUDO_COMMAND} cp -R ${SOURCE_DIR}/install_files/etc/* /etc/ + ${ROCM_SUDO_COMMAND} cp -R ${SOURCE_DIR}/install_files/usr/* /usr/ + CHECK_INSTALLED=`dkms status amdgpu/2.0-89 | grep installed | wc -l` + CHECK_BUILT=`dkms status amdgpu/2.0-89 | grep built | wc -l` + CHECK_ADDED=`dkms status amdgpu/2.0-89 | grep added | wc -l` + if [ ${CHECK_INSTALLED} -gt 0 ] || [ ${CHECK_BUILT} -gt 0 ] || [ ${CHECK_ADDED} -gt 0 ]; then + ${ROCM_SUDO_COMMAND} dkms remove amdgpu/2.0-89 --all + fi + ${ROCM_SUDO_COMMAND} dkms add amdgpu/2.0-89 + ${ROCM_SUDO_COMMAND} dkms build amdgpu/2.0-89 + ${ROCM_SUDO_COMMAND} dkms install amdgpu/2.0-89 + else + echo "Skipping build and installation of ROCK drivers." + fi +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_01_roct.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_01_roct.sh new file mode 100755 index 0000000..c547983 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_01_roct.sh @@ -0,0 +1,129 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'print_cmd=$lastcmd; errno=$?; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. The Thunk needs PCIe utils and numaif.h. In addition, we need +# git to be able to download the source code. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build ROCt Thunk layer." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ pciutils-devel numactl libnuma-devel rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/ROCT-Thunk-Interface ]; then + rm -rf ${SOURCE_DIR}/ROCT-Thunk-Interface + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download ROCt +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/ROCT-Thunk-Interface ]; then + git clone -b ${ROCM_VERSION_BRANCH} https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface.git + cd ${SOURCE_DIR}/ROCT-Thunk-Interface/ + git checkout ${ROCM_ROCT_CHECKOUT} + + # GCC 8.1 on Fedora is unhappy with a string copy in the thunk. + # https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/issues/22 + # Turn off this warning to build. + sed -i 's/Wextra/Wextra -Wno-stringop-truncation/' ./CMakeLists.txt + + # Fix up the packaging cmake command for the hsakmt-roct-dev + sed -i 's/${CMAKE_COMMAND}/${CMAKE_COMMAND} "-DCPACK_RPM_DEFAULT_DIR_PERMISSIONS=\\"${CPACK_RPM_DEFAULT_DIR_PERMISSIONS}\\""/' ./CMakeLists.txt +else + echo "Skipping download of ROCt, since ${SOURCE_DIR}/ROCT-Thunk-Interface already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading ROCt. Exiting." + exit 0 +fi + +# Build, and install ROCt +cd ${SOURCE_DIR}/ROCT-Thunk-Interface/ +mkdir -p build +cd build + +cmake .. -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} +make -j `nproc` +make -j `nproc` build-dev + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building ROCt. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 hsakmt-roct-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp hsakmt-roct-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep hsakmt-roct-[0-9] | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep hsakmt-roct-[0-9] | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i hsakmt-roct-*.rpm + fi + cd hsakmt-roct-dev + make package + echo "Copying `ls -1 hsakmt-roct-dev-*.rpm` to ${ROCM_PACKAGE_DIR}" + cp hsakmt-roct-dev-*.rpm ${ROCM_PACKAGE_DIR} + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep hsakmt-roct-dev | wc -l` + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep hsakmt-roct-dev | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep hsakmt-roct-dev | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i hsakmt-roct-dev-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/lib64/ + ${ROCM_SUDO_COMMAND} make install + ${ROCM_SUDO_COMMAND} make install-dev + + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ${ROCM_SUDO_COMMAND} sh -c "echo ${ROCM_OUTPUT_DIR}/lib > /etc/ld.so.conf.d/x86_64-libhsakmt.conf" + ${ROCM_SUDO_COMMAND} sh -c "echo ${ROCM_OUTPUT_DIR}/lib64 > /etc/ld.so.conf.d/x86_64-libhsakmt.conf" + ${ROCM_SUDO_COMMAND} ldconfig + fi +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_02_rocr.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_02_rocr.sh new file mode 100755 index 0000000..2743497 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_02_rocr.sh @@ -0,0 +1,128 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'print_cmd=$lastcmd; errno=$?; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. ROCr requires libelf. Also installing old cmake to get +# system-wide stuff set up. git is needed to get source code. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build ROCr runtime." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ elfutils libelf1 libelf-devel rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/ROCR-Runtime ]; then + rm -rf ${SOURCE_DIR}/ROCR-Runtime + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download ROCr +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/ROCR-Runtime ]; then + git clone -b ${ROCM_VERSION_BRANCH} https://github.com/RadeonOpenCompute/ROCR-Runtime.git + cd ${SOURCE_DIR}/ROCR-Runtime/src + git checkout ${ROCM_ROCR_CHECKOUT} + cd ${SOURCE_DIR}/ROCR-Runtime/ + patch -p1 < ${BASE_DIR}/patches/01_02_rocr.patch + cd ${SOURCE_DIR}/ROCR-Runtime/src +else + echo "Skipping download of ROCr, since ${SOURCE_DIR}/ROCR-Runtime already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading ROCr. Exiting." + exit 0 +fi + +# Build, and install ROCr +cd ${SOURCE_DIR}/ROCR-Runtime/src +mkdir -p build +cd build + +# Time for a pretty gross workaround. The ROCm device libraries installs +# outdated copies of hsa.h and amd_hsa_*.h to ROCM_INSTALL/include/. This +# means that if you try to point the ROCr build system at ROCM_INSTALL/include/ +# directory, ROCr will pick up outdated verisons of these files and the built +# will fail spectacularly. We can't just fix this in our current ROCm Device +# Libs build because someone may want to use this script to build ROCr on a +# from-package ROCm installation. +# We also can't point ROCr to a different include directory, as these bad +# hsa files are dumped into the same directory as our required hsakmt.h Thunk +# headers. +# INSTEAD, our ugly hack is to make a temporary "ROCm include directory" that +# removes the outdated hsa files, and point our build system towards that. +# Then delete it after our build is complete. +TEMP_INCLUDE_DIR=`mktemp -d` +cp -LR ${ROCM_INPUT_DIR}/include/* ${TEMP_INCLUDE_DIR} +rm -f ${TEMP_INCLUDE_DIR}/hsa.h +rm -f ${TEMP_INCLUDE_DIR}/amd_hsa_*.h +# Since the temporary include directory can change each time this script is +# called, delete any old build stuff sitting around. +rm -rf ${SOURCE_DIR}/ROCR-Runtime/src/build/* +cmake .. -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM -DCMAKE_LIBRARY_PATH=${ROCM_INPUT_DIR}/lib/ -DCMAKE_INCLUDE_PATH=${TEMP_INCLUDE_DIR} ${ROCM_CPACK_RPM_PERMISSIONS} +make -j `nproc` + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building ROCr. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 hsa-rocr-dev-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp hsa-rocr-dev-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep hsa-rocr-dev | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep hsa-rocr-dev | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i hsa-rocr-dev-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ${ROCM_SUDO_COMMAND} sh -c "echo ${ROCM_OUTPUT_DIR}/hsa/lib > /etc/ld.so.conf.d/hsa-rocr-dev.conf" + ${ROCM_SUDO_COMMAND} ldconfig + fi +fi +rm -rf ${TEMP_INCLUDE_DIR} + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_03_rocm_smi.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_03_rocm_smi.sh new file mode 100755 index 0000000..3310d9a --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_03_rocm_smi.sh @@ -0,0 +1,95 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. rocm-smi requires git to download +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required by ROCm SMI." + echo "You will need to have root privileges to do this." + sudo zypper -n in python git make patch rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/ROC-smi ]; then + rm -rf ${SOURCE_DIR}/ROC-smi + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download rocm-smi +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/ROC-smi ]; then + git clone -b ${ROCM_VERSION_BRANCH} https://github.com/RadeonOpenCompute/ROC-smi.git + cd ${SOURCE_DIR}/ROC-smi + git checkout ${ROCM_SMI_CHECKOUT} + patch -p1 < ${BASE_DIR}/patches/01_03_rocm_smi.patch +else + echo "Skipping download of rocm-smi, since ${SOURCE_DIR}/ROC-smi already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading rocm-smi. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Nothing to build for rocm-smi. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/ROC-smi +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + sed -i 's#/opt/rocm/#'${ROCM_OUTPUT_DIR}/'#' ./RPM/rocm-smi.spec + make rpm + echo "Copying `ls -1 ./build/rpm/rocm-smi-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./build/rpm/rocm-smi-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocm-smi | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocm-smi | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./build/rpm/rocm-smi-*.rpm + fi +else + # Install rocm-smi + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/bin/ + ${ROCM_SUDO_COMMAND} cp -R rocm* ${ROCM_OUTPUT_DIR}/bin/ +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_04_rocm_cmake.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_04_rocm_cmake.sh new file mode 100755 index 0000000..7019af9 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_04_rocm_cmake.sh @@ -0,0 +1,97 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. We might need cmake and git if nobody +# ran the higher-level build scripts. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build ROCm CMAKE." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rocm-cmake ]; then + rm -rf ${SOURCE_DIR}/rocm-cmake + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download ROCm Cmake +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/rocm-cmake ]; then + git clone https://github.com/RadeonOpenCompute/rocm-cmake.git + cd ${SOURCE_DIR}/rocm-cmake + git checkout ${ROCM_CMAKE_CHECKOUT} +else + echo "Skipping download of ROCm cmake, since ${SOURCE_DIR}/rocm-cmake already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading rocm-cmake. Exiting." + exit 0 +fi + +# Build, and install ROCm Cmake +cd ${SOURCE_DIR}/rocm-cmake +mkdir -p build +cd build +cmake .. -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Nothing to build for rocm-cmake. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + cmake --build . --target package + echo "Copying `ls -1 rocm-cmake-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./rocm-cmake-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocm-cmake | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocm-cmake | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i rocm-cmake-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} cmake --build . --target install +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_05_rocminfo.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_05_rocminfo.sh new file mode 100755 index 0000000..c366e9b --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_05_rocminfo.sh @@ -0,0 +1,97 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. We might need cmake and git if nobody ran the +# higher-level build scripts. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build rocminfo." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rocminfo ]; then + rm -rf ${SOURCE_DIR}/rocminfo + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download rocminfo +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/rocminfo ]; then + git clone https://github.com/RadeonOpenCompute/rocminfo.git + cd rocminfo + git checkout ${ROCM_ROCMINFO_CHECKOUT} +else + echo "Skipping download of rocminfo, since ${SOURCE_DIR}/rocminfo already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading rocminfo. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/rocminfo +mkdir -p build +cd build +cmake .. -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} +make -j `nproc` + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building rocminfo. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 rocminfo-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp rocminfo-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocminfo | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocminfo | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i rocminfo-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_06_rocprofiler.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_06_rocprofiler.sh new file mode 100755 index 0000000..4e52f77 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_06_rocprofiler.sh @@ -0,0 +1,104 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. We might need cmake and git if nobody ran the higher-level +# build scripts. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the ROC profiler." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rocprofiler ]; then + rm -rf ${SOURCE_DIR}/rocprofiler + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download ROC profiler +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/rocprofiler ]; then + git clone -b ${ROCM_VERSION_BRANCH} https://github.com/ROCmSoftwarePlatform/rocprofiler.git + cd ${SOURCE_DIR}/rocprofiler/ + git checkout ${ROCM_ROCPROFILER_CHECKOUT} +else + echo "Skipping download of ROC profiler, since ${SOURCE_DIR}/rocprofiler already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading ROC profiler. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/rocprofiler +mkdir -p build +cd build +export CMAKE_PREFIX_PATH=${ROCM_INPUT_DIR}/include/hsa:${ROCM_INPUT_DIR}/lib +export CMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} +export CMAKE_DEBUG_TRACE=0 +cmake -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR} -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} .. +make -j `nproc` + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building ROC profiler. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 rocprofiler-dev-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./rocprofiler-dev-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocprofiler-dev | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocprofiler-dev | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./rocprofiler-dev-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + + ${ROCM_SUDO_COMMAND} bash -c "for i in bin include lib; do cp -fR ${ROCM_OUTPUT_DIR}/rocprofiler/${i}/* ${ROCM_OUTPUT_DIR}/${i}/; done" + ${ROCM_SUDO_COMMAND} cp -fR ${ROCM_OUTPUT_DIR}/rocprofiler/tool ${ROCM_OUTPUT_DIR} + ${ROCM_SUDO_COMMAND} rm -rf ${ROCM_OUTPUT_DIR}/rocprofiler +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_07_opencl.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_07_opencl.sh new file mode 100755 index 0000000..92a0877 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_07_opencl.sh @@ -0,0 +1,286 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs for the ROCm OpenCL runtime. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build ROCm OpenCL." + echo "You will need to have root privileges to do this." + sudo zypper -n in git make ocaml ocaml-findlib git-svn curl Mesa-libGL-devel cmake gcc-c++ rpm-build python2-pip llvm-gold binutils-gold + sudo pip install z3-solver + if [ ! -f /usr/lib/libgtest.a ] || [ ! -f /usr/lib/libgtest_main.a ]; then + # Install/Build a new-enough version of Gtest + GTEST_TEMP_DIR=`mktemp -d` + cd ${GTEST_TEMP_DIR} + git clone https://github.com/google/googletest.git + cd googletest + git checkout tags/release-1.8.1 + cd googletest + mkdir build + cd build + cmake .. + make -j `nproc` + sudo mkdir -p /usr/lib + sudo cp *.a /usr/lib + fi + if [ ${ROCM_FORCE_PACKAGE} = true ]; then + zypper -n in clinfo + fi + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/OCL ]; then + rm -rf ${SOURCE_DIR}/OCL + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download the ROCm OpenCL Runtime and Driver +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/OCL ]; then + # Set up a temporary .gitconfig file for the user so that, in case they don't have one, + # the pull succeeds without needing them to enter any information + if [ -f ~/.gitconfig ]; then + OLD_GITCONFIG_EXISTS=true + mv ~/.gitconfig ${SOURCE_DIR}/temp_config &> /dev/null + else + OLD_GITCONFIG_EXISTS=false + fi + git config --global user.email "temp@temp.temp" + git config --global user.name "Temp" + git config --global color.ui false + + mkdir -p ${SOURCE_DIR}/bin/ + curl https://storage.googleapis.com/git-repo-downloads/repo > ${SOURCE_DIR}/bin/repo + chmod a+x ${SOURCE_DIR}/bin/repo + mkdir -p ${SOURCE_DIR}/OCL/ + cd ${SOURCE_DIR}/OCL/ + ${SOURCE_DIR}/bin/repo init -u https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git -b ${ROCM_VERSION_BRANCH} -m opencl.xml + # Update the revision number to this precise ROCm version, even if its an + # earlier one from this branch. + sed -i 's#refs/tags/roc-[0-9]\.[0-9]\.[0-9]#refs/'${ROCM_OPENCL_CHECKOUT}'#' $(pwd)/.repo/manifests/opencl.xml + ${SOURCE_DIR}/bin/repo sync + + rm -f ~/.gitconfig + if [ $OLD_GITCONFIG_EXISTS = true ]; then + mv ${SOURCE_DIR}/temp_config ~/.gitconfig &> /dev/null + fi +else + echo "Skipping download of the ROCm OpenCL runtime, since ${SOURCE_DIR}/opencl already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading ROCm OpenCL runtime. Exiting." + exit 0 +fi + +# Build ROCm OpenCL runtime +cd ${SOURCE_DIR}/OCL/opencl/ +mkdir -p build && cd build +cmake -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/opencl/ -DLLVM_USE_LINKER=gold -DCMAKE_LIBRARY_PATH=${ROCM_INPUT_DIR}/lib -DCMAKE_INCLUDE_PATH=${ROCM_INPUT_DIR}/include -DCMAKE_PREFIX_PATH=${ROCM_INPUT_DIR}/ -DCLANG_ANALYZER_ENABLE_Z3_SOLVER=OFF -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} .. + +# Build the OpenCL runtime can take a large amount of memory, and it will +# fail if you do not have enough memory available per thread. As such, this +# logic limits the number of build threads in response to the amount of +# available memory on the system. +MEM_AVAIL=`cat /proc/meminfo | grep MemTotal | awk {'print $2'}` +AVAIL_THREADS=`nproc` + +# Give about 4 GB to each building thread +MAX_THREADS=`echo $(( ${MEM_AVAIL} / $(( 1024 * 1024 * 4 )) ))` +if [ ${MAX_THREADS} -lt ${AVAIL_THREADS} ]; then + NUM_BUILD_THREADS=${MAX_THREADS} +else + NUM_BUILD_THREADS=${AVAIL_THREADS} +fi +if [ ${NUM_BUILD_THREADS} -lt 1 ]; then + NUM_BUILD_THREADS=1 +fi + +make -j ${NUM_BUILD_THREADS} + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building ROCm OpenCL runtime. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + # Making the packages from the OpenCL runtime build is not as simple as + # calling make package. We are going to package/rpmbuild this ourselves. + OPENCL_PKG_VERSION=`git log -1 --date=iso | grep Date | awk '{print $2}' | sed 's/-//g'` + OPENCL_BUILD_DIR=$(pwd) + mkdir -p rocm-opencl-rpm + cd ${OPENCL_BUILD_DIR}/rocm-opencl-rpm + mkdir -p ./${ROCM_OUTPUT_DIR}/opencl/bin/x86_64/ + cd ${OPENCL_BUILD_DIR}/rocm-opencl-rpm/${ROCM_OUTPUT_DIR}/opencl/bin/x86_64/ + cp ${OPENCL_BUILD_DIR}/bin/clinfo . + cp ${OPENCL_BUILD_DIR}/compiler/llvm/bin/clang-[0-9] ./clang + cp ${OPENCL_BUILD_DIR}/compiler/llvm/bin/ld.lld ./ld.lld + cp ${OPENCL_BUILD_DIR}/compiler/llvm/bin/llvm-link . + cd ${OPENCL_BUILD_DIR}/rocm-opencl-rpm/ + mkdir -p ./${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/ + cd ${OPENCL_BUILD_DIR}/rocm-opencl-rpm/${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/ + cp ${OPENCL_BUILD_DIR}/lib/libOpenCL.so.1 . + cp ${OPENCL_BUILD_DIR}/lib/libamdocl64.so . + cd ${OPENCL_BUILD_DIR}/rocm-opencl-rpm/ + pushd ${BASE_DIR}/../common/ + cp ./rocm-opencl.spec ${OPENCL_BUILD_DIR}/rocm-opencl-rpm/ + popd + sed -i 's/ROCM_OPENCL_PKG_VER/'${OPENCL_PKG_VERSION}'/g' ./rocm-opencl.spec + sed -i 's#ROCM_OUTPUT_DIR#'${ROCM_OUTPUT_DIR}'#g' ./rocm-opencl.spec + RPM_TEMP_DIR=`mktemp -d` + rpmbuild -bb --clean --define "_topdir ${RPM_TEMP_DIR}" ./rocm-opencl.spec + cp ${RPM_TEMP_DIR}/RPMS/x86_64/rocm-opencl-*.rpm . + rm -rf ${RPM_TEMP_DIR} + echo "Copying `ls -1 rocm-opencl-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp rocm-opencl-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocm-opencl-[0-9] | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocm-opencl-[0-9] | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i rocm-opencl-*.rpm + fi + + cd ${OPENCL_BUILD_DIR} + mkdir -p rocm-opencl-devel-rpm + cd ${OPENCL_BUILD_DIR}/rocm-opencl-devel-rpm + mkdir -p ./${ROCM_OUTPUT_DIR}/opencl/include/CL/ + cp -R ${OPENCL_BUILD_DIR}/../api/opencl/khronos/headers/opencl2.2/ /tmp/ + cp -R /tmp/opencl2.2/CL/ ./${ROCM_OUTPUT_DIR}/opencl/include/ + rm -f ./${ROCM_OUTPUT_DIR}/opencl/include/CL/cl_d3d* + rm -f ./${ROCM_OUTPUT_DIR}/opencl/include/CL/cl_dx9* + rm -f ./${ROCM_OUTPUT_DIR}/opencl/include/CL/cl2.hpp + rm -rf /tmp/opencl2.2/ + cp ${OPENCL_BUILD_DIR}/../compiler/llvm/tools/clang/lib/Headers/opencl-c.h ./${ROCM_OUTPUT_DIR}/opencl/include/ + mkdir -p ./${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/bitcode/ + for bc_file in `find ${OPENCL_BUILD_DIR}/library/amdgcn/ -name \*.bc`; do + cp ${bc_file} ./${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/bitcode/ + done + cd ./${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/ + ln -sf ./libOpenCL.so.1 ./libOpenCL.so + cd ${OPENCL_BUILD_DIR}/rocm-opencl-devel-rpm/ + pushd ${BASE_DIR}/../common/ + cp ./rocm-opencl-devel.spec ${OPENCL_BUILD_DIR}/rocm-opencl-devel-rpm/ + popd + sed -i 's/ROCM_OPENCL_PKG_VER/'${OPENCL_PKG_VERSION}'/g' ./rocm-opencl-devel.spec + sed -i 's#ROCM_OUTPUT_DIR#'${ROCM_OUTPUT_DIR}'#g' ./rocm-opencl-devel.spec + RPM_TEMP_DIR=`mktemp -d` + rpmbuild -bb --clean --define "_topdir ${RPM_TEMP_DIR}" ./rocm-opencl-devel.spec + cp ${RPM_TEMP_DIR}/RPMS/x86_64/rocm-opencl-*.rpm . + rm -rf ${RPM_TEMP_DIR} + echo "Copying `ls -1 rocm-opencl-devel-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp rocm-opencl-devel-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocm-opencl-devel | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocm-opencl-devel | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i rocm-opencl-devel-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ${ROCM_SUDO_COMMAND} mkdir -p /etc/OpenCL/vendors/ + ${ROCM_SUDO_COMMAND} cp ${SOURCE_DIR}/OCL/opencl/api/opencl/config/amdocl64.icd /etc/OpenCL/vendors/ + echo 'export PATH=$PATH:'"${ROCM_OUTPUT_DIR}/bin:${ROCM_OUTPUT_DIR}/profiler/bin:${ROCM_OUTPUT_DIR}/opencl/bin/x86_64" | ${ROCM_SUDO_COMMAND} tee -a /etc/profile.d/rocm.sh + fi + + # Fix up OpenCL installation locations + + # Should have this in ${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/: + # bitcode libamdocl64.so libcltrace.so libOpenCL.so libOpenCL.so.1 + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/bitcode/ + ${ROCM_SUDO_COMMAND} cp ${ROCM_OUTPUT_DIR}/opencl/lib/*.bc ${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/bitcode/ + if [ -e ${ROCM_OUTPUT_DIR}/opencl/lib/libOpenCL.so.1.2 ]; then + ${ROCM_SUDO_COMMAND} cp ${ROCM_OUTPUT_DIR}/opencl/lib/libOpenCL.so.1.2 ${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/ + elif [ ! -e ${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/libOpenCL.so.1.2 ]; then + echo "Error: libOpenCL.so.1.2 is neither in its final directory nor where it'd be copied from" + echo "${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/ and ${ROCM_OUTPUT_DIR}/opencl/lib/ respectively" + exit 2 + fi + ${ROCM_SUDO_COMMAND} ln -sf ${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/libOpenCL.so.1.2 ${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/libOpenCL.so.1 + ${ROCM_SUDO_COMMAND} ln -sf ${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/libOpenCL.so.1 ${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/libOpenCL.so + if [ -e ${ROCM_OUTPUT_DIR}/opencl/lib/libamdocl64.so ]; then + ${ROCM_SUDO_COMMAND} cp ${ROCM_OUTPUT_DIR}/opencl/lib/libamdocl64.so ${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/ + elif [ ! -e ${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/libamdocl64.so ]; then + echo "Error: llibamdocl64.so is neither in its final directory nor where it'd be copied from" + echo "${ROCM_OUTPUT_DIR}/opencl/lib/x86_64/ and ${ROCM_OUTPUT_DIR}/opencl/lib/ respectively" + exit 2 + fi + ${ROCM_SUDO_COMMAND} rm -f ${ROCM_OUTPUT_DIR}/opencl/lib/lib* + ${ROCM_SUDO_COMMAND} rm -rf ${ROCM_OUTPUT_DIR}/opencl/lib/clang/ + + # Now that libs are in place, load them in, rebuild the ld cache + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo "${ROCM_OUTPUT_DIR}/opencl/lib/x86_64" | ${ROCM_SUDO_COMMAND} tee -a /etc/ld.so.conf.d/x86_64-rocm-opencl.conf + ${ROCM_SUDO_COMMAND} ldconfig + fi + + # $ ls /opt/rocm/opencl/bin/x86_64/ + # clang clinfo ld.lld llc llvm-link llvm-objdump opt + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/opencl/bin/x86_64/ + # missing llc, llvm-link, llvm-objdump opt, but these are not + # needed for libOpenCL.so operation + for i in clang clang-[0-9] clinfo ld.lld lld; do ${ROCM_SUDO_COMMAND} cp ${ROCM_OUTPUT_DIR}/opencl/bin/$i ${ROCM_OUTPUT_DIR}/opencl/bin/x86_64/; done + ${ROCM_SUDO_COMMAND} rm -f ${ROCM_OUTPUT_DIR}/opencl/bin/clang* + ${ROCM_SUDO_COMMAND} rm -f ${ROCM_OUTPUT_DIR}/opencl/bin/git-clang-format + ${ROCM_SUDO_COMMAND} rm -f ${ROCM_OUTPUT_DIR}/opencl/bin/ld64.lld + ${ROCM_SUDO_COMMAND} rm -f ${ROCM_OUTPUT_DIR}/opencl/bin/lld-link + ${ROCM_SUDO_COMMAND} rm -f ${ROCM_OUTPUT_DIR}/opencl/bin/roc-cl + ${ROCM_SUDO_COMMAND} rm -f ${ROCM_OUTPUT_DIR}/opencl/bin/wasm-ld + + # $ ls /opt/rocm/opencl/include/ + # CL opencl-c.h + #$ ls /opt/rocm/opencl/include/CL/ + #cl_ext.h cl_gl_ext.h cl_gl.h cl.h cl.hpp cl_platform.h opencl.h + ${ROCM_SUDO_COMMAND} cp -R ${ROCM_OUTPUT_DIR}/opencl/include/opencl2.2/ /tmp/ + ${ROCM_SUDO_COMMAND} rm -rf ${ROCM_OUTPUT_DIR}/opencl/include/* + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/opencl/include/CL/ + ${ROCM_SUDO_COMMAND} cp -R /tmp/opencl2.2/CL/ ${ROCM_OUTPUT_DIR}/opencl/include/ + ${ROCM_SUDO_COMMAND} rm -f ${ROCM_OUTPUT_DIR}/opencl/include/CL/cl_d3d* + ${ROCM_SUDO_COMMAND} rm -f ${ROCM_OUTPUT_DIR}/opencl/include/CL/cl_dx9* + ${ROCM_SUDO_COMMAND} rm -f ${ROCM_OUTPUT_DIR}/opencl/include/CL/cl2.hpp + ${ROCM_SUDO_COMMAND} rm -rf /tmp/opencl2.2/ +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_08_clang-ocl.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_08_clang-ocl.sh new file mode 100755 index 0000000..7e5cb1d --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_08_clang-ocl.sh @@ -0,0 +1,108 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. We might need cmake and git if nobody ran the higher-level +# build scripts. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build clang-ocl." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git gcc-c++ rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/clang-ocl ]; then + rm -rf ${SOURCE_DIR}/clang-ocl + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download clang-ocl +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/clang-ocl ]; then + git clone https://github.com/RadeonOpenCompute/clang-ocl.git + cd clang-ocl + git checkout ${ROCM_CLANG_OCL_CHECKOUT} +else + echo "Skipping download of clang-ocl, since ${SOURCE_DIR}/clang-ocl already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading clang-ocl. Exiting." + exit 0 +fi + +# Build and install clang-ocl +cd ${SOURCE_DIR}/clang-ocl +mkdir -p build +cd build +cmake .. -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Nothing to build for clang-ocl. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + cmake --build . --target package + echo "Copying `ls -1 rocm-clang-ocl-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./rocm-clang-ocl-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocm-clang-ocl | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocm-clang-ocl | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i rocm-clang-ocl-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} cmake --build . --target install +fi + +# if [ ${ROCM_LOCAL_INSTALL} = false ]; then +# # Remove other OpenCL installations for stuff that isn't ROCm, or +# # our OpenCL programs may crash with a lot of noise. +# for app in Mesa libclc beignet; do +# num_pkgs=`dnf list installed ${app} 2>/dev/null | wc -l` +# if [ ${num_pkgs} -gt 0 ]; then +# sudo zypper -n rm ${app} +# fi +# done +# fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_09_hcc.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_09_hcc.sh new file mode 100755 index 0000000..328e22b --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_09_hcc.sh @@ -0,0 +1,144 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. We might need cmake and git if nobody ran the higher-level +# build scripts. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build HCC." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ patch rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi +# If we are going to build this as a package and then try to install it, then +# we need to install the things it relies on or the rpm installation will fail +if [ ${ROCM_LOCAL_INSTALL} = false ] && [ ${ROCM_FORCE_PACKAGE} = true ]; then + sudo zypper -n in coreutils findutils elfutils pciutils file libnpth0 +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/hcc ]; then + rm -rf ${SOURCE_DIR}/hcc + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download hcc +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/hcc ]; then + git clone --recursive -b ${ROCM_VERSION_BRANCH} https://github.com/RadeonOpenCompute/hcc.git + cd ${SOURCE_DIR}/hcc + git checkout ${ROCM_HCC_CHECKOUT} + git submodule update + # Update the cmake file to allow for open-source build of ROCm. + patch -p 1 < ${BASE_DIR}/patches/01_09_hcc.patch +else + echo "Skipping download of hcc, since ${SOURCE_DIR}/hcc already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading hcc. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/hcc +mkdir -p build +cd build + +cd ${SOURCE_DIR}/hcc/build/ + +cmake .. -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/hcc/ -DLLVM_USE_LINKER=gold -DCLANG_ANALYZER_ENABLE_Z3_SOLVER=OFF -DLLVM_ENABLE_ASSERTIONS=OFF -DCMAKE_LIBRARY_PATH=${ROCM_INPUT_DIR}/lib -DCMAKE_INCLUDE_PATH=${ROCM_INPUT_DIR}/include -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DHCC_OPEN_SOURCE_BUILD=ON +# Building HCC can take a large amount of memory, and it will fail if you do +# not have enough memory available per thread. As such, this # logic limits +# the number of build threads in response to the amount of available memory +# on the system. +MEM_AVAIL=`cat /proc/meminfo | grep MemTotal | awk {'print $2'}` +AVAIL_THREADS=`nproc` + +# Give about 4 GB to each building thread +MAX_THREADS=`echo $(( ${MEM_AVAIL} / $(( 1024 * 1024 * 4 )) ))` +if [ ${ROCM_CMAKE_BUILD_TYPE} = "RelWithDebInfo" ]; then + MAX_THREADS=`echo $(( ${MEM_AVAIL} / $(( 1024 * 1024 * 6 )) ))` +fi + +if [ ${MAX_THREADS} -lt ${AVAIL_THREADS} ]; then + NUM_BUILD_THREADS=${MAX_THREADS} +else + NUM_BUILD_THREADS=${AVAIL_THREADS} +fi +if [ ${NUM_BUILD_THREADS} -lt 1 ]; then + NUM_BUILD_THREADS=1 +fi + +make -j ${NUM_BUILD_THREADS} +# Workaround for Experimental ROC Issue #4 +if [ ${ROCM_CMAKE_BUILD_TYPE} = "Debug" ]; then + sed -i 's/DEBUG/RELEASE/g' ./lib/CMakeFiles/Export/lib/cmake/hcc/hcc-targets-debug.cmake +elif [ ${ROCM_CMAKE_BUILD_TYPE} = "RelWithDebInfo" ]; then + sed -i 's/RELWITHDEBINFO/RELEASE/g' ./lib/CMakeFiles/Export/lib/cmake/hcc/hcc-targets-relwithdebinfo.cmake +fi + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building hcc. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 hcc-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./hcc-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep ^hcc- | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep ^hcc- | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i hcc-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/bin/ + ${ROCM_SUDO_COMMAND} bash -c 'for i in lld clamp-config extractkernel hcc hcc-config; do ln -sf '"${ROCM_OUTPUT_DIR}"'/hcc/bin/${i} '"${ROCM_OUTPUT_DIR}"'/bin/${i}; done' + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/include/ + if [ ! -d ${ROCM_OUTPUT_DIR}/include/hcc ]; then + ${ROCM_SUDO_COMMAND} ln -sf ${ROCM_OUTPUT_DIR}/hcc/include ${ROCM_OUTPUT_DIR}/include/hcc + fi + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/lib/ + ${ROCM_SUDO_COMMAND} bash -c 'for i in libclang_rt.builtins-x86_64.a libhc_am.so libmcwamp.a libmcwamp_atomic.a libmcwamp_cpu.so libmcwamp_hsa.so; do ln -sf '"${ROCM_OUTPUT_DIR}"'/hcc/lib/${i} '"${ROCM_OUTPUT_DIR}"'/lib/${i}; done' +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_10_hip.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_10_hip.sh new file mode 100755 index 0000000..36792bd --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_10_hip.sh @@ -0,0 +1,127 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. We might need cmake and git if nobody ran the higher-level +# build scripts. Also libelf is needed for HIP. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build HIP." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make elfutils- gcc-c++ patch rpm-build doxygen + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi +# If we are going to build this as a package and then try to install it, then +# we need to install the things it relies on or the rpm installation will fail +if [ ${ROCM_LOCAL_INSTALL} = false ] && [ ${ROCM_FORCE_PACKAGE} = true ]; then + sudo zypper -n in perl +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/HIP ]; then + rm -rf ${SOURCE_DIR}/HIP + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download HIP +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/HIP ]; then + git clone -b ${ROCM_VERSION_BRANCH} https://github.com/ROCm-Developer-Tools/HIP.git + cd HIP + git checkout ${ROCM_HIP_CHECKOUT} + patch -p1 < ${BASE_DIR}/patches/01_10_hip.patch +else + echo "Skipping download of HIP, since ${SOURCE_DIR}/HIP already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading HIP. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/HIP +mkdir -p build +cd build +cmake .. -DHIP_PLATFORM=hcc -DHCC_HOME=${ROCM_INPUT_DIR}/hcc/ -DHSA_PATH=${ROCM_INPUT_DIR} -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/hip/ -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} +make -j `nproc` + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building HIP. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + for pkg in base doc hcc samples; do + echo "Copying `ls -1 hip_${pkg}-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./hip_${pkg}-*.rpm ${ROCM_PACKAGE_DIR} + done + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + for pkg in base doc hcc samples; do + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep hip_${pkg} | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep hip_${pkg} | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + done + for pkg in base doc hcc samples; do + sudo rpm -i ./hip_${pkg}-*.rpm + done + fi +else + ${ROCM_SUDO_COMMAND} make install + + # Fix up files into the locations they s/hcc/hould be installed into + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/bin/ + ${ROCM_SUDO_COMMAND} bash -c 'for i in .hipVersion ca findcode.sh finduncodep.sh hipcc hipcc_cmake_linker_helper hipconfig hipconvertinplace-perl.sh hipconvertinplace.sh hipdemangleatp hipexamine-perl.sh hipexamine.sh hipify-cmakefile hipify-perl lpl; do ln -sf '"${ROCM_OUTPUT_DIR}"'/hip/bin/${i} '"${ROCM_OUTPUT_DIR}"'/bin/${i}; done' + ${ROCM_SUDO_COMMAND} ln -sf ${ROCM_OUTPUT_DIR}/hip/bin/.hipVersion ${ROCM_OUTPUT_DIR}/bin/.hipVersion + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/include/ + if [ ! -d ${ROCM_OUTPUT_DIR}/include/hip ]; then + ${ROCM_SUDO_COMMAND} ln -sf ${ROCM_OUTPUT_DIR}/hip/include/hip ${ROCM_OUTPUT_DIR}/include/hip + fi + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/lib/ + ${ROCM_SUDO_COMMAND} bash -c 'for i in .hipInfo hip_hc.ll libhip_device.a libhip_hcc.so libhip_hcc_static.a; do ln -sf '"${ROCM_OUTPUT_DIR}"'/hip/lib/${i} '"${ROCM_OUTPUT_DIR}"'/lib/${i}; done' + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/hip/lib/cmake/hip/ + sed -i 's#/opt/rocm/#'${ROCM_OUTPUT_DIR}/'#' ${SOURCE_DIR}/HIP/packaging/hip-targets.cmake + sed -i 's#/opt/rocm/#'${ROCM_OUTPUT_DIR}/'#' ${SOURCE_DIR}/HIP/packaging/hip-targets-release.cmake + ${ROCM_SUDO_COMMAND} cp -f ${SOURCE_DIR}/HIP/packaging/*.cmake ${ROCM_OUTPUT_DIR}/hip/lib/cmake/hip/ + + # hip_samples packages: + ${ROCM_SUDO_COMMAND} cp -R ${SOURCE_DIR}/HIP/samples ${ROCM_OUTPUT_DIR}/hip/ +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_11_rocm_device_libs.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_11_rocm_device_libs.sh new file mode 100755 index 0000000..77a0b1a --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_11_rocm_device_libs.sh @@ -0,0 +1,157 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. We might need cmake and git if nobody ran the higher-level +# build scripts. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build ROCm device libs." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/llvm_amd-common ]; then + rm -rf ${SOURCE_DIR}/llvm_amd-common + fi + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/ROCm-Device-Libs ]; then + rm -rf ${SOURCE_DIR}/ROCm-Device-Libs + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download ROCm LLVM +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/llvm_amd-common ]; then + cd ${SOURCE_DIR} + git clone -b ${ROCM_VERSION_BRANCH} https://github.com/RadeonOpenCompute/llvm.git llvm_amd-common + cd ${SOURCE_DIR}/llvm_amd-common + git checkout ${ROCM_DEVICE_LIBS_CHECKOUT} + cd ${SOURCE_DIR}/llvm_amd-common/tools + git clone -b ${ROCM_VERSION_BRANCH} https://github.com/RadeonOpenCompute/lld.git lld + cd ${SOURCE_DIR}/llvm_amd-common/tools/lld + git checkout ${ROCM_DEVICE_LIBS_CHECKOUT} + cd ${SOURCE_DIR}/llvm_amd-common/tools + git clone -b ${ROCM_VERSION_BRANCH} https://github.com/RadeonOpenCompute/clang.git clang + cd ${SOURCE_DIR}/llvm_amd-common/tools/clang + git checkout ${ROCM_DEVICE_LIBS_CHECKOUT} +else + echo "Skipping download of ROCm LLVM for device libs, since ${SOURCE_DIR}/llvm_amd-common already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/ROCm-Device-Libs ]; then + cd ${SOURCE_DIR} + git clone -b ${ROCM_VERSION_BRANCH} https://github.com/RadeonOpenCompute/ROCm-Device-Libs.git + cd ${SOURCE_DIR}/ROCm-Device-Libs/ + git checkout ${ROCM_DEVICE_LIBS_CHECKOUT} +else + echo "Skipping download of ROCm Device Libs, since ${SOURCE_DIR}/ROCm-Device-Libs already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading LLVM and ROCm device libs. Exiting." + exit 0 +fi + +ROCM_TEMP_LLVM_DIR=${ROCM_OUTPUT_DIR}/llvm/ +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + ROCM_TEMP_LLVM_DIR=${SOURCE_DIR}/llvm_temp_install + mkdir -p ${ROCM_TEMP_LLVM_DIR} +fi + +if [ ${ROCM_FORCE_PACKAGE} = false ] || [ ! -f ${ROCM_TEMP_LLVM_DIR}/bin/clang ]; then + # Build ROCm LLVM if it does not already exist + cd ${SOURCE_DIR}/llvm_amd-common + mkdir -p build + cd build + cmake -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_TEMP_LLVM_DIR} -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" -DLLVM_USE_LINKER=gold -DCLANG_ANALYZER_ENABLE_Z3_SOLVER=OFF -DLLVM_ENABLE_ASSERTIONS=No .. + + # Building LLVM can take a large amount of memory, and it will fail if you do + # not have enough memory available per thread. As such, this # logic limits + # the number of build threads in response to the amount of available memory + # on the system. + MEM_AVAIL=`cat /proc/meminfo | grep MemTotal | awk {'print $2'}` + AVAIL_THREADS=`nproc` + + # Give about 4 GB to each building thread + MAX_THREADS=`echo $(( ${MEM_AVAIL} / $(( 1024 * 1024 * 4 )) ))` + if [ ${MAX_THREADS} -lt ${AVAIL_THREADS} ]; then + NUM_BUILD_THREADS=${MAX_THREADS} + else + NUM_BUILD_THREADS=${AVAIL_THREADS} + fi + if [ ${NUM_BUILD_THREADS} -lt 1 ]; then + NUM_BUILD_THREADS=1 + fi + + make -j ${NUM_BUILD_THREADS} + ${ROCM_SUDO_COMMAND} make install +fi + +# Build ROCm device libs +cd ${SOURCE_DIR}/ROCm-Device-Libs/ +mkdir -p build +cd build +export LLVM_BUILD=${ROCM_TEMP_LLVM_DIR} +CC=$LLVM_BUILD/bin/clang cmake -DLLVM_DIR=${LLVM_BUILD} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} .. +make -j `nproc` + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building LLVM and ROCm device libs. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 rocm-device-libs-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./rocm-device-libs-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocm-device-libs | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocm-device-libs | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./rocm-device-libs-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install +fi + +unset LLVM_BUILD + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_12_atmi.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_12_atmi.sh new file mode 100755 index 0000000..14f6813 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_12_atmi.sh @@ -0,0 +1,176 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. We might need cmake and git if nobody ran the higher-level +# build scripts. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build ATMI." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/atmi ]; then + rm -rf ${SOURCE_DIR}/atmi + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download ATMI +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/atmi ]; then + git clone https://github.com/RadeonOpenCompute/atmi.git + cd ${SOURCE_DIR}/atmi + git checkout ${ROCM_ATMI_CHECKOUT} +else + echo "Skipping download of ATMI, since ${SOURCE_DIR}/atmi already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading ATMI. Exiting." + exit 0 +fi + +# ATMI requires AMD's LLVM, which is not installed from packages by default. +# As such, we need to check if the LLVM directory exists in the ROCM_INPUT_DIR. +# If it does not, we fall back to checking the ROCM_OUTPUT_DIR, since maybe +# the user just build LLVM before calling this script. IF they have not, +# we ask them if they would like to build LLVM first. If they do not, then +# this script will not work and we fail. +ROCM_LLVM_DIR=${ROCM_INPUT_DIR}/llvm/ +if [ ! -d ${ROCM_INPUT_DIR}/llvm ]; then + if [ -d ${ROCM_OUTPUT_DIR}/llvm ]; then + ROCM_LLVM_DIR=${ROCM_OUTPUT_DIR}/llvm/ + elif [ -d ${SOURCE_DIR}/llvm ]; then + ROCM_LLVM_DIR=${SOURCE_DIR}/llvm/ + elif [ -d ${SOURCE_DIR}/llvm_temp_install ]; then + ROCM_LLVM_DIR=${SOURCE_DIR}/llvm_temp_install/ + else + ROCM_REBUILD_LLVM=false + echo "" + echo "Unable to find ROCm LLVM in ${ROCM_INPUT_DIR}/llvm/, ${ROCM_OUTPUT_DIR}/llvm/," + echo "${SOURCE_DIR}/llvm/, or ${SOURCE_DIR}/llvm_temp_install/." + echo "This is required in order to build ATMI." + if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "However, you have chosen to do builds only, so we cannot install ROCm LLVM." + echo "Unable to continue." + exit 1 + fi + if [ ${ROCM_FORCE_YES} = true ]; then + echo "Forcing a build of the ROCm LLVM because of the '-y' flag." + ROCM_REBUILD_LLVM=true + elif [ ${ROCM_FORCE_NO} = true ]; then + echo "Skipping a build of the ROCm LLVM because of the '-n' flag." + else + echo "" + read -p "Do you want to try to build ROCm LLVM to fulfill this prerequisite (y/n)? " answer + case ${answer:0:1} in + y|Y ) + ROCM_REBUILD_LLVM=true + echo 'User chose "yes". Forcing a build of ROCm LLVM.' + ;; + * ) + echo 'User chose "no". Skipping a build of ROCm LLVM.' + ;; + esac + fi + + if [ ${ROCM_REBUILD_LLVM} = true ]; then + ${BASE_DIR}/01_11_rocm_device_libs.sh "$@" + ROCM_LLVM_DIR=${ROCM_OUTPUT_DIR}/llvm/ + else + echo "Unable to continue the build of comgr." + exit 1 + fi + fi +fi + +cd ${SOURCE_DIR}/atmi +mkdir -p src/build +cd src/build +export GFXLIST="gfx701 gfx801 gfx802 gfx803 gfx900 gfx906" + +# In ROCm 2.0, ROCm-Device-Libs builds irif.amdgcn.bc but doesn't install it. +# ATMI needs this file. As such, we need to create a DEVICE_LIB_DIR that +# contains it. We can't just have a custom ROCm-Device-Libs install it system- +# wide, though, because what if someone tries to build ATMI on a system that +# installed ROCm-Device-Libs from package? So let's try to find (or make) a +# new temporary copy of irif.amdgcn.bc here. +if [ ! -d ${SOURCE_DIR}/atmi/src/build/temp_device_libs/ ] || [ ! -f ${SOURCE_DIR}/atmi/src/build/temp_device_libs/irif.amdgcn.bc ]; then + mkdir -p ${SOURCE_DIR}/atmi/src/build/temp_device_libs + cp -f ${ROCM_INPUT_DIR}/lib/*.bc ${SOURCE_DIR}/atmi/src/build/temp_device_libs/ + if [ ! -f ${SOURCE_DIR}/atmi/src/build/temp_device_libs/irif.amdgcn.bc ]; then + if [ ! -d ${SOURCE_DIR}/ROCm-Device-Libs/ ] || [ $(find ${SOURCE_DIR}/ROCm-Device-Libs/ -name irif.amdgcn.bc | wc -l) -eq 0 ]; then + ${BASE_DIR}/01_11_rocm_device_libs.sh "$@" --build_only + fi + cp -f $(find ${SOURCE_DIR}/ROCm-Device-Libs/ -name irif.amdgcn.bc) ${SOURCE_DIR}/atmi/src/build/temp_device_libs/ + fi + # This internal cmake file hard-codes its expected place for the device libs + # based on where it finds the HSA library, not based on DEVICE_LIB_DIR + # We have to change it. + sed -i 's#${ROCM_DEVICE_PATH}/lib/#'${SOURCE_DIR}/atmi/src/build/temp_device_libs/'#' ${SOURCE_DIR}/atmi/src/device_runtime/bc.cmake +fi +cmake -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/atmi -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DLLVM_DIR=${ROCM_LLVM_DIR} -DDEVICE_LIB_DIR=${SOURCE_DIR}/atmi/src/build/temp_device_libs/ -DHSA_DIR=${ROCM_INPUT_DIR}/ -DATMI_HSA_INTEROP=ON -DATMI_DEVICE_RUNTIME=ON -DATMI_C_EXTENSION=OFF -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} .. + +make -j `nproc` + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building ATMI. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 atmi-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./atmi-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep ^atmi- | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep ^atmi- | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./atmi-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install +fi + +unset GFXLIST + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_13_comgr.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_13_comgr.sh new file mode 100755 index 0000000..acdfd93 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_13_comgr.sh @@ -0,0 +1,156 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. We might need cmake and git if nobody ran the higher-level +# build scripts. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build comgr." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/ROCm-CompilerSupport ]; then + rm -rf ${SOURCE_DIR}/ROCm-CompilerSupport + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# comgr requires AMD's LLVM, which is not installed from packages by default. +# As such, we need to check if the LLVM directory exists in the ROCM_INPUT_DIR. +# If it does not, we fall back to checking the ROCM_OUTPUT_DIR, since maybe +# the user just build LLVM before calling this script. IF they have not, +# we ask them if they would like to build LLVM first. If they do not, then +# this script will not work and we fail. +ROCM_LLVM_DIR=${ROCM_INPUT_DIR}/llvm/ +if [ ! -d ${ROCM_INPUT_DIR}/llvm ]; then + if [ -d ${ROCM_OUTPUT_DIR}/llvm ]; then + ROCM_LLVM_DIR=${ROCM_OUTPUT_DIR}/llvm/ + elif [ -d ${SOURCE_DIR}/llvm ]; then + ROCM_LLVM_DIR=${SOURCE_DIR}/llvm/ + elif [ -d ${SOURCE_DIR}/llvm_temp_install ]; then + ROCM_LLVM_DIR=${SOURCE_DIR}/llvm_temp_install/ + else + ROCM_REBUILD_LLVM=false + echo "" + echo "Unable to find ROCm LLVM in ${ROCM_INPUT_DIR}/llvm/, ${ROCM_OUTPUT_DIR}/llvm/," + echo "${SOURCE_DIR}/llvm/, or ${SOURCE_DIR}/llvm_temp_install/." + echo "This is required in order to build comgr." + if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "However, you have chosen to do builds only, so we cannot install ROCm LLVM." + echo "Unable to continue." + exit 1 + fi + if [ ${ROCM_FORCE_YES} = true ]; then + echo "Forcing a build of the ROCm LLVM because of the '-y' flag." + ROCM_REBUILD_LLVM=true + elif [ ${ROCM_FORCE_NO} = true ]; then + echo "Skipping a build of the ROCm LLVM because of the '-n' flag." + else + echo "" + read -p "Do you want to try to build ROCm LLVM to fulfill this prerequisite (y/n)? " answer + case ${answer:0:1} in + y|Y ) + ROCM_REBUILD_LLVM=true + echo 'User chose "yes". Forcing a build of ROCm LLVM.' + ;; + * ) + echo 'User chose "no". Skipping a build of ROCm LLVM.' + ;; + esac + fi + + if [ ${ROCM_REBUILD_LLVM} = true ]; then + ${BASE_DIR}/01_11_rocm_device_libs.sh "$@" + ROCM_LLVM_DIR=${ROCM_OUTPUT_DIR}/llvm/ + else + echo "Unable to continue the build of comgr." + exit 1 + fi + fi +fi + +# Download comgr +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/ROCm-CompilerSupport ]; then + git clone https://github.com/RadeonOpenCompute/ROCm-CompilerSupport.git + cd ROCm-CompilerSupport + git checkout ${ROCM_COMGR_CHECKOUT} +else + echo "Skipping download of comgr, since ${SOURCE_DIR}/ROCm-CompilerSupport already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading comgr. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/ROCm-CompilerSupport +cd lib/comgr/ +mkdir -p build +cd build +cmake -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_PREFIX_PATH="${ROCM_LLVM_DIR};${ROCM_INPUT_DIR}/lib" -DLLVM_DIR=${ROCM_LLVM_DIR} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} .. +make -j `nproc` + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building comgr. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 comgr-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./comgr-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep ^comgr- | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep ^comgr- | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./comgr-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/include/comgr/ + #${ROCM_SUDO_COMMAND} cp ${ROCM_OUTPUT_DIR}/include/amd_comgr.h ${ROCM_OUTPUT_DIR}/include/comgr/ + #${ROCM_SUDO_COMMAND} cp ${ROCM_OUTPUT_DIR}/lib/libamd_comgr.so ${ROCM_OUTPUT_DIR}/lib/libcomgr.so + #${ROCM_SUDO_COMMAND} cp ${ROCM_OUTPUT_DIR}/share/amd_comgr/ ${ROCM_OUTPUT_DIR}/ +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_14_rocr_debug_agent.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_14_rocr_debug_agent.sh new file mode 100755 index 0000000..6a7ef8a --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_14_rocr_debug_agent.sh @@ -0,0 +1,124 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. We might need cmake and git if nobody ran the higher-level +# build scripts. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the ROCr debug agent." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ patch rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rocr_debug_agent ]; then + rm -rf ${SOURCE_DIR}/rocr_debug_agent + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download ROCr debug agent +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/rocr_debug_agent ]; then + git clone -b ${ROCM_VERSION_BRANCH} https://github.com/ROCm-Developer-Tools/rocr_debug_agent.git + cd ${SOURCE_DIR}/rocr_debug_agent/ + git checkout ${ROCR_DEBUG_AGENT_CHECKOUT} + + # The debug agent in ROCm 2.0.0 does not build with GCC 8. + # If we have that, patch the problem out. + GCC_VERSION=`gcc --version | head -n 1 | awk '{print $NF}' | awk -F "." '{print $1}'` + if [ ${GCC_VERSION} -ge 8 ]; then + patch -p 1 < ${BASE_DIR}/patches/01_14_rocr_debug_agent.patch + fi +else + echo "Skipping download of ROCr debug agent, since ${SOURCE_DIR}/rocr_debug_agent already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading ROCr debug agent. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/rocr_debug_agent/src +mkdir -p build +cd build + +# Time for a pretty gross workaround. The ROCm device libraries installs +# outdated copies of hsa.h and amd_hsa_*.h to ROCM_INSTALL/include/. This +# means that if you try to point the ROCr build system at ROCM_INSTALL/include/ +# directory, ROCr will pick up outdated verisons of these files and the built +# will fail spectacularly. We can't just fix this in our current ROCm Device +# Libs build because someone may want to use this script to build ROCr on a +# from-package ROCm installation. +# We also can't include a different include, as these bad hsa files are +# dumped into the same directory as our required hsakmt.h Thunk headers. +# INSTEAD, our ugly hack is to make a temporary "ROCm include directory" that +# removes the outdated hsa files, and point our build system towards that. +# Then delete it after our build is complete. +TEMP_INCLUDE_DIR=`mktemp -d` +cp -LR ${ROCM_INPUT_DIR}/include/* ${TEMP_INCLUDE_DIR} +rm -f ${TEMP_INCLUDE_DIR}/hsa.h +rm -f ${TEMP_INCLUDE_DIR}/amd_hsa_*.h +# Since the temporary include directory can change each time this script is +# called, delete any old build stuff sitting around. +rm -rf ${SOURCE_DIR}/rocr_debug_agent/src/build/* +cmake -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCMAKE_INCLUDE_PATH="${TEMP_INCLUDE_DIR};${ROCM_INPUT_DIR}/opencl/bin/x86_64/;${ROCM_INPUT_DIR}/include/hsa/" -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} .. +make -j `nproc` + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building ROCr debug agent. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 rocr_debug_agent-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./rocr_debug_agent-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocr_debug_agent | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocr_debug_agent | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./rocr_debug_agent-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_15_rocm_bandwidth_test.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_15_rocm_bandwidth_test.sh new file mode 100755 index 0000000..dcf02a7 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_15_rocm_bandwidth_test.sh @@ -0,0 +1,103 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. We might need cmake and git if nobody ran the higher-level +# build scripts. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the ROCm Bandwidth Test." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rocm_bandwidth_test ]; then + rm -rf ${SOURCE_DIR}/rocm_bandwidth_test + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download ROCm bandwidth test +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/rocm_bandwidth_test ]; then + git clone https://github.com/RadeonOpenCompute/rocm_bandwidth_test.git + cd rocm_bandwidth_test + git checkout ${ROCM_BANDWIDTH_TEST_CHECKOUT} +else + echo "Skipping download of ROCm Bandwidth Test, since ${SOURCE_DIR}/rocm_bandwidth_test already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading ROCm Bandwidth Test. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/rocm_bandwidth_test +mkdir -p build +cd build +# On CentOS/RHEL and AMD's binary .rpm distributions, libhsakmt is (by default +# installed into /opt/rocm/lib64/. rocm_bandwidth_test needs to link against +# libhsakmt.so, but it won't be found in the ROCR_LIB_DIR (which is +# /opt/rocm/lib/). Work around this set of problems by modifying the cmake +# file on this OS. +sed -i.bak 's/LINK_DIRECTORIES(${ROCR_LIB_DIR})/LINK_DIRECTORIES(${ROCR_LIB_DIR} ${ROCR_LIB_DIR}64)/' ../CMakeLists.txt +cmake -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR} -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DROCR_LIB_DIR=${ROCM_INPUT_DIR}/lib -DROCR_INC_DIR=${ROCM_INPUT_DIR}/include -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} .. +make -j `nproc` + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building ROCm Bandwidth Test. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 rocm_bandwidth_test-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./rocm_bandwidth_test-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocm_bandwidth_test | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocm_bandwidth_test | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./rocm_bandwidth_test-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/01_16_rocm_meta_packages.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/01_16_rocm_meta_packages.sh new file mode 100755 index 0000000..532140c --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/01_16_rocm_meta_packages.sh @@ -0,0 +1,128 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# This script only builds meta-packages which do not have source code. +# If we are not building packages, skip it. +if [ ${ROCM_FORCE_PACKAGE} = false ]; then + exit 0 +fi + +# Need to be able to build RPM files if we want to create meta-packages +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build meta-packages" + echo "You will need to have root privileges to do this." + sudo zypper -n in rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/meta_packages ]; then + rm -rf ${SOURCE_DIR}/meta_packages + fi +else + SOURCE_DIR=`mktemp -d` +fi +mkdir -p ${SOURCE_DIR}/meta_packages +cd ${SOURCE_DIR}/meta_packages + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "No code download is required for this. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "No build is required for this. Existing." + exit 0 +fi + +# Our three utilities/base ROCm meta-packages are: +# * rocm-dkms, which depends/installs: rocm-dev +# * rocm-dev, which depends/installs: hsa-rocr-dev, hsa-ext-rocr-dev, +# rocm-device-libs, rocm-utils, hcc, hip_base, hip_doc, hip_hcc, +# hip_samples, rocm-smi, hsakmt-roct, hsakmt-roct-dev, comgr, and +# rocr_debug_agent +# - The binary-source version of this package also installs the +# closed-source hsa-ext-rocr-dev and hsa-amd-aqlprofile. We skip +# those for this open source build. +# * rocm-utils, which depends/installs: rocminfo, rocm-clang-ocl, and +# rocm-cmake +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + for pkg_name in rocm-utils rocm-dev rocm-dkms; do + mkdir -p ${SOURCE_DIR}/meta_packages/${pkg_name} + cd ${SOURCE_DIR}/meta_packages/${pkg_name}/ + pushd ${BASE_DIR}/../common/ + cp ./${pkg_name}.spec ${SOURCE_DIR}/meta_packages/${pkg_name}/ + popd + sed -i 's/ROCM_PKG_VERSION/'${ROCM_VERSION_LONG}'/g' ./${pkg_name}.spec + sed -i 's#ROCM_OUTPUT_DIR#'${ROCM_OUTPUT_DIR%/}'#g' ./${pkg_name}.spec + mkdir -p $(pwd)/${ROCM_OUTPUT_DIR}/.info/ + if [ ${pkg_name} = "rocm-utils" ]; then + echo ${ROCM_VERSION_LONG} > $(pwd)/${ROCM_OUTPUT_DIR}/.info/version-utils + elif [ ${pkg_name} = "rocm-dev" ]; then + echo ${ROCM_VERSION_LONG} > $(pwd)/${ROCM_OUTPUT_DIR}/.info/version-dev + elif [ ${pkg_name} = "rocm-dkms" ]; then + echo ${ROCM_VERSION_LONG} > $(pwd)/${ROCM_OUTPUT_DIR}/.info/version + # On Fedora, we do not have rock-dkms, so remove it as a requirement + sed -i 's/Requires: rock-dkms//' ./${pkg_name}.spec + else + echo "Bad package name! ${pkg_name}" + exit 1 + fi + RPM_TEMP_DIR=`mktemp -d` + rpmbuild -bb --clean --define "_topdir ${RPM_TEMP_DIR}" ./${pkg_name}.spec + cp ${RPM_TEMP_DIR}/RPMS/x86_64/${pkg_name}-*.rpm . + rm -rf ${RPM_TEMP_DIR} + echo "Copying `ls -1 ${pkg_name}-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ${pkg_name}-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep ${pkg_name}- | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + FULL_PKG_NAME=`rpm -qa | grep ${pkg_name}- | head -n 1` + sudo rpm -e --nodeps ${FULL_PKG_NAME} + fi + sudo rpm -i ${pkg_name}-*.rpm + fi + done +else + # Normally, installing rocm-dkms handles this udev rule. + # Since we are skipping the package, "install" this rule here. + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + sudo mkdir -p /etc/udev/rules.d/ + echo 'SUBSYSTEM=="kfd", KERNEL=="kfd", TAG+="uaccess", GROUP="video"' | sudo tee /etc/udev/rules.d/70-kfd.rules + fi +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/03_00_rocblas.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/03_00_rocblas.sh new file mode 100755 index 0000000..5f57d8b --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/03_00_rocblas.sh @@ -0,0 +1,120 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the rocBLAS." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ gcc-fortran rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rocBLAS ]; then + rm -rf ${SOURCE_DIR}/rocBLAS + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download rocBLAS +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/rocBLAS ]; then + git clone https://github.com/ROCmSoftwarePlatform/rocBLAS.git + cd rocBLAS + git checkout ${ROCM_ROCBLAS_CHECKOUT} +else + echo "Skipping download of rocBLAS, since ${SOURCE_DIR}/rocBLAS already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading rocBLAS. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/rocBLAS +# manually editing a file until my PR(#500) gets merged and integrated into the next tag +sed -i 's/find_program(VIRTUALENV_PYTHON_EXE python)/find_program(VIRTUALENV_PYTHON_EXE python2)/' ./cmake/virtualenv.cmake +mkdir -p build/release +cd build/release +CXX=${ROCM_INPUT_DIR}/hcc/bin/hcc cmake -DPython_ADDITIONAL_VERSIONS=2.7 -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ ../.. +# Linking can take a large amount of memory, and it will fail if you do not +# have enough memory available per thread. As such, this # logic limits the +# number of build threads in response to the amount of available memory on +# the system. +MEM_AVAIL=`cat /proc/meminfo | grep MemTotal | awk {'print $2'}` +AVAIL_THREADS=`nproc` + +# Give about 4 GB to each building thread +MAX_THREADS=`echo $(( ${MEM_AVAIL} / $(( 1024 * 1024 * 4 )) ))` +if [ ${MAX_THREADS} -lt ${AVAIL_THREADS} ]; then + NUM_BUILD_THREADS=${MAX_THREADS} +else + NUM_BUILD_THREADS=${AVAIL_THREADS} +fi +if [ ${NUM_BUILD_THREADS} -lt 1 ]; then + NUM_BUILD_THREADS=1 +fi + +make -j ${NUM_BUILD_THREADS} + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building rocBLAS. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 rocblas-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./rocblas-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocblas | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocblas | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./rocblas-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo ${ROCM_OUTPUT_DIR}/lib | ${ROCM_SUDO_COMMAND} tee -a /etc/ld.so.conf.d/rocblas.conf + fi +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/03_01_hipblas.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/03_01_hipblas.sh new file mode 100755 index 0000000..2d74b9e --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/03_01_hipblas.sh @@ -0,0 +1,102 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the hipBLAS." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ libboost_program_options1_66_0 rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/hipBLAS ]; then + rm -rf ${SOURCE_DIR}/hipBLAS + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download hipBLAS +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/hipBLAS ]; then + git clone https://github.com/ROCmSoftwarePlatform/hipBLAS.git + cd hipBLAS + git checkout ${ROCM_HIPBLAS_CHECKOUT} +else + echo "Skipping download of hipBLAS, since ${SOURCE_DIR}/hipBLAS already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading hipBLAS. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/hipBLAS +# manually editing a file until my PR(#78) gets merged and integrated into the next tag +sed -i '/find_package( CUDA QUIET )/d' CMakeLists.txt +mkdir -p build/release +cd build/release +CXX=${ROCM_INPUT_DIR}/hcc/bin/hcc cmake -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ ../.. +make -j `nproc` + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building hipBLAS. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 hipblas-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./hipblas-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep hipblas | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep hipblas | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./hipblas-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo ${ROCM_OUTPUT_DIR}/lib | ${ROCM_SUDO_COMMAND} tee -a /etc/ld.so.conf.d/hipblas.conf + fi +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/03_02_rocfft.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/03_02_rocfft.sh new file mode 100755 index 0000000..23501b7 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/03_02_rocfft.sh @@ -0,0 +1,120 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the rocFFT." + echo "You will need to have root privileges to do this." + # Need fftw3-devel somewhere + sudo zypper -n in cmake pkg-config git gcc-c++ libboost_program_options1_66_0 fftw3-devel rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rocFFT ]; then + rm -rf ${SOURCE_DIR}/rocFFT + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download rocFFT +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/rocFFT ]; then + git clone https://github.com/ROCmSoftwarePlatform/rocFFT.git + cd rocFFT + git checkout ${ROCM_ROCFFT_CHECKOUT} +else + echo "Skipping download of rocFFT, since ${SOURCE_DIR}/rocFFT already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading rocFFT. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/rocFFT +sed -i '/find_package( CUDA QUIET )/d' CMakeLists.txt +mkdir -p build/release +cd build/release +CXX=${ROCM_INPUT_DIR}/hcc/bin/hcc cmake -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ ../../ +# Linking can take a large amount of memory, and it will fail if you do not +# have enough memory available per thread. As such, this # logic limits the +# number of build threads in response to the amount of available memory on +# the system. +MEM_AVAIL=`cat /proc/meminfo | grep MemTotal | awk {'print $2'}` +AVAIL_THREADS=`nproc` + +# Give about 16 GB to each building thread for rocFFG +MAX_THREADS=`echo $(( ${MEM_AVAIL} / $(( 1024 * 1024 * 16 )) ))` +if [ ${MAX_THREADS} -lt ${AVAIL_THREADS} ]; then + NUM_BUILD_THREADS=${MAX_THREADS} +else + NUM_BUILD_THREADS=${AVAIL_THREADS} +fi +if [ ${NUM_BUILD_THREADS} -lt 1 ]; then + NUM_BUILD_THREADS=1 +fi + +make -j ${NUM_BUILD_THREADS} + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building rocFFT. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 rocfft-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./rocfft-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocfft | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocfft | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./rocfft-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo ${ROCM_OUTPUT_DIR}/lib | ${ROCM_SUDO_COMMAND} tee -a /etc/ld.so.conf.d/rocfft.conf + fi +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/03_03_rocrand.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/03_03_rocrand.sh new file mode 100755 index 0000000..a434327 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/03_03_rocrand.sh @@ -0,0 +1,133 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the rocRAND." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ libboost_program_options1_66_0 gcc-fortran rpm-build python2-pip + sudo pip install pyyaml + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rocRAND ]; then + rm -rf ${SOURCE_DIR}/rocRAND + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download rocRAND +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/rocRAND ]; then + git clone https://github.com/ROCmSoftwarePlatform/rocRAND.git + cd rocRAND + git checkout ${ROCM_ROCRAND_CHECKOUT} +else + echo "Skipping download of rocRAND, since ${SOURCE_DIR}/rocRAND already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading rocRAND. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/rocRAND +mkdir -p build/release +cd build/release +HIP_PLATFORM=hcc ROCM_PATH=${ROCM_INPUT_DIR} CXX=${ROCM_INPUT_DIR}/hcc/bin/hcc cmake -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCMAKE_MODULE_PATH=${ROCM_INPUT_DIR}/hip/cmake/ -DBUILD_TEST=OFF ../../ +# Linking can take a large amount of memory, and it will fail if you do not +# have enough memory available per thread. As such, this # logic limits the +# number of build threads in response to the amount of available memory on +# the system. +MEM_AVAIL=`cat /proc/meminfo | grep MemTotal | awk {'print $2'}` +AVAIL_THREADS=`nproc` + +# Give about 4 GB to each building thread +MAX_THREADS=`echo $(( ${MEM_AVAIL} / $(( 1024 * 1024 * 4 )) ))` +if [ ${MAX_THREADS} -lt ${AVAIL_THREADS} ]; then + NUM_BUILD_THREADS=${MAX_THREADS} +else + NUM_BUILD_THREADS=${AVAIL_THREADS} +fi +if [ ${NUM_BUILD_THREADS} -lt 1 ]; then + NUM_BUILD_THREADS=1 +fi + +make -j ${NUM_BUILD_THREADS} + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building rocRAND. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 rocrand-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./rocrand-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocrand | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocrand | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./rocrand-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/hiprand/include/../../include/ + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/hiprand/lib/../../lib/cmake/hiprand + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo ${ROCM_OUTPUT_DIR}/hiprand/lib | ${ROCM_SUDO_COMMAND} tee -a /etc/ld.so.conf.d/hiprand.conf + fi + ${ROCM_SUDO_COMMAND} ln -sfr ${ROCM_OUTPUT_DIR}/hiprand/include ${ROCM_OUTPUT_DIR}/hiprand/include/../../include/hiprand + ${ROCM_SUDO_COMMAND} ln -sfr ${ROCM_OUTPUT_DIR}/hiprand/lib/libhiprand.so ${ROCM_OUTPUT_DIR}/hiprand/lib/../../lib/libhiprand.so + ${ROCM_SUDO_COMMAND} ln -sfr ${ROCM_OUTPUT_DIR}/hiprand/lib/cmake/hiprand ${ROCM_OUTPUT_DIR}/hiprand/lib/../../lib/cmake/hiprand + + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/rocrand/include/../../include/ + ${ROCM_SUDO_COMMAND} mkdir -p ${ROCM_OUTPUT_DIR}/rocrand/lib/../../lib/cmake/rocrand + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo ${ROCM_OUTPUT_DIR}/rocrand/lib | ${ROCM_SUDO_COMMAND} tee -a /etc/ld.so.conf.d/rocrand.conf + fi + ${ROCM_SUDO_COMMAND} ln -sfr ${ROCM_OUTPUT_DIR}/rocrand/include ${ROCM_OUTPUT_DIR}/rocrand/include/../../include/rocrand + ${ROCM_SUDO_COMMAND} ln -sfr ${ROCM_OUTPUT_DIR}/rocrand/lib/librocrand.so ${ROCM_OUTPUT_DIR}/rocrand/lib/../../lib/librocrand.so + ${ROCM_SUDO_COMMAND} ln -sfr ${ROCM_OUTPUT_DIR}/rocrand/lib/cmake/rocrand ${ROCM_OUTPUT_DIR}/rocrand/lib/../../lib/cmake/rocrand +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/03_04_rocprim.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/03_04_rocprim.sh new file mode 100755 index 0000000..3395d5d --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/03_04_rocprim.sh @@ -0,0 +1,110 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# For most scripts this would be in common_options.sh +# This, however, being a new addition, I'm keeping it confined to the distro-specific part +ROCM_ROCPRIM_CHECKOUT="2.3" + +# Install pre-reqs. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the rocPRIM." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ libboost_program_options1_66_0 rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rocPRIM ]; then + rm -rf ${SOURCE_DIR}/rocPRIM + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download rocPRIM +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/rocPRIM ]; then + git clone https://github.com/ROCmSoftwarePlatform/rocPRIM.git + cd rocPRIM + git checkout ${ROCM_ROCPRIM_CHECKOUT} +else + echo "Skipping download of rocPRIM, since ${SOURCE_DIR}/rocPRIM already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading rocPRIM. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/rocPRIM +mkdir -p build/release + +# Fix some hard-coded locations in the CMake files +git checkout ./cmake/Dependencies.cmake +sed -i s'#/opt/rocm/bin/hcc#${HIP_HCC_EXECUTABLE} -DCMAKE_PREFIX_PATH='"${ROCM_INPUT_DIR}"' -DCMAKE_MODULE_PATH='"${ROCM_INPUT_DIR}"'/hip/cmake/#' ./cmake/Dependencies.cmake + +cd build/release +HIP_PLATFORM=hcc CXX=${ROCM_INPUT_DIR}/hcc/bin/hcc cmake -DHIP_PLATFORM=hcc -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCMAKE_PREFIX_PATH=${ROCM_INPUT_DIR} -DCMAKE_MODULE_PATH=${ROCM_INPUT_DIR}/hip/cmake/ ../../ +make -j `nproc` + + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building rocPRIM. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 rocprim-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./rocprim-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocprim | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocprim | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./rocprim-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo ${ROCM_OUTPUT_DIR}/lib | ${ROCM_SUDO_COMMAND} tee -a /etc/ld.so.conf.d/rocprim.conf + fi +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/03_05_rocsparse.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/03_05_rocsparse.sh new file mode 100755 index 0000000..d868a1f --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/03_05_rocsparse.sh @@ -0,0 +1,107 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + + +# Install pre-reqs. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the rocSPARSE." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ libboost_program_options1_66_0 rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rocSPARSE ]; then + rm -rf ${SOURCE_DIR}/rocSPARSE + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download rocSPARSE +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/rocSPARSE ]; then + git clone https://github.com/ROCmSoftwarePlatform/rocSPARSE.git + cd rocSPARSE + git checkout ${ROCM_ROCSPARSE_CHECKOUT} +else + echo "Skipping download of rocSPARSE, since ${SOURCE_DIR}/rocSPARSE already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading rocSPARSE. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/rocSPARSE +mkdir -p build/release + +# Fix some hard-coded locations in the CMake files +git checkout ./cmake/Dependencies.cmake +sed -i s'#/opt/rocm/bin/hcc#${HIP_HCC_EXECUTABLE} -DCMAKE_PREFIX_PATH='"${ROCM_INPUT_DIR}"' -DCMAKE_MODULE_PATH='"${ROCM_INPUT_DIR}"'/hip/cmake/#' ./cmake/Dependencies.cmake + +cd build/release +HIP_PLATFORM=hcc CXX=${ROCM_INPUT_DIR}/hcc/bin/hcc cmake -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCMAKE_PREFIX_PATH=${ROCM_INPUT_DIR} -DCMAKE_MODULE_PATH=${ROCM_INPUT_DIR}/hip/cmake/ ../../ +make -j `nproc` + + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building rocSPARSE. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 rocsparse-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./rocsparse-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocsparse | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocsparse | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./rocsparse-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo ${ROCM_OUTPUT_DIR}/lib | ${ROCM_SUDO_COMMAND} tee -a /etc/ld.so.conf.d/rocsparse.conf + fi +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/03_06_hipsparse.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/03_06_hipsparse.sh new file mode 100755 index 0000000..7dabd2e --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/03_06_hipsparse.sh @@ -0,0 +1,100 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the hipSPARSE." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git gcc-c++ make rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/hipSPARSE ]; then + rm -rf ${SOURCE_DIR}/hipSPARSE + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download hipSPARSE +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/hipSPARSE ]; then + git clone https://github.com/ROCmSoftwarePlatform/hipSPARSE.git + cd hipSPARSE + git checkout ${ROCM_HIPSPARSE_CHECKOUT} +else + echo "Skipping download of hipSPARSE, since ${SOURCE_DIR}/hipSPARSE already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading hipSPARSE. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/hipSPARSE +mkdir -p build/release +cd build/release +cmake -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCMAKE_PREFIX_PATH="${ROCM_INPUT_DIR}/hip/;${ROCM_INPUT_DIR}/hcc/" ../../ +LD_LIBRARY_PATH=${ROCM_INPUT_DIR}/hsa/lib/:${ROCM_INPUT_DIR}/lib/:${LD_LIBRARY_PATH} make -j `nproc` + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building hipSPARSE. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 hipsparse-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./hipsparse-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep hipsparse | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep hipsparse | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./hipsparse-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo ${ROCM_OUTPUT_DIR}/lib | ${ROCM_SUDO_COMMAND} tee -a /etc/ld.so.conf.d/hipsparse.conf + fi +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/03_07_rocalution.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/03_07_rocalution.sh new file mode 100755 index 0000000..398b45b --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/03_07_rocalution.sh @@ -0,0 +1,125 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the rocALUTION." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git gcc-c++ libboost_program_options1_66_0 rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rocALUTION ]; then + rm -rf ${SOURCE_DIR}/rocALUTION + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download rocALUTION +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/rocALUTION ]; then + git clone https://github.com/ROCmSoftwarePlatform/rocALUTION.git + cd rocALUTION + git checkout ${ROCM_ROCALUTION_CHECKOUT} +else + echo "Skipping download of rocALUTION, since ${SOURCE_DIR}/rocALUTION already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading rocALUTION. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/rocALUTION +mkdir -p build/release +# Fix some hard-coded locations in the CMake files +git checkout ${SOURCE_DIR}/rocALUTION/cmake/Dependencies.cmake +sed -i 's#/opt/rocm/bin/hcc#${HIP_HCC_EXECUTABLE} -DCMAKE_PREFIX_PATH='"${ROCM_INPUT_DIR}"' -DCMAKE_MODULE_PATH='"${ROCM_INPUT_DIR}"'/hip/cmake/#' ${SOURCE_DIR}/rocALUTION/cmake/Dependencies.cmake +git checkout ${SOURCE_DIR}/rocALUTION/src/CMakeLists.txt +sed -i "s#-O3#-O3 -I${ROCM_INPUT_DIR}/include/ -I${SOURCE_DIR}/rocALUTION/build/release/rocPRIM/hipcub/include -I${SOURCE_DIR}/rocALUTION/build/release/rocPRIM/include/#" ${SOURCE_DIR}/rocALUTION/src/CMakeLists.txt +sed -i "s#-g#-g -I${ROCM_INPUT_DIR}/include/ -I${SOURCE_DIR}/rocALUTION/build/release/rocPRIM/hipcub/include -I${SOURCE_DIR}/rocALUTION/build/release/rocPRIM/include/#" ${SOURCE_DIR}/rocALUTION/src/CMakeLists.txt + +cd build/release +HIP_PLATFORM=hcc CXX=${ROCM_INPUT_DIR}/hcc/bin/hcc cmake -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCMAKE_PREFIX_PATH="${ROCM_INPUT_DIR}/hip/;${ROCM_INPUT_DIR}/hcc/" ../../ +# Linking can take a large amount of memory, and it will fail if you do not +# have enough memory available per thread. As such, this # logic limits the +# number of build threads in response to the amount of available memory on +# the system. +MEM_AVAIL=`cat /proc/meminfo | grep MemTotal | awk {'print $2'}` +AVAIL_THREADS=`nproc` + +# Give about 4 GB to each building thread +MAX_THREADS=`echo $(( ${MEM_AVAIL} / $(( 1024 * 1024 * 4 )) ))` +if [ ${MAX_THREADS} -lt ${AVAIL_THREADS} ]; then + NUM_BUILD_THREADS=${MAX_THREADS} +else + NUM_BUILD_THREADS=${AVAIL_THREADS} +fi +if [ ${NUM_BUILD_THREADS} -lt 1 ]; then + NUM_BUILD_THREADS=1 +fi + +LD_LIBRARY_PATH=${ROCM_INPUT_DIR}/lib/:${ROCM_INPUT_DIR}/hsa/lib/ HCC_HOME=${ROCM_INPUT_DIR}/hcc/ HSA_PATH=${ROCM_INPUT_DIR}/hsa/ ROCM_PATH=${ROCM_INPUT_DIR}/ HIP_PLATFORM=hcc make -j ${NUM_BUILD_THREADS} + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building rocALUTION. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 rocalution-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./rocalution-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocalution | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocalution | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./rocalution-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo ${ROCM_OUTPUT_DIR}/lib | ${ROCM_SUDO_COMMAND} tee -a /etc/ld.so.conf.d/rocalution.conf + fi +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/03_08_miopengemm.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/03_08_miopengemm.sh new file mode 100755 index 0000000..7a5081d --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/03_08_miopengemm.sh @@ -0,0 +1,118 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the MIOpenGEMM." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/MIOpenGEMM ]; then + rm -rf ${SOURCE_DIR}/MIOpenGEMM + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download MIOpenGEMM +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/MIOpenGEMM ]; then + git clone https://github.com/ROCmSoftwarePlatform/MIOpenGEMM.git + cd MIOpenGEMM + git checkout ${ROCM_MIOPENGEMM_CHECKOUT} +else + echo "Skipping download of MIOpenGEMM, since ${SOURCE_DIR}/MIOpenGEMM already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading MIOpenGEMM. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/MIOpenGEMM +mkdir -p build +cd build +cmake -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DOPENCL_LIBRARIES=${ROCM_INPUT_DIR}/opencl/lib/x86_64/ -DOPENCL_INCLUDE_DIRS=${ROCM_INPUT_DIR}/opencl/include/ .. +# Linking can take a large amount of memory, and it will fail if you do not +# have enough memory available per thread. As such, this # logic limits the +# number of build threads in response to the amount of available memory on +# the system. +MEM_AVAIL=`cat /proc/meminfo | grep MemTotal | awk {'print $2'}` +AVAIL_THREADS=`nproc` + +# Give about 4 GB to each building thread +MAX_THREADS=`echo $(( ${MEM_AVAIL} / $(( 1024 * 1024 * 4 )) ))` +if [ ${MAX_THREADS} -lt ${AVAIL_THREADS} ]; then + NUM_BUILD_THREADS=${MAX_THREADS} +else + NUM_BUILD_THREADS=${AVAIL_THREADS} +fi +if [ ${NUM_BUILD_THREADS} -lt 1 ]; then + NUM_BUILD_THREADS=1 +fi + +make -j ${NUM_BUILD_THREADS} + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building MIOpenGEMM. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 miopengemm-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./miopengemm-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep miopengemm | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep miopengemm | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./miopengemm-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo ${ROCM_OUTPUT_DIR}/lib | ${ROCM_SUDO_COMMAND} tee -a /etc/ld.so.conf.d/miopengemm.conf + fi +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/03_09_miopen.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/03_09_miopen.sh new file mode 100755 index 0000000..1d0697b --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/03_09_miopen.sh @@ -0,0 +1,151 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "--miopen_option" "$@" + +# Install pre-reqs. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the MIOpen." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ openssl libopenssl-devel libboost_system1_66_0-devel libboost_filesystem1_66_0 libboost_filesystem1_66_0-devel unzip wget bzip2 rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/MIOpen ]; then + rm -rf ${SOURCE_DIR}/MIOpen + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download MIOpen +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/MIOpen ]; then + mkdir -p ${SOURCE_DIR}/half + cd half + wget https://sourceforge.net/projects/half/files/half/1.12.0/half-1.12.0.zip + unzip -o half-1.12.0.zip + HALF_DIR=${SOURCE_DIR}/half/ + + cd ${SOURCE_DIR} + git clone https://github.com/ROCmSoftwarePlatform/MIOpen.git + cd MIOpen + git checkout ${ROCM_MIOPEN_CHECKOUT} +else + echo "Skipping download of MIOpen, since ${SOURCE_DIR}/MIOpen already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading MIOpen. Exiting." + exit 0 +fi + +HALF_DIR=${SOURCE_DIR}/half/ +cd ${SOURCE_DIR}/MIOpen +mkdir -p build +cd build +if [ ${MIOPEN_FORCE_OPENCL} = false ]; then + CXX=${ROCM_INPUT_DIR}/hcc/bin/hcc cmake -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DHALF_INCLUDE_DIR=${HALF_DIR}/include/ -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DMIOPEN_BACKEND=HIP -DCMAKE_PREFIX_PATH="${ROCM_INPUT_DIR}/hip/;${ROCM_INPUT_DIR}/hcc/;${ROCM_INPUT_DIR}/bin/;${ROCM_INPUT_DIR}" .. +else + CXX=${ROCM_INPUT_DIR}/hcc/bin/hcc cmake -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DHALF_INCLUDE_DIR=${HALF_DIR}/include/ -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DMIOPEN_BACKEND=OpenCL -DOPENCL_LIBRARIES=${ROCM_INPUT_DIR}/opencl/lib/x86_64/ -DOPENCL_INCLUDE_DIRS=${ROCM_INPUT_DIR}/opencl/include/ .. +fi + +# Linking can take a large amount of memory, and it will fail if you do not +# have enough memory available per thread. As such, this # logic limits the +# number of build threads in response to the amount of available memory on +# the system. +MEM_AVAIL=`cat /proc/meminfo | grep MemTotal | awk {'print $2'}` +AVAIL_THREADS=`nproc` + +# Give about 4 GB to each building thread +MAX_THREADS=`echo $(( ${MEM_AVAIL} / $(( 1024 * 1024 * 4 )) ))` +if [ ${MAX_THREADS} -lt ${AVAIL_THREADS} ]; then + NUM_BUILD_THREADS=${MAX_THREADS} +else + NUM_BUILD_THREADS=${AVAIL_THREADS} +fi +if [ ${NUM_BUILD_THREADS} -lt 1 ]; then + NUM_BUILD_THREADS=1 +fi + +make -j ${NUM_BUILD_THREADS} + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building MIOpen. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + if [ ${MIOPEN_FORCE_OPENCL} = false ]; then + echo "Copying `ls -1 MIOpen-HIP-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./MIOpen-HIP-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep miopen-hip | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep miopen-hip | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./MIOpen-HIP-*.rpm + fi + else + echo "Copying `ls -1 MIOpen-OpenCL-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./MIOpen-OpenCL-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep miopen-opencl | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep miopen-opencl | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./MIOpen-OpenCL-*.rpm + fi + fi +else + ${ROCM_SUDO_COMMAND} make install + + if [ ${MIOPEN_FORCE_OPENCL} = false ]; then + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo ${ROCM_OUTPUT_DIR}/lib | ${ROCM_SUDO_COMMAND} tee -a /etc/ld.so.conf.d/MIOpen-HIP.conf + fi + else + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo ${ROCM_OUTPUT_DIR}/lib | ${ROCM_SUDO_COMMAND} tee -a /etc/ld.so.conf.d/MIOpen-OpenCL.conf + fi + fi +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/03_10_library_meta_packages.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/03_10_library_meta_packages.sh new file mode 100755 index 0000000..cd89ad8 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/03_10_library_meta_packages.sh @@ -0,0 +1,101 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# This script only builds meta-packages which do not have source code. +# If we are not building packages, skip it. +if [ ${ROCM_FORCE_PACKAGE} = false ]; then + exit 0 +fi + +# Need to be able to build RPM files if we want to create meta-packages +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build meta-packages" + echo "You will need to have root privileges to do this." + sudo zypper -n in rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/meta_packages ]; then + rm -rf ${SOURCE_DIR}/meta_packages + fi +else + SOURCE_DIR=`mktemp -d` +fi +mkdir -p ${SOURCE_DIR}/meta_packages +cd ${SOURCE_DIR}/meta_packages + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "No code download is required for this. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "No build is required for this. Existing." + exit 0 +fi + +# Our libraries ROCm meta-package is: +# * rocm-libs, which depends/installs: rocblas, rocfft, rocrand, and hipblas +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + for pkg_name in rocm-libs; do + mkdir -p ${SOURCE_DIR}/meta_packages/${pkg_name} + cd ${SOURCE_DIR}/meta_packages/${pkg_name}/ + pushd ${BASE_DIR}/../common/ + cp ./${pkg_name}.spec ${SOURCE_DIR}/meta_packages/${pkg_name}/ + popd + sed -i 's/ROCM_PKG_VERSION/'${ROCM_VERSION_LONG}'/g' ./${pkg_name}.spec + sed -i 's#ROCM_OUTPUT_DIR#'${ROCM_OUTPUT_DIR%/}'#g' ./${pkg_name}.spec + mkdir -p $(pwd)/${ROCM_OUTPUT_DIR}/.info/ + echo ${ROCM_VERSION_LONG} > $(pwd)/${ROCM_OUTPUT_DIR}/.info/version-libs + RPM_TEMP_DIR=`mktemp -d` + rpmbuild -bb --clean --define "_topdir ${RPM_TEMP_DIR}" ./${pkg_name}.spec + cp ${RPM_TEMP_DIR}/RPMS/x86_64/${pkg_name}-*.rpm . + rm -rf ${RPM_TEMP_DIR} + echo "Copying `ls -1 ${pkg_name}-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ${pkg_name}-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep ${pkg_name} | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + FULL_PKG_NAME=`rpm -qa | grep ${pkg_name} | head -n 1` + sudo rpm -e --nodeps ${FULL_PKG_NAME} + fi + sudo rpm -i ${pkg_name}-*.rpm + fi + done +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/03_11_hip-thrust.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/03_11_hip-thrust.sh new file mode 100755 index 0000000..cb7d6f2 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/03_11_hip-thrust.sh @@ -0,0 +1,100 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build HIP Thrust." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/Thrust ]; then + rm -rf ${SOURCE_DIR}/Thrust + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download HIP Thrust +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/Thrust ]; then + git clone --recursive https://github.com/ROCmSoftwarePlatform/Thrust.git + cd Thrust + git checkout ${ROCM_HIPTHRUST_CHECKOUT} + git submodule update + sed -i 's/set(CPACK_RPM_PACKAGE_DEPENDS "cub-hip")//' ./CMakeLists.txt + # Someone committed a bunch of hidden .swp files to cub-hip. These can + # break package installs, so kill them here. + for i in `find ./ -name \*.swp`; do rm -f ${i}; done +else + echo "Skipping download of HIP Thrust, since ${SOURCE_DIR}/Thrust already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading HIP Thrust. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/Thrust +mkdir -p build +cd build +cmake -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DBUILD_VERSION_MAJOR=${ROCM_VERSION_MAJOR} -DBUILD_VERSION_MINOR=${ROCM_VERSION_MINOR} -DBUILD_VERSION_PATCH=${ROCM_VERSION_PATCH} .. + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Nothing to build for HIP Thrust. It is a header-only library. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 Thrust-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./Thrust-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep Thrust | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep Thrust | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./Thrust-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/03_12_rocm_smi64.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/03_12_rocm_smi64.sh new file mode 100755 index 0000000..ff07fc0 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/03_12_rocm_smi64.sh @@ -0,0 +1,97 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the ROCm SMI Lib." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ graphviz rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rocm_smi_lib ]; then + rm -rf ${SOURCE_DIR}/rocm_smi_lib + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download ROCm SMI Lib +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/rocm_smi_lib ]; then + git clone https://github.com/RadeonOpenCompute/rocm_smi_lib.git + cd rocm_smi_lib + git checkout ${ROCM_SMILIB_CHECKOUT} +else + echo "Skipping download of ROCm SMI Lib, since ${SOURCE_DIR}/rocm_smi_lib already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading ROCm SMI Lib. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/rocm_smi_lib +mkdir -p build +cd build +cmake -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ .. + +make -j `nproc` + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building ROCm SMI Lib. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 rocm_smi_lib64-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./rocm_smi_lib64-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rocm_smi_lib64 | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rocm_smi_lib64 | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./rocm_smi_lib64-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/03_13_rccl.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/03_13_rccl.sh new file mode 100755 index 0000000..7031402 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/03_13_rccl.sh @@ -0,0 +1,101 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +# Install pre-reqs. +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build the RCCL." + echo "You will need to have root privileges to do this." + sudo zypper -n in cmake pkg-config git make gcc-c++ rpm-build + if [ ${ROCM_INSTALL_PREREQS} = true ] && [ ${ROCM_FORCE_GET_CODE} = false ]; then + exit 0 + fi +fi + +# Set up source-code directory +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rccl ]; then + rm -rf ${SOURCE_DIR}/rccl + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} + +# Download RCCL +if [ ${ROCM_FORCE_GET_CODE} = true ] || [ ! -d ${SOURCE_DIR}/rccl ]; then + git clone https://github.com/ROCmSoftwarePlatform/rccl.git + cd rccl + git checkout ${ROCM_RCCL_CHECKOUT} +else + echo "Skipping download of RCCL, since ${SOURCE_DIR}/rccl already exists." +fi + +if [ ${ROCM_FORCE_GET_CODE} = true ]; then + echo "Finished downloading RCCL. Exiting." + exit 0 +fi + +cd ${SOURCE_DIR}/rccl +mkdir -p build +cd build +HIP_PLATFORM=hcc ROCM_PATH=${ROCM_INPUT_DIR} CXX=${ROCM_INPUT_DIR}/bin/hcc cmake -DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ -DCPACK_GENERATOR=RPM ${ROCM_CPACK_RPM_PERMISSIONS} -DCMAKE_BUILD_TYPE=${ROCM_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${ROCM_OUTPUT_DIR}/ .. + +make -j `nproc` + +if [ ${ROCM_FORCE_BUILD_ONLY} = true ]; then + echo "Finished building RCCL. Exiting." + exit 0 +fi + +if [ ${ROCM_FORCE_PACKAGE} = true ]; then + make package + echo "Copying `ls -1 rccl-*.rpm` to ${ROCM_PACKAGE_DIR}" + mkdir -p ${ROCM_PACKAGE_DIR} + cp ./rccl-*.rpm ${ROCM_PACKAGE_DIR} + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + ROCM_PKG_IS_INSTALLED=`rpm -qa | grep rccl | wc -l` + if [ ${ROCM_PKG_IS_INSTALLED} -gt 0 ]; then + PKG_NAME=`rpm -qa | grep rccl | head -n 1` + sudo rpm -e --nodeps ${PKG_NAME} + fi + sudo rpm -i ./rccl-*.rpm + fi +else + ${ROCM_SUDO_COMMAND} make install + + if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo ${ROCM_OUTPUT_DIR}/lib | ${ROCM_SUDO_COMMAND} tee -a /etc/ld.so.conf.d/rccl.conf + fi +fi + +if [ $ROCM_SAVE_SOURCE = false ]; then + rm -rf ${SOURCE_DIR} +fi diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/common/common_options.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/common/common_options.sh new file mode 120000 index 0000000..7ac2715 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/common/common_options.sh @@ -0,0 +1 @@ +../../common_options.sh \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_02_rocr.patch b/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_02_rocr.patch new file mode 120000 index 0000000..7ae19ea --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_02_rocr.patch @@ -0,0 +1 @@ +../../../../shared_files/patches/rocr_cmake.patch \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_03_rocm_smi.patch b/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_03_rocm_smi.patch new file mode 120000 index 0000000..4c5f735 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_03_rocm_smi.patch @@ -0,0 +1 @@ +../../../../shared_files/patches/rocm-smi_version.patch \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_09_hcc.patch b/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_09_hcc.patch new file mode 100644 index 0000000..77c6661 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_09_hcc.patch @@ -0,0 +1,38 @@ +# The patch for OpenSuSE is slightly different than the patch for other distros. +# We need to change pth to libnpth0 because the package was renamed. +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,6 +11,8 @@ IF (NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: Release Debug" FORCE) + ENDIF(NOT CMAKE_BUILD_TYPE) + ++option(HCC_OPEN_SOURCE_BUILD "Build HCC for installation on purely open source ROCm builds which do not supply closed-source extensions." OFF) ++ + # Use two different methods to determine host distribution: lsb_release and if that fails grep /etc/os-release + find_program( lsb_executable lsb_release ) + +@@ -556,10 +558,13 @@ endif( USE_LIBCXX ) + # for non-official release build, we want to relax the dependency on rocr runtime + if (OFFICIAL_RELEASE_BUILD) + if (HCC_INTEGRATE_ROCDL) +- set(HCC_ROCR_DEP ", hsa-rocr-dev, hsa-ext-rocr-dev, rocm-utils") ++ set(HCC_ROCR_DEP ", hsa-rocr-dev, rocminfo") + else (HCC_INTEGRATE_ROCDL) +- set(HCC_ROCR_DEP ", hsa-rocr-dev, hsa-ext-rocr-dev, rocm-device-libs, rocm-utils") ++ set(HCC_ROCR_DEP ", hsa-rocr-dev, rocm-device-libs, rocminfo") + endif(HCC_INTEGRATE_ROCDL) ++ if (NOT HCC_OPEN_SOURCE_BUILD) ++ string(CONCAT "${HCC_ROCR_DEP}" ", hsa-ext-rocr-dev") ++ endif(NOT HCC_OPEN_SOURCE_BUILD) + else (OFFICIAL_RELEASE_BUILD) + set(HCC_ROCR_DEP "") + endif (OFFICIAL_RELEASE_BUILD) +@@ -574,7 +579,7 @@ set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/packaging/debian/ + # disable automatic shared libraries dependency detection + set(CPACK_RPM_PACKAGE_AUTOREQ 0) + +-set(HCC_GENERAL_RPM_DEP "coreutils, findutils, elfutils-libelf, pciutils-libs, file, pth") ++set(HCC_GENERAL_RPM_DEP "coreutils, findutils, elfutils, pciutils, file, libnpth0") + if ( USE_LIBCXX ) + set(HCC_LIBCXX_RPM_DEP ", libc++1, libc++abi1") + else ( USE_LIBCXX ) diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_10_hip.patch b/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_10_hip.patch new file mode 120000 index 0000000..172c413 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_10_hip.patch @@ -0,0 +1 @@ +../../../../shared_files/patches/hip_cmake.patch \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_14_rocr_debug_agent.patch b/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_14_rocr_debug_agent.patch new file mode 120000 index 0000000..fab4c4f --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/patches/01_14_rocr_debug_agent.patch @@ -0,0 +1 @@ +../../../../shared_files/patches/rocr_debug_agent_gcc_8.patch \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/etc b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/etc new file mode 120000 index 0000000..ee84582 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/etc @@ -0,0 +1 @@ +../../../../shared_files/shared_rock_files/etc/ \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/share/dkms/modules_to_force_install/amdgpu b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/share/dkms/modules_to_force_install/amdgpu new file mode 100644 index 0000000..75f88fb --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/share/dkms/modules_to_force_install/amdgpu @@ -0,0 +1 @@ +amdgpu diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/Makefile b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/Makefile new file mode 120000 index 0000000..a311a1e --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/Makefile @@ -0,0 +1 @@ +../../../../../../../shared_files/shared_rock_files/Makefile \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/dkms.conf b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/dkms.conf new file mode 100644 index 0000000..3df22e5 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/dkms.conf @@ -0,0 +1,43 @@ +PACKAGE_NAME="amdgpu" +PACKAGE_VERSION="2.0-89" +AUTOINSTALL="yes" +REMAKE_INITRD="yes" +PRE_BUILD="pre-build.sh $kernelver" + +# not work with RHEL DKMS +#MODULES_CONF[0]="blacklist radeon" + +BUILT_MODULE_NAME[0]="amdgpu" +BUILT_MODULE_LOCATION[0]="amd/amdgpu" +DEST_MODULE_LOCATION[0]="/updates" + +BUILT_MODULE_NAME[1]="amdttm" +BUILT_MODULE_LOCATION[1]="ttm" +DEST_MODULE_LOCATION[1]="/updates" + +BUILT_MODULE_NAME[2]="amdkcl" +BUILT_MODULE_LOCATION[2]="amd/amdkcl" +DEST_MODULE_LOCATION[2]="/updates" + +BUILT_MODULE_NAME[3]="amdchash" +BUILT_MODULE_LOCATION[3]="amd/lib" +DEST_MODULE_LOCATION[3]="/updates" + +BUILT_MODULE_NAME[4]="amd-sched" +BUILT_MODULE_LOCATION[4]="scheduler" +DEST_MODULE_LOCATION[4]="/updates" + +# Find out how many CPU cores can be use if we pass appropriate -j option to make. +# DKMS could use all cores on multicore systems to build the kernel module. +num_cpu_cores() +{ + if [ -x /usr/bin/nproc ]; then + nproc + else + echo "1" + fi +} + +MAKE[0]="make -j$(num_cpu_cores) kdir=$kernel_source_dir -C $kernel_source_dir M=$dkms_tree/$module/$module_version/build" +POST_REMOVE="post-remove.sh $kernelver" +POST_INSTALL="post-install.sh $kernelver" diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/firmware.tar.xz b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/firmware.tar.xz new file mode 120000 index 0000000..1b1b602 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/firmware.tar.xz @@ -0,0 +1 @@ +../../../../../../../shared_files/shared_rock_files/firmware.tar.xz \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/post-install.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/post-install.sh new file mode 100755 index 0000000..bf3c165 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/post-install.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +update-initramfs -u -k $(uname -r) diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/post-remove.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/post-remove.sh new file mode 100755 index 0000000..54a1e9d --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/post-remove.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +FW_DIR="/lib/firmware/$1" +rm -rf $FW_DIR/radeon +rm -rf $FW_DIR/amdgpu +[[ ! $(ls -A $FW_DIR) ]] && rm -rf $FW_DIR diff --git a/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/pre-build.sh b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/pre-build.sh new file mode 100755 index 0000000..bafed5f --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/component_scripts/rock_files/usr/src/amdgpu-2.0-89/pre-build.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +KERNELVER=$1 +KERNELVER_BASE=${KERNELVER%%-*} + +version_lt () { + newest=$((echo "$KERNELVER_BASE"; echo "$1") | sort -V | tail -n1) + [ "$KERNELVER_BASE" != "$newest" ] +} + +version_ge () { + newest=$((echo "$KERNELVER_BASE"; echo "$1") | sort -V | tail -n1) + [ "$KERNELVER_BASE" = "$newest" ] +} + +version_gt () { + oldest=$((echo "$KERNELVER_BASE"; echo "$1") | sort -V | head -n1) + [ "$KERNELVER_BASE" != "$oldest" ] +} + +version_le () { + oldest=$((echo "$KERNELVER_BASE"; echo "$1") | sort -V | head -n1) + [ "$KERNELVER_BASE" = "$oldest" ] +} + +source amd/amdkcl/symbols + +echo '// auto generated by DKMS pre-build.sh' > amd/amdkcl/symbols.c +for sym in $SYMS; do + addr=$(grep "\<$sym\>" /boot/System.map-$KERNELVER | awk -F' ' '{print $1}') + echo "void *_kcl_$sym = (void *)0x$addr;" >> amd/amdkcl/symbols.c +done + +find ttm -name '*.c' -exec grep EXPORT_SYMBOL {} + \ + | sort -u \ + | awk -F'[()]' '{print "#define "$2" amd"$2" //"$0}'\ + >> include/rename_symbol.h + +find scheduler -name '*.c' -exec grep EXPORT_SYMBOL {} + \ + | sort -u \ + | awk -F'[()]' '{print "#define "$2" amd"$2" //"$0}'\ + >> include/rename_symbol.h + +FW_DIR="/lib/firmware/$KERNELVER" +mkdir -p $FW_DIR +cp -ar /usr/src/amdgpu-2.0-89/firmware/radeon $FW_DIR +cp -ar /usr/src/amdgpu-2.0-89/firmware/amdgpu $FW_DIR diff --git a/distro_install_scripts/OpenSUSE/common/prepare_system_opensuse.sh b/distro_install_scripts/OpenSUSE/common/prepare_system_opensuse.sh new file mode 100755 index 0000000..c5257eb --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/prepare_system_opensuse.sh @@ -0,0 +1,106 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +ROCM_REBOOT_SYSTEM=false + +if [ ${ROCM_INSTALL_PREREQS} = true ]; then + exit 0 +else + echo "Preparing to update OpenSuSE to allow for ROCm installation." + echo "You will need to have root privileges to do this." + if [ "`which sudo`" = "" ]; then + if [ "`whoami`" = "root" ]; then + zypper -n in coreutils sudo rpmbuild + else + echo "ERROR. Installing software on this system will require either" + echo "running as root, or access to the 'sudo' application." + echo "sudo is not installed, and you are not root. Failing." + exit 1 + fi + fi + + if [ ! "`which nvcc`" = "" ]; then + # If we have CUDA for OpenSuSE, nVidia provides CUDA 10 and 10.1 + # This means we need a newer version of CMake than normally available + CMAKE_VERSION_GOOD=false + if [ ! "`which cmake`" = "" ]; then + CMAKE_VERSION=$(cmake --version | grep version | awk '{print $3;}' | awk -F. '{ printf("%d.%d\n", $1,$2); }' ) + if [ $CMAKE_VERSION -ge 3.13 ]; then + CMAKE_VERSION_GOOD=true + fi + fi + + if [ ${CMAKE_VERSION_GOOD} = false ]; then + echo "We'll need CMake to build all the projects and we've noticed" + echo "you have CUDA installed. nVidia provides officially only CUDA 10+" + echo "for OpenSuSE, this means we need to guarantee CMake version is" + echo "at least 3.13." + echo "CMake on Leap15's repos is 3.10 so we'll get it from obs:devel:tools" + # We are going to install CMake from whatever's on Tumbleweed right now + # this is guaranteed to be new enough + sudo zypper ar -ef -p 150 http://download.opensuse.org/repositories/devel:/tools:/building/openSUSE_Leap_15.0 "rocmOBStemp" + sudo zypper --gpg-auto-import-keys ref + CMAKE_OBS_CURRENT=$(zypper pa -ir "rocmOBStemp" | grep cmake | grep x86_64 | awk '{print $7}') + sudo zypper -n in cmake=${CMAKE_OBS_CURRENT} + # We don't want this repo to stick around, though + sudo zypper rr "rocmOBStemp" + fi + fi + + if [ ${ROCM_FORCE_YES} = true ]; then + ROCM_REBOOT_SYSTEM=true + elif [ ${ROCM_FORCE_NO} = true ]; then + ROCM_REBOOT_SYSTEM=false + else + echo "" + echo "It is recommended that you reboot your system after running this script." + read -p "Do you want to reboot now? (y/n)? " answer + case ${answer:0:1} in + y|Y ) + ROCM_REBOOT_SYSTEM=true + echo 'User chose "yes". System will be rebooted.' + ;; + * ) + echo 'User chose "no". System will not be rebooted.' + ;; + esac + fi +fi + +if [ ${ROCM_REBOOT_SYSTEM} = true ]; then + echo "" + echo "Attempting to reboot the system." + echo "You will need to have root privileges to do this." + echo `sudo /usr/sbin/reboot` + echo "" + echo "" + echo "It appears that rebooting failed." + echo "Are you doing something like running inside of a container?" + echo "If so, you can likely proceed to the next script." +fi diff --git a/distro_install_scripts/OpenSUSE/common/rock-dkms.spec b/distro_install_scripts/OpenSUSE/common/rock-dkms.spec new file mode 100644 index 0000000..55a3a81 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/rock-dkms.spec @@ -0,0 +1,1631 @@ +# rpmrebuild autogenerated specfile + +%define defaultbuildroot / +AutoProv: no +%undefine __find_provides +AutoReq: no +%undefine __find_requires +# Do not try autogenerate prereq/conflicts/obsoletes and check files +%undefine __check_files +%undefine __find_prereq +%undefine __find_conflicts +%undefine __find_obsoletes +# Be sure buildpolicy set to do nothing +%define __spec_install_post %{nil} +# Something that need for rpm-4.1 +%define _missing_doc_files_terminate_build 0 +#dummy +#dummy +BuildArch: noarch +Name: rock-dkms +Version: 2.0 +Release: 89 +License: GPLv2 and Redistributable, no modification permitted +Group: System Environment/Kernel +Summary: The amdgpu Linux kernel driver + + +URL: http://www.amd.com/ + + +Epoch: 0 + +Source: %{expand:%%(pwd)} +BuildRoot: %{expand:%%(pwd)} + + + +Provides: amdgpu-kmod = 2.0-89 +Provides: config(rock-dkms) = 0:2.0-89 +Provides: rock-dkms = 0:2.0-89 +Requires: /bin/bash +Requires: /bin/sh +Requires: /bin/sh +Requires: /bin/sh +Requires: config(rock-dkms) = 0:2.0-89 +Requires: dkms >= 1.95 +Requires: gcc +Requires: kernel-devel +Requires: make +#Requires: rpmlib(CompressedFileNames) <= 3.0.4-1 +#Requires: rpmlib(FileDigests) <= 4.6.0-1 +#Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 +#Requires: rpmlib(PayloadIsXz) <= 5.2-1 +#suggest +#enhance +%description +The AMD display driver kernel module in DKMS format for AMD graphics S/W +%files +%config %attr(0644, root, root) "/etc/modprobe.d/blacklist-radeon.conf" +%dir %attr(0755, root, root) "/usr/share/dkms/modules_to_force_install" +%attr(0644, root, root) "/usr/share/dkms/modules_to_force_install/amdgpu" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/Makefile" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/acp" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/acp/Kconfig" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/acp/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/acp/acp_hw.c" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/acp/include" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/acp/include/acp_gfx_if.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/Kconfig" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/ObjectID.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_acp.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_acp.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_acpi.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_afmt.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_amdkfd.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_amdkfd.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_amdkfd_fence.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_amdkfd_gfx_v8.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_amdkfd_gpuvm.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_atombios.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_atombios.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_atomfirmware.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_atomfirmware.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_atpx_handler.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_benchmark.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_bios.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_bo_list.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_bo_list.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_cgs.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_connectors.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_connectors.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_cs.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_csa.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_csa.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_ctx.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_ctx.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_debugfs.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_debugfs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_device.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_display.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_display.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_dpm.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_dpm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_drv.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_drv.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_encoders.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_fb.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_fence.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_gart.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_gart.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_gds.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_gem.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_gem.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_gfx.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_gfx.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_gmc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_gmc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_gtt_mgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_i2c.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_i2c.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_ib.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_ids.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_ids.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_ih.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_ih.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_ioc32.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_irq.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_irq.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_job.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_job.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_kms.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_mn.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_mn.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_mode.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_object.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_object.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_pll.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_pll.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_pm.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_pm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_prime.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_psp.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_psp.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_ring.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_ring.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_rlc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_rlc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_sa.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_sched.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_sched.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_sdma.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_sdma.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_sem.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_sem.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_sync.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_sync.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_test.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_trace.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_trace_points.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_ttm.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_ttm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_ucode.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_ucode.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_uvd.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_uvd.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_vce.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_vce.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_vcn.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_vcn.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_vf_error.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_vf_error.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_virt.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_virt.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_vm.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_vm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_vram_mgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/amdgpu_xgmi.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/atom.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/atom.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/atombios_crtc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/atombios_crtc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/atombios_dp.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/atombios_dp.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/atombios_encoders.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/atombios_encoders.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/atombios_i2c.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/atombios_i2c.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/ci_dpm.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/ci_dpm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/ci_smc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/cik.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/cik.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/cik_dpm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/cik_ih.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/cik_ih.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/cik_sdma.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/cik_sdma.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/cikd.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/clearstate_ci.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/clearstate_defs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/clearstate_gfx9.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/clearstate_si.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/clearstate_vi.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/cz_ih.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/cz_ih.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/dce_v10_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/dce_v10_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/dce_v11_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/dce_v11_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/dce_v6_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/dce_v6_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/dce_v8_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/dce_v8_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/dce_virtual.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/dce_virtual.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/df_v1_7.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/df_v1_7.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/df_v3_6.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/df_v3_6.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/emu_soc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gfx_v6_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gfx_v6_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gfx_v7_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gfx_v7_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gfx_v8_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gfx_v8_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gfx_v9_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gfx_v9_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gfxhub_v1_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gfxhub_v1_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gfxhub_v1_1.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gfxhub_v1_1.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gmc_v6_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gmc_v6_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gmc_v7_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gmc_v7_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gmc_v8_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gmc_v8_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gmc_v9_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/gmc_v9_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/iceland_ih.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/iceland_ih.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/iceland_sdma_pkt_open.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/kv_dpm.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/kv_dpm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/kv_smc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/mmhub_v1_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/mmhub_v1_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/mmsch_v1_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/mxgpu_ai.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/mxgpu_ai.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/mxgpu_vi.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/mxgpu_vi.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/nbio_v6_1.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/nbio_v6_1.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/nbio_v7_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/nbio_v7_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/nbio_v7_4.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/nbio_v7_4.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/ppsmc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/psp_gfx_if.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/psp_v10_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/psp_v10_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/psp_v11_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/psp_v11_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/psp_v3_1.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/psp_v3_1.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/r600_dpm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/sdma_v2_4.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/sdma_v2_4.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/sdma_v3_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/sdma_v3_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/sdma_v4_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/sdma_v4_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/si.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/si.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/si_dma.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/si_dma.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/si_dpm.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/si_dpm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/si_enums.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/si_ih.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/si_ih.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/si_smc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/sid.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/sislands_smc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/soc15.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/soc15.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/soc15_common.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/soc15d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/ta_xgmi_if.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/tonga_ih.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/tonga_ih.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/tonga_sdma_pkt_open.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/uvd_v4_2.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/uvd_v4_2.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/uvd_v5_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/uvd_v5_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/uvd_v6_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/uvd_v6_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/uvd_v7_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/uvd_v7_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vce_v2_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vce_v2_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vce_v3_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vce_v3_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vce_v4_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vce_v4_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vcn_v1_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vcn_v1_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vega10_ih.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vega10_ih.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vega10_reg_init.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vega10_sdma_pkt_open.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vega20_reg_init.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vi.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vi.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vi_dpm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdgpu/vid.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl/kcl_bitmap.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl/kcl_common.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl/kcl_device_cgroup.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl/kcl_drm.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl/kcl_fence.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl/kcl_fence_array.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl/kcl_io.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl/kcl_kthread.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl/kcl_mn.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl/kcl_pci.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl/kcl_reservation.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl/main.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkcl/symbols" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/Kconfig" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/Makefile" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/backport" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/backport/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/backport/backport.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/cik_event_interrupt.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/cik_int.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/cik_regs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/cwsr_trap_handler.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/cwsr_trap_handler_gfx8.asm" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/cwsr_trap_handler_gfx9.asm" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_chardev.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_crat.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_crat.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_dbgdev.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_dbgdev.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_dbgmgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_dbgmgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_debugfs.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_device.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_device_queue_manager.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_device_queue_manager.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_device_queue_manager_cik.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_device_queue_manager_v9.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_device_queue_manager_vi.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_doorbell.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_events.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_events.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_flat_memory.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_int_process_v9.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_interrupt.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_iommu.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_iommu.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_ipc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_ipc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_kernel_queue.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_kernel_queue.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_kernel_queue_cik.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_kernel_queue_v9.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_kernel_queue_vi.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_module.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_mqd_manager.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_mqd_manager.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_mqd_manager_cik.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_mqd_manager_v9.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_mqd_manager_vi.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_packet_manager.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_pasid.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_peerdirect.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_pm4_headers.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_pm4_headers_ai.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_pm4_headers_diq.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_pm4_headers_vi.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_pm4_opcodes.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_priv.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_process.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_process_queue_manager.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_queue.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_rdma.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_topology.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_topology.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_trace.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/kfd_trace.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/amdkfd/soc15_int.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/backport" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/backport/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/backport/backport.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/backport/include" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/backport/include/kcl" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/backport/include/kcl/kcl_amdgpu.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/backport/kcl_amdgpu.c" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/Kconfig" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/TODO" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm/amdgpu_dm.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm/amdgpu_dm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm/amdgpu_dm_color.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm/amdgpu_dm_crc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm/amdgpu_dm_helpers.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm/amdgpu_dm_irq.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm/amdgpu_dm_irq.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/amdgpu_dm/amdgpu_dm_services.c" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/Makefile" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/basics" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/basics/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/basics/conversion.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/basics/conversion.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/basics/fixpt31_32.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/basics/log_helpers.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/basics/logger.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/basics/vector.c" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/bios_parser.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/bios_parser.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/bios_parser2.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/bios_parser2.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/bios_parser_common.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/bios_parser_common.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/bios_parser_helper.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/bios_parser_helper.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/bios_parser_interface.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/bios_parser_types_internal.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/bios_parser_types_internal2.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/command_table.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/command_table.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/command_table2.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/command_table2.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/command_table_helper.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/command_table_helper.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/command_table_helper2.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/command_table_helper2.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/command_table_helper_struct.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/dce110" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/dce110/command_table_helper_dce110.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/dce110/command_table_helper_dce110.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/dce112" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/dce112/command_table_helper2_dce112.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/dce112/command_table_helper2_dce112.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/dce112/command_table_helper_dce112.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/dce112/command_table_helper_dce112.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/dce80" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/dce80/command_table_helper_dce80.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/bios/dce80/command_table_helper_dce80.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/calcs" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/calcs/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/calcs/bw_fixed.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/calcs/calcs_logger.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/calcs/custom_float.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/calcs/dce_calcs.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/calcs/dcn_calc_auto.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/calcs/dcn_calc_auto.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/calcs/dcn_calc_math.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/calcs/dcn_calc_math.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/calcs/dcn_calcs.c" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/core" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/core/dc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/core/dc_debug.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/core/dc_hw_sequencer.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/core/dc_link.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/core/dc_link_ddc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/core/dc_link_dp.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/core/dc_link_hwss.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/core/dc_resource.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/core/dc_sink.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/core/dc_stream.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/core/dc_surface.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dc_bios_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dc_ddc_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dc_dp_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dc_helper.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dc_hw_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dc_link.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dc_stream.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dc_types.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_abm.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_abm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_audio.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_audio.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_aux.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_aux.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_clk_mgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_clk_mgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_clock_source.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_clock_source.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_dmcu.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_dmcu.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_hwseq.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_hwseq.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_i2c.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_i2c.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_i2c_hw.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_i2c_hw.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_i2c_sw.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_i2c_sw.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_ipp.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_ipp.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_link_encoder.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_link_encoder.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_mem_input.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_mem_input.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_opp.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_opp.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_scl_filters.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_stream_encoder.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_stream_encoder.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_transform.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce/dce_transform.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce100" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce100/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce100/dce100_hw_sequencer.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce100/dce100_hw_sequencer.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce100/dce100_resource.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce100/dce100_resource.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_compressor.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_compressor.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_hw_sequencer.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_hw_sequencer.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_mem_input_v.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_mem_input_v.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_opp_csc_v.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_opp_regamma_v.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_opp_v.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_opp_v.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_resource.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_resource.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_timing_generator.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_timing_generator.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_timing_generator_v.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_timing_generator_v.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_transform_v.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce110/dce110_transform_v.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce112" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce112/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce112/dce112_compressor.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce112/dce112_compressor.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce112/dce112_hw_sequencer.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce112/dce112_hw_sequencer.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce112/dce112_resource.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce112/dce112_resource.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce120" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce120/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce120/dce120_hw_sequencer.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce120/dce120_hw_sequencer.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce120/dce120_resource.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce120/dce120_resource.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce120/dce120_timing_generator.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce120/dce120_timing_generator.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce80" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce80/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce80/dce80_hw_sequencer.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce80/dce80_hw_sequencer.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce80/dce80_resource.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce80/dce80_resource.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce80/dce80_timing_generator.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dce80/dce80_timing_generator.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_clk_mgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_clk_mgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_cm_common.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_cm_common.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_dpp.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_dpp.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_dpp_cm.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_dpp_dscl.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_hubbub.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_hubbub.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_hubp.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_hubp.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_hw_sequencer.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_hw_sequencer.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_hw_sequencer_debug.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_ipp.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_ipp.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_link_encoder.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_link_encoder.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_mpc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_mpc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_opp.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_opp.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_optc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_optc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_resource.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_resource.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_stream_encoder.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dcn10/dcn10_stream_encoder.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dm_event_log.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dm_helpers.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dm_pp_smu.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dm_services.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dm_services_types.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml/dc_features.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml/display_mode_enums.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml/display_mode_lib.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml/display_mode_lib.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml/display_mode_structs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml/display_rq_dlg_helpers.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml/display_rq_dlg_helpers.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml/dml1_display_rq_dlg_calc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml/dml1_display_rq_dlg_calc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml/dml_common_defs.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml/dml_common_defs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml/dml_inline_defs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/dml/dml_logger.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/Makefile" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce110" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce110/hw_factory_dce110.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce110/hw_factory_dce110.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce110/hw_translate_dce110.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce110/hw_translate_dce110.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce120" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce120/hw_factory_dce120.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce120/hw_factory_dce120.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce120/hw_translate_dce120.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce120/hw_translate_dce120.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce80" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce80/hw_factory_dce80.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce80/hw_factory_dce80.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce80/hw_translate_dce80.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dce80/hw_translate_dce80.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dcn10" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dcn10/hw_factory_dcn10.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dcn10/hw_factory_dcn10.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dcn10/hw_translate_dcn10.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/dcn10/hw_translate_dcn10.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/ddc_regs.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/diagnostics" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/diagnostics/hw_factory_diag.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/diagnostics/hw_factory_diag.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/diagnostics/hw_translate_diag.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/diagnostics/hw_translate_diag.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/gpio_base.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/gpio_regs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/gpio_service.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/gpio_service.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/hpd_regs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/hw_ddc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/hw_ddc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/hw_factory.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/hw_factory.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/hw_gpio.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/hw_gpio.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/hw_hpd.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/hw_hpd.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/hw_translate.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/gpio/hw_translate.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/aux_engine.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/aux_engine.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce100" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce100/i2caux_dce100.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce100/i2caux_dce100.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce110" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce110/aux_engine_dce110.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce110/aux_engine_dce110.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce110/i2c_hw_engine_dce110.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce110/i2c_hw_engine_dce110.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce110/i2c_sw_engine_dce110.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce110/i2c_sw_engine_dce110.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce110/i2caux_dce110.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce110/i2caux_dce110.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce112" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce112/i2caux_dce112.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce112/i2caux_dce112.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce120" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce120/i2caux_dce120.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce120/i2caux_dce120.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce80" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce80/i2c_hw_engine_dce80.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce80/i2c_hw_engine_dce80.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce80/i2c_sw_engine_dce80.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce80/i2c_sw_engine_dce80.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce80/i2caux_dce80.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dce80/i2caux_dce80.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dcn10" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dcn10/i2caux_dcn10.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/dcn10/i2caux_dcn10.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/diagnostics" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/diagnostics/i2caux_diag.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/diagnostics/i2caux_diag.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/engine.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/engine_base.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/i2c_engine.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/i2c_engine.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/i2c_generic_hw_engine.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/i2c_generic_hw_engine.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/i2c_hw_engine.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/i2c_hw_engine.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/i2c_sw_engine.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/i2c_sw_engine.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/i2caux.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/i2caux/i2caux.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/bw_fixed.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/clock_source.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/compressor.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/core_status.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/core_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/custom_float.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/dc_link_ddc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/dc_link_dp.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/dce_calcs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/dcn_calcs.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/abm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/audio.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/aux_engine.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/clk_mgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/dccg.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/dchubbub.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/dmcu.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/dpp.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/gpio.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/hubp.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/hw_shared.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/ipp.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/link_encoder.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/mem_input.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/mpc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/opp.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/stream_encoder.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/timing_generator.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw/transform.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/hw_sequencer.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/link_hwss.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/reg_helper.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/inc/resource.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/Makefile" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/dce110" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/dce110/irq_service_dce110.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/dce110/irq_service_dce110.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/dce120" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/dce120/irq_service_dce120.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/dce120/irq_service_dce120.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/dce80" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/dce80/irq_service_dce80.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/dce80/irq_service_dce80.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/dcn10" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/dcn10/irq_service_dcn10.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/dcn10/irq_service_dcn10.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/irq_service.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq/irq_service.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/irq_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/os_types.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/virtual" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/virtual/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/virtual/virtual_link_encoder.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/virtual/virtual_link_encoder.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/virtual/virtual_stream_encoder.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/dc/virtual/virtual_stream_encoder.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/audio_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/bios_parser_interface.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/bios_parser_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/dal_asic_id.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/dal_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/ddc_service_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/dpcd_defs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/fixed31_32.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/gpio_interface.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/gpio_service_interface.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/gpio_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/grph_object_ctrl_defs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/grph_object_defs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/grph_object_id.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/i2caux_interface.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/irq_service_interface.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/link_service_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/logger_interface.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/logger_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/set_mode_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/signal_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/include/vector.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/color" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/color/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/color/color_gamma.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/color/color_gamma.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/color/luts_1d.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/freesync" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/freesync/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/freesync/freesync.c" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/inc" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/inc/mod_freesync.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/inc/mod_info_packet.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/inc/mod_shared.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/inc/mod_stats.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/info_packet" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/info_packet/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/info_packet/info_packet.c" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/stats" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/display/modules/stats/stats.c" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/dkms" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/dkms/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/dkms/dkms.conf" +%attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/dkms/pre-build.sh" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/dkms/sources" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/amd_acpi.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/amd_pcie.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/amd_pcie_helpers.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/amd_shared.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/athub" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/athub/athub_1_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/athub/athub_1_0_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/bif" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/bif/bif_3_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/bif/bif_3_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/bif/bif_4_1_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/bif/bif_4_1_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/bif/bif_5_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/bif/bif_5_0_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/bif/bif_5_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/bif/bif_5_1_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/bif/bif_5_1_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/bif/bif_5_1_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_10_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_10_0_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_10_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_11_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_11_0_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_11_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_11_2_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_11_2_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_11_2_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_12_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_12_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_6_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_6_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_8_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_8_0_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dce/dce_8_0_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dcn" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dcn/dcn_1_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/dcn/dcn_1_0_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/df" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/df/df_1_7_default.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/df/df_1_7_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/df/df_1_7_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/df/df_3_6_default.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/df/df_3_6_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/df/df_3_6_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gc" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gc/gc_9_0_default.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gc/gc_9_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gc/gc_9_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gc/gc_9_1_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gc/gc_9_1_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gc/gc_9_2_1_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gc/gc_9_2_1_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gca" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gca/gfx_6_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gca/gfx_6_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gca/gfx_7_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gca/gfx_7_2_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gca/gfx_7_2_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gca/gfx_7_2_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gca/gfx_8_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gca/gfx_8_0_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gca/gfx_8_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gca/gfx_8_1_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gca/gfx_8_1_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gca/gfx_8_1_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gmc" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gmc/gmc_6_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gmc/gmc_6_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gmc/gmc_7_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gmc/gmc_7_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gmc/gmc_7_1_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gmc/gmc_7_1_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gmc/gmc_8_1_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gmc/gmc_8_1_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gmc/gmc_8_1_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gmc/gmc_8_2_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gmc/gmc_8_2_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/gmc/gmc_8_2_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/hdp" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/hdp/hdp_4_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/hdp/hdp_4_0_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mmhub" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mmhub/mmhub_1_0_default.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mmhub/mmhub_1_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mmhub/mmhub_1_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mmhub/mmhub_9_1_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mmhub/mmhub_9_1_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mmhub/mmhub_9_3_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mmhub/mmhub_9_3_0_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mp" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mp/mp_10_0_default.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mp/mp_10_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mp/mp_10_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mp/mp_11_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mp/mp_11_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mp/mp_9_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/mp/mp_9_0_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/nbif" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/nbif/nbif_6_1_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/nbif/nbif_6_1_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/nbio" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/nbio/nbio_6_1_default.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/nbio/nbio_6_1_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/nbio/nbio_6_1_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/nbio/nbio_7_0_default.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/nbio/nbio_7_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/nbio/nbio_7_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/nbio/nbio_7_4_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/nbio/nbio_7_4_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/oss_1_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/oss_1_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/oss_2_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/oss_2_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/oss_2_4_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/oss_2_4_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/oss_2_4_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/oss_3_0_1_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/oss_3_0_1_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/oss_3_0_1_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/oss_3_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/oss_3_0_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/oss_3_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/osssys_4_0_1_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/osssys_4_0_1_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/osssys_4_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/oss/osssys_4_0_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma0" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma0/sdma0_4_0_default.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma0/sdma0_4_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma0/sdma0_4_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma0/sdma0_4_1_default.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma0/sdma0_4_1_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma0/sdma0_4_1_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma0/sdma0_4_2_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma0/sdma0_4_2_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma1" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma1/sdma1_4_0_default.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma1/sdma1_4_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma1/sdma1_4_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma1/sdma1_4_2_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/sdma1/sdma1_4_2_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_6_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_6_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_0_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_0_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_0_1_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_0_1_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_1_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_1_0_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_1_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_1_1_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_1_1_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_1_1_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_1_2_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_1_2_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_1_2_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_1_3_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_1_3_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_7_1_3_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_8_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_8_0_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smu/smu_8_0_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smuio" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smuio/smuio_9_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/smuio/smuio_9_0_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/thm" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/thm/thm_10_0_default.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/thm/thm_10_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/thm/thm_10_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/thm/thm_11_0_2_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/thm/thm_11_0_2_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/thm/thm_9_0_default.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/thm/thm_9_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/thm/thm_9_0_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/umc" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/umc/umc_6_0_default.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/umc/umc_6_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/umc/umc_6_0_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/uvd" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/uvd/uvd_4_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/uvd/uvd_4_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/uvd/uvd_4_2_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/uvd/uvd_4_2_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/uvd/uvd_5_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/uvd/uvd_5_0_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/uvd/uvd_5_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/uvd/uvd_6_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/uvd/uvd_6_0_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/uvd/uvd_6_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/uvd/uvd_7_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/uvd/uvd_7_0_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/vce" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/vce/vce_1_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/vce/vce_1_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/vce/vce_2_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/vce/vce_2_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/vce/vce_3_0_d.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/vce/vce_3_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/vce/vce_4_0_default.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/vce/vce_4_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/vce/vce_4_0_sh_mask.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/vcn" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/vcn/vcn_1_0_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/asic_reg/vcn/vcn_1_0_sh_mask.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/atom-bits.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/atom-names.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/atom-types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/atombios.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/atomfirmware.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/atomfirmwareid.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/cgs_common.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/cik_structs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/displayobject.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/dm_pp_interface.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/gfx" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/gfx/irqsrcs_gfx_9_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/irqsrcs_dcn_1_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/ivsrcid_vislands30.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/sdma0" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/sdma0/irqsrcs_sdma0_4_0.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/sdma1" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/sdma1/irqsrcs_sdma1_4_0.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/smuio" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/smuio/irqsrcs_smuio_9_0.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/thm" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/thm/irqsrcs_thm_9_0.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/uvd" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/uvd/irqsrcs_uvd_7_0.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/vce" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/vce/irqsrcs_vce_4_0.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/vcn" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/vcn/irqsrcs_vcn_1_0.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/vmc" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/ivsrcid/vmc/irqsrcs_vmc_1_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/kgd_kfd_interface.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/kgd_pp_interface.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/include/linux" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/linux/chash.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/pptable.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/soc15_hw_ip.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/soc15_ih_clientid.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/v9_structs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/vega10_enum.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/vega10_ip_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/vega20_ip_offset.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/include/vi_structs.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/lib" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/lib/Kconfig" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/lib/Makefile" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/lib/backport" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/lib/backport/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/lib/backport/backport.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/lib/chash.c" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/amd_powerplay.c" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/hardwaremanager.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/hwmgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/hwmgr_ppt.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/pp_overdriver.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/pp_overdriver.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/pp_psm.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/pp_psm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/ppatomctrl.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/ppatomctrl.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/ppatomfwctrl.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/ppatomfwctrl.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/ppevvmath.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/pppcielanes.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/pppcielanes.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/pptable_v1_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/process_pptables_v1_0.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/process_pptables_v1_0.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/processpptables.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/processpptables.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu10_hwmgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu10_hwmgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu10_inc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu7_clockpowergating.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu7_clockpowergating.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu7_dyn_defaults.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu7_hwmgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu7_hwmgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu7_powertune.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu7_powertune.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu7_thermal.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu7_thermal.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu8_hwmgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu8_hwmgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu_helper.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/smu_helper.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega10_hwmgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega10_hwmgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega10_inc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega10_powertune.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega10_powertune.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega10_pptable.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega10_processpptables.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega10_processpptables.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega10_thermal.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega10_thermal.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega12_hwmgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega12_hwmgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega12_inc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega12_pptable.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega12_processpptables.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega12_processpptables.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega12_thermal.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega12_thermal.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega20_hwmgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega20_hwmgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega20_inc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega20_powertune.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega20_powertune.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega20_pptable.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega20_processpptables.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega20_processpptables.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega20_thermal.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/hwmgr/vega20_thermal.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/amd_powerplay.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/cz_ppsmc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/fiji_ppsmc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/hardwaremanager.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/hwmgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/polaris10_pwrvirus.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/power_state.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/pp_debug.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/pp_endian.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/pp_thermal.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/ppinterrupt.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/rv_ppsmc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu10.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu10_driver_if.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu11_driver_if.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu7.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu71.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu71_discrete.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu72.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu72_discrete.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu73.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu73_discrete.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu74.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu74_discrete.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu75.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu75_discrete.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu7_common.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu7_discrete.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu7_fusion.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu7_ppsmc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu8.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu8_fusion.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu9.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu9_driver_if.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu_ucode_xfer_cz.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smu_ucode_xfer_vi.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/smumgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/tonga_ppsmc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/vega10_ppsmc.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/vega12" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/vega12/smu9_driver_if.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/vega12_ppsmc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/inc/vega20_ppsmc.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/ci_smumgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/ci_smumgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/fiji_smumgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/fiji_smumgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/iceland_smumgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/iceland_smumgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/polaris10_smumgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/polaris10_smumgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/smu10_smumgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/smu10_smumgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/smu7_smumgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/smu7_smumgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/smu8_smumgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/smu8_smumgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/smu9_smumgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/smu9_smumgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/smumgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/tonga_smumgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/tonga_smumgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/vega10_smumgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/vega10_smumgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/vega12_smumgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/vega12_smumgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/vega20_smumgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/vega20_smumgr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/vegam_smumgr.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/powerplay/smumgr/vegam_smumgr.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/amd/scheduler" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/scheduler/gpu_scheduler.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/scheduler/gpu_scheduler.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/amd/scheduler/sched_fence.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/dkms.conf" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/firmware" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/amur_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/amur_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/amur_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/amur_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/amur_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/amur_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/carrizo_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/carrizo_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/carrizo_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/carrizo_mec2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/carrizo_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/carrizo_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/carrizo_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/carrizo_sdma1.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/carrizo_uvd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/carrizo_vce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/fiji_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/fiji_mc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/fiji_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/fiji_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/fiji_mec2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/fiji_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/fiji_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/fiji_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/fiji_sdma1.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/fiji_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/fiji_uvd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/fiji_vce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_ce_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_k2_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_k_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_mc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_me_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_mec2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_mec2_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_mec_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_pfp_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_sdma1.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_smc_sk.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_uvd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris10_vce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_ce_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_k2_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_k_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_mc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_me_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_mec2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_mec2_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_mec_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_pfp_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_sdma1.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_smc_sk.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_uvd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris11_vce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_ce_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_k_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_mc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_me_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_mec2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_mec2_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_mec_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_pfp_2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_sdma1.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_uvd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/polaris12_vce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/raven_asd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/raven_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/raven_dmcu.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/raven_gpu_info.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/raven_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/raven_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/raven_mec2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/raven_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/raven_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/raven_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/raven_vcn.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/stoney_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/stoney_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/stoney_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/stoney_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/stoney_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/stoney_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/stoney_uvd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/stoney_vce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/tonga_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/tonga_k_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/tonga_mc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/tonga_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/tonga_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/tonga_mec2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/tonga_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/tonga_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/tonga_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/tonga_sdma1.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/tonga_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/tonga_uvd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/tonga_vce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/topaz_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/topaz_k_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/topaz_mc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/topaz_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/topaz_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/topaz_mec2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/topaz_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/topaz_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/topaz_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/topaz_sdma1.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/topaz_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_acg_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_asd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_gpu_info.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_mec2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_sdma1.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_sos.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_uvd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega10_vce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_asd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_mec2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_sdma1.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_sos.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_sos_old.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_ta.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_uvd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/amdgpu/vega20_vce.bin" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/banks_k_2_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/bonaire_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/bonaire_k_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/bonaire_mc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/bonaire_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/bonaire_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/bonaire_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/bonaire_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/bonaire_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/bonaire_sdma1.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/bonaire_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/bonaire_uvd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/bonaire_vce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hainan_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hainan_k_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hainan_mc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hainan_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hainan_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hainan_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hainan_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hawaii_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hawaii_k_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hawaii_mc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hawaii_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hawaii_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hawaii_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hawaii_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hawaii_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hawaii_sdma1.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hawaii_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hawaii_uvd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/hawaii_vce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kabini_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kabini_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kabini_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kabini_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kabini_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kabini_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kabini_sdma1.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kabini_uvd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kabini_vce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kaveri_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kaveri_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kaveri_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kaveri_mec2.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kaveri_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kaveri_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kaveri_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kaveri_sdma1.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kaveri_uvd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/kaveri_vce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/mullins_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/mullins_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/mullins_mec.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/mullins_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/mullins_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/mullins_sdma.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/mullins_sdma1.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/mullins_uvd.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/mullins_vce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/oland_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/oland_k_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/oland_mc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/oland_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/oland_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/oland_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/oland_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/pitcairn_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/pitcairn_k_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/pitcairn_mc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/pitcairn_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/pitcairn_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/pitcairn_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/pitcairn_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/si58_mc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/tahiti_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/tahiti_k_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/tahiti_mc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/tahiti_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/tahiti_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/tahiti_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/tahiti_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/verde_ce.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/verde_k_smc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/verde_mc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/verde_me.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/verde_pfp.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/verde_rlc.bin" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/firmware/radeon/verde_smc.bin" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/include" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/include/drm" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/amd_rdma.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/gpu_scheduler.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/gpu_scheduler_trace.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/spsc_queue.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/include/drm/ttm" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/ttm/ttm_bo_api.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/ttm/ttm_bo_driver.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/ttm/ttm_debug.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/ttm/ttm_execbuf_util.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/ttm/ttm_lock.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/ttm/ttm_memory.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/ttm/ttm_module.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/ttm/ttm_object.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/ttm/ttm_page_alloc.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/ttm/ttm_placement.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/ttm/ttm_set_memory.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/drm/ttm/ttm_tt.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/include/kcl" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_acpi.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_amd_asic_type.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_bitmap.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_bitops.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_compat.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_device.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_device_cgroup.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_drm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_drm_atomic_helper.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_drm_connector.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_fence.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_fence_array.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_firmware.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_fs.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_hwmon.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_idr.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_interval_tree_generic.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_io.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_kernel.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_kref.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_kthread.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_list.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_mm.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_mm_types.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_mn.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_pci.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_preempt.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_rcupdate.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_reservation.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_trace.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_tracepoint.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_version.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_vga_switcheroo.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_video.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/kcl/kcl_wait.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/include/uapi" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/include/uapi/drm" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/uapi/drm/amdgpu_drm.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/include/uapi/linux" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/include/uapi/linux/kfd_ioctl.h" +%attr(0755, root, root) "/usr/src/amdgpu-2.0-89/post-remove.sh" +%attr(0755, root, root) "/usr/src/amdgpu-2.0-89/pre-build.sh" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/radeon" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/radeon/cik_reg.h" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/scheduler" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/scheduler/Makefile" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/scheduler/backport" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/scheduler/backport/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/scheduler/backport/backport.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/scheduler/gpu_scheduler_trace.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/scheduler/sched_entity.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/scheduler/sched_fence.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/scheduler/sched_main.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/sources" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/ttm" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/Makefile" +%dir %attr(0755, root, root) "/usr/src/amdgpu-2.0-89/ttm/backport" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/backport/Makefile" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/backport/backport.h" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/ttm_agp_backend.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/ttm_bo.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/ttm_bo_manager.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/ttm_bo_util.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/ttm_bo_vm.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/ttm_execbuf_util.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/ttm_lock.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/ttm_memory.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/ttm_module.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/ttm_object.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/ttm_page_alloc.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/ttm_page_alloc_dma.c" +%attr(0644, root, root) "/usr/src/amdgpu-2.0-89/ttm/ttm_tt.c" + +%prep +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT +cd $RPM_BUILD_ROOT +cp -R %{SOURCEURL0}/* . + +%clean +rm -r -f "$RPM_BUILD_ROOT" + +%pre -p /bin/sh +cat << EOF > /etc/modprobe.d/blacklist-amdgpu.conf +blacklist amdgpu +EOF +%post -p /bin/sh +rc=0 +postinst=/usr/lib/dkms/common.postinst + +if [ -x $postinst ]; then + $postinst amdgpu 2.0-89 + rc=$? +else + echo "WARNING: $postinst does not exist." +fi + +if [ ! $rc ]; then + echo -e "ERROR: DKMS version is too old and amdgpu was not" + echo -e "built with legacy DKMS support." + echo -e "You must either rebuild amdgpu with legacy postinst" + echo -e "support or upgrade DKMS to a more current version." +fi + +rm -f /etc/modprobe.d/blacklist-amdgpu.conf +exit $rc +%preun -p /bin/sh +dkms remove -m amdgpu -v 2.0-89 --all --rpm_safe_upgrade +exit $? +%changelog +* Thu Dec 13 2018 AMD automated build system 2.0-89 +- ssh://gerritgit/brahma/ec/linux +- gerritgit/conelson/rocm-rel-2.0 +- 39acb1a0709b9d595d4368d5d53ca05b02e3b0f7 +- build ID: 89 diff --git a/distro_install_scripts/OpenSUSE/common/rocm-dev.spec b/distro_install_scripts/OpenSUSE/common/rocm-dev.spec new file mode 120000 index 0000000..2fc9e10 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/rocm-dev.spec @@ -0,0 +1 @@ +../../shared_files/rpm_specs/rocm-dev.spec \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/common/rocm-dkms.spec b/distro_install_scripts/OpenSUSE/common/rocm-dkms.spec new file mode 120000 index 0000000..0b33523 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/rocm-dkms.spec @@ -0,0 +1 @@ +../../shared_files/rpm_specs/rocm-dkms.spec \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/common/rocm-libs.spec b/distro_install_scripts/OpenSUSE/common/rocm-libs.spec new file mode 120000 index 0000000..b58bc53 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/rocm-libs.spec @@ -0,0 +1 @@ +../../shared_files/rpm_specs/rocm-libs.spec \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/common/rocm-opencl-devel.spec b/distro_install_scripts/OpenSUSE/common/rocm-opencl-devel.spec new file mode 120000 index 0000000..06c6459 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/rocm-opencl-devel.spec @@ -0,0 +1 @@ +../../shared_files/rpm_specs/rocm-opencl-devel.spec \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/common/rocm-opencl.spec b/distro_install_scripts/OpenSUSE/common/rocm-opencl.spec new file mode 100644 index 0000000..bed4df8 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/rocm-opencl.spec @@ -0,0 +1,82 @@ +# rpmrebuild autogenerated specfile + +%define defaultbuildroot / +AutoProv: no +%undefine __find_provides +AutoReq: no +%undefine __find_requires +# Do not try autogenerate prereq/conflicts/obsoletes and check files +%undefine __check_files +%undefine __find_prereq +%undefine __find_conflicts +%undefine __find_obsoletes +# Be sure buildpolicy set to do nothing +%define __spec_install_post %{nil} +# Something that need for rpm-4.1 +%define _missing_doc_files_terminate_build 0 +#ARCH: x86_64 +BuildArch: x86_64 +Name: rocm-opencl +Version: 1.2.0 +Release: ROCM_OPENCL_PKG_VER +License: unknown +Group: unknown +Summary: OpenCL/ROCm + +Source: %{expand:%%(pwd)} +BuildRoot: %{expand:%%(pwd)} + + +Vendor: AMD + + + + + + +Prefix: ROCM_OUTPUT_DIR/opencl +Provides: rocm-opencl +Provides: libOpenCL.so.1 +Provides: rocm-opencl = 1.2.0-ROCM_OPENCL_PKG_VER +Provides: rocm-opencl(x86-64) = 1.2.0-ROCM_OPENCL_PKG_VER +Requires: hsa-rocr-dev >= 1.1.5 +# Requires: libOpenCL +Requires: /bin/sh +Requires: /bin/sh +Requires: /bin/sh +#Requires: rpmlib(FileDigests) <= 4.6.0-1 +#Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 +#Requires: rpmlib(CompressedFileNames) <= 3.0.4-1 +#Requires: rpmlib(PayloadIsXz) <= 5.2-1 +#suggest +#enhance +%description +DESCRIPTION +=========== + +%prep +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT +cd $RPM_BUILD_ROOT +cp -R %{SOURCEURL0}/* . + +%clean +rm -r -f "$RPM_BUILD_ROOT" + +%files +%attr(0755, root, root) "ROCM_OUTPUT_DIR/opencl/bin/x86_64/clang" +%attr(0755, root, root) "ROCM_OUTPUT_DIR/opencl/bin/x86_64/clinfo" +%attr(0755, root, root) "ROCM_OUTPUT_DIR/opencl/bin/x86_64/ld.lld" +%attr(0755, root, root) "ROCM_OUTPUT_DIR/opencl/bin/x86_64/llvm-link" +%attr(0755, root, root) "ROCM_OUTPUT_DIR/opencl/lib/x86_64/libOpenCL.so.1" +%attr(0755, root, root) "ROCM_OUTPUT_DIR/opencl/lib/x86_64/libamdocl64.so" +%pre -p /bin/sh +rm -f /etc/OpenCL/vendors/amdocl64.icd +rm -f /etc/ld.so.conf.d/x86_64-rocm-opencl.conf && ldconfig +%post -p /bin/sh +echo ROCM_OUTPUT_DIR/opencl/lib/x86_64 > /etc/ld.so.conf.d/x86_64-rocm-opencl.conf && ldconfig +mkdir -p /etc/OpenCL/vendors && (echo libamdocl64.so > /etc/OpenCL/vendors/amdocl64.icd) +%postun -p /bin/sh +%changelog +* Sun Nov 06 2016 Laurent Morichetti - 1.0 +Initial diff --git a/distro_install_scripts/OpenSUSE/common/rocm-utils.spec b/distro_install_scripts/OpenSUSE/common/rocm-utils.spec new file mode 120000 index 0000000..083461f --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/rocm-utils.spec @@ -0,0 +1 @@ +../../shared_files/rpm_specs/rocm-utils.spec \ No newline at end of file diff --git a/distro_install_scripts/OpenSUSE/common/rpm_install_rocm.sh b/distro_install_scripts/OpenSUSE/common/rpm_install_rocm.sh new file mode 100755 index 0000000..c6e574b --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/rpm_install_rocm.sh @@ -0,0 +1,157 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018-2019 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +echo "Preparing to set up ROCm requirements. You must be root/sudo for this." +sudo zypper -n in dkms kernel-devel wget bzip2 + +# 2.0.0 is an old release, so the deb packages have moved over to an archive +# tarball. Let's set up a local repo to allow us to do the install here. +# Store the repo in the source directory or a temp directory. +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rocm_2.0.0 ]; then + rm -rf ${SOURCE_DIR}/rocm_2.0.0 + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} +if [ ! -f ${SOURCE_DIR}/yum_2.0.0.tar.bz2 ]; then + wget http://repo.radeon.com/rocm/archive/yum_2.0.0.tar.bz2 +fi +if [ ! -d yum_2.0.0.89 ]; then + tar -xf yum_2.0.0.tar.bz2 +fi +cd yum_2.0.0.89 +REAL_SOURCE_DIR=`realpath ${SOURCE_DIR}` +sudo sh -c "echo [ROCm] > /etc/yum.repos.d/rocm.repo" +sudo sh -c "echo name=ROCm >> /etc/yum.repos.d/rocm.repo" +sudo sh -c "echo baseurl=file://${REAL_SOURCE_DIR}/yum_2.0.0.89/ >> /etc/yum.repos.d/rocm.repo" +sudo sh -c "echo enabled=1 >> /etc/yum.repos.d/rocm.repo" +sudo sh -c "echo gpgcheck=0 >> /etc/yum.repos.d/rocm.repo" + +# On Fedora, we can skip the kernel module because the proper KFD +# version was backported so our user-land tools can work cleanly. +# In addition, the ROCm 2.0.0 DKMS module fails to build against this +# kernel, so we must skip the driver. + +# ROCm requirements +sudo zypper -n in gcc-c++ + +# We must build HCC from source because the RPM that ships in the AMD binary +# repo does not work here. Ask the user if they want to do this. +ROCM_BUILD_HCC_FROM_SOURCE=true +if [ ${ROCM_FORCE_YES} = true ]; then + ROCM_BUILD_HCC_FROM_SOURCE=true +elif [ ${ROCM_FORCE_NO} = true ]; then + ROCM_BUILD_HCC_FROM_SOURCE=false +else + echo "" + echo "This script will require you to build HCC from source." + echo "This can take a long time." + read -p "Do you wish to proceed to download/build HCC (y/n)? " answer + case ${answer:0:1} in + y|Y ) + ROCM_RUN_NEXT_SCRIPT=true + echo 'User chose "yes". Will build HCC and install HIP etc.' + ;; + * ) + ROCM_BUILD_HCC_FROM_SOURCE=false + echo 'User chose "no". Will not install HCC or HIP.' + echo 'The ROCm librearies will thus not work either.' + ;; + esac +fi + +sudo dnf --setopt=install_weak_deps=False install -y hsakmt-roct hsakmt-roct-dev hsa-rocr-dev hsa-ext-rocr-dev rocm-smi rocm-cmake rocminfo rocprofiler-dev rocm-opencl rocm-opencl-devel rocm-clang-ocl +if [ ${ROCM_BUILD_HCC_FROM_SOURCE} = true ]; then + echo "Installing HCC and HIP requires us to rebuild them from source." + echo "This may take a while..." + pushd ${BASE_DIR}/../src_install/component_scripts/ + HCC_TEMP_DIR=`mktemp -d` + ./01_09_hcc.sh -s ${HCC_TEMP_DIR}/src/ -p ${HCC_TEMP_DIR}/pkg + HIP_TEMP_DIR=`mktemp -d` + ./01_10_hip.sh -s ${HIP_TEMP_DIR}/src/ -p ${HIP_TEMP_DIR}/pkg + popd + sudo dnf --setopt=install_weak_deps=False install -y rocm-device-libs atmi comgr rocr_debug_agent rocm_bandwidth_test rocm-dev rocm-utils +else + sudo dnf --setopt=install_weak_deps=False install -y rocm-device-libs atmi comgr rocr_debug_agent rocm_bandwidth_test rocm-utils +fi +sudo rm -f /etc/yum.repos.d/rocm.repo +mkdir -p /opt/rocm/.info/ +echo ${ROCM_VERSION_LONG} | sudo tee /opt/rocm/.info/version +sudo mkdir -p /etc/udev/rules.d/ +echo 'SUBSYSTEM=="kfd", KERNEL=="kfd", TAG+="uaccess", GROUP="video"' | sudo tee /etc/udev/rules.d/70-kfd.rules + +# Detect if you are actually logged into the system or not. +# Containers, for instance, may not have you as a user with +# a meaningful value for logname +num_users=`who am i | wc -l` +if [ ${num_users} -gt 0 ]; then + sudo usermod -a -G video `logname` +else + echo "" + echo "Was going to attempt to add your user to the 'video' group." + echo "However, it appears that we cannot determine your username." + echo "Perhaps you are running inside a container?" + echo "" +fi + +# Remove other OpenCL installations for stuff that isn't ROCm, or our OpenCL +# programs may crash with a lot of noise. +# for app in pocl libclc beignet; do +# num_pkgs=`dnf list installed ${app} 2>/dev/null | wc -l` +# if [ ${num_pkgs} -gt 0 ]; then +# sudo dnf remove -y ${app} +# fi +# done + +if [ ${ROCM_FORCE_YES} = true ]; then + ROCM_RUN_NEXT_SCRIPT=true +elif [ ${ROCM_FORCE_NO} = true ]; then + ROCM_RUN_NEXT_SCRIPT=false +else + echo "" + echo "The next script will set up users on the system to have GPU access." + read -p "Do you want to automatically run the next script now? (y/n)? " answer + case ${answer:0:1} in + y|Y ) + ROCM_RUN_NEXT_SCRIPT=true + echo 'User chose "yes". Running next setup script.' + ;; + * ) + echo 'User chose "no". Not running the next script.' + ;; + esac +fi + +if [ ${ROCM_RUN_NEXT_SCRIPT} = true ]; then + ${BASE_DIR}/02_setup_rocm_users.sh "$@" +fi diff --git a/distro_install_scripts/OpenSUSE/common/rpm_install_rocm_libraries.sh b/distro_install_scripts/OpenSUSE/common/rpm_install_rocm_libraries.sh new file mode 100755 index 0000000..3fd17c1 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/rpm_install_rocm_libraries.sh @@ -0,0 +1,63 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018-2019 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +sudo zypper -n in wget bzip2 + +# 2.0.0 is an old release, so the deb packages have moved over to an archive +# tarball. Let's set up a local repo to allow us to do the install here. +# Store the repo in the source directory or a temp directory. +if [ $ROCM_SAVE_SOURCE = true ]; then + SOURCE_DIR=${ROCM_SOURCE_DIR} + if [ ${ROCM_FORCE_GET_CODE} = true ] && [ -d ${SOURCE_DIR}/rocm_2.0.0 ]; then + rm -rf ${SOURCE_DIR}/rocm_2.0.0 + fi + mkdir -p ${SOURCE_DIR} +else + SOURCE_DIR=`mktemp -d` +fi +cd ${SOURCE_DIR} +if [ ! -f ${SOURCE_DIR}/yum_2.0.0.tar.bz2 ]; then + wget http://repo.radeon.com/rocm/archive/yum_2.0.0.tar.bz2 +fi +if [ ! -d yum_2.0.0.89 ]; then + tar -xf yum_2.0.0.tar.bz2 +fi +cd yum_2.0.0.89 +REAL_SOURCE_DIR=`realpath ${SOURCE_DIR}` +sudo sh -c "echo [ROCm] > /etc/yum.repos.d/rocm.repo" +sudo sh -c "echo name=ROCm >> /etc/yum.repos.d/rocm.repo" +sudo sh -c "echo baseurl=file://${REAL_SOURCE_DIR}/yum_2.0.0.89/ >> /etc/yum.repos.d/rocm.repo" +sudo sh -c "echo enabled=1 >> /etc/yum.repos.d/rocm.repo" +sudo sh -c "echo gpgcheck=0 >> /etc/yum.repos.d/rocm.repo" + +sudo zypper -n in miopen-hip miopengemm rocm-libs rocsparse hipsparse Thrust rocm_smi64 rccl +# By default, this installs miopen-hip, because PyTorch and Tensorflow use it +# If you want to use OpenVX you may need to install miopen-opencl instead of miopen-hip + +sudo rm -f /etc/yum.repos.d/rocm.repo diff --git a/distro_install_scripts/OpenSUSE/common/setup_rocm_users.sh b/distro_install_scripts/OpenSUSE/common/setup_rocm_users.sh new file mode 100755 index 0000000..589129f --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/setup_rocm_users.sh @@ -0,0 +1,86 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +ROCM_REBOOT_SYSTEM=false + +if [ ${ROCM_INSTALL_PREREQS} = true ] || [ ${ROCM_FORCE_GET_CODE} = true ]; then + exit 0 +fi + +if [ ${ROCM_LOCAL_INSTALL} = false ]; then + echo 'ADD_EXTRA_GROUPS=1' | sudo tee -a /etc/adduser.conf + echo 'EXTRA_GROUPS=video' | sudo tee -a /etc/adduser.conf + echo 'export PATH=$PATH:'"${ROCM_OUTPUT_DIR}"'/bin:'"${ROCM_OUTPUT_DIR}"'/opencl/bin/x86_64' | sudo tee -a /etc/profile.d/rocm.sh + echo 'export PATH=$PATH:/opt/rocm/bin:/opt/rocm/opencl/bin/x86_64' | sudo tee -a /etc/profile.d/rocm.sh + if [ "${ROCM_OUTPUT_DIR}" != "/opt/rocm/" ]; then + echo "export ROCM_PATH=${ROCM_OUTPUT_DIR}/" | sudo tee -a /etc/profile.d/rocm.sh + echo "export HSA_PATH=${ROCM_OUTPUT_DIR}/hsa/" | sudo tee -a /etc/profile.d/rocm.sh + echo "export HCC_HOME=${ROCM_OUTPUT_DIR}/hcc/" | sudo tee -a /etc/profile.d/rocm.sh + echo "export HIP_PLATFORM=hcc" | sudo tee -a /etc/profile.d/rocm.sh + fi + if [ ${ROCM_FORCE_YES} = true ]; then + ROCM_REBOOT_SYSTEM=true + elif [ ${ROCM_FORCE_NO} = true ]; then + ROCM_REBOOT_SYSTEM=false + else + echo "It is recommended that you reboot your system after running this script." + read -p "Do you want to reboot now? (y/n)? " answer + case ${answer:0:1} in + y|Y ) + ROCM_REBOOT_SYSTEM=true + echo 'User chose "yes". System will be rebooted.' + ;; + * ) + echo 'User chose "no". System will not be rebooted.' + ;; + esac + fi +else + echo 'export LD_LIBRARY_PATH='"${ROCM_OUTPUT_DIR}"'/opencl/lib/x86_64:'"${ROCM_OUTPUT_DIR}"'/hsa/lib:'"${ROCM_OUTPUT_DIR}"'/lib:'"${ROCM_OUTPUT_DIR}"'/hsa-amd-aqlprofile/lib/:$LD_LIBRARY_PATH' | tee -a ~/.bash_profile + echo 'export PATH=$PATH:'"${ROCM_OUTPUT_DIR}"'/bin:'"${ROCM_OUTPUT_DIR}"'/opencl/bin/x86_64' | tee -a ~/.bash_profile + if [ "${ROCM_OUTPUT_DIR}" != "/opt/rocm/" ]; then + echo "export ROCM_PATH=${ROCM_OUTPUT_DIR}/" | tee -a ~/.bash_profile + echo "export HSA_PATH=${ROCM_OUTPUT_DIR}/hsa/" | tee -a ~/.bash_profile + echo "export HCC_HOME=${ROCM_OUTPUT_DIR}/hcc/" | tee -a ~/.bash_profile + echo "export HIP_PLATFORM=hcc" | tee -a ~/.bash_profile + fi + source ~/.bashrc +fi + +if [ ${ROCM_REBOOT_SYSTEM} = true ]; then + echo "" + echo "Attempting to reboot the system." + echo "You will need to have root privileges to do this." + echo `sudo systemctl reboot` + echo "" + echo "" + echo "It appears that rebooting failed." + echo "Are you doing something like running inside of a container?" + echo "If so, you can likely proceed to the next script." +fi diff --git a/distro_install_scripts/OpenSUSE/common/src_install_rocm.sh b/distro_install_scripts/OpenSUSE/common/src_install_rocm.sh new file mode 100755 index 0000000..c7a9341 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/src_install_rocm.sh @@ -0,0 +1,95 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +ROCM_RUN_NEXT_SCRIPT=false + +if [ ${ROCM_LOCAL_INSTALL} = false ] || [ ${ROCM_INSTALL_PREREQS} = true ]; then + echo "Installing software required to build ROCm." + echo "You will need to have root privileges to do this." + sudo zypper -n in coreutils git cmake pkg-config pciutils pciutils-devel +fi + +# Driver confirmed needed to be built for Leap 15 + +${BASE_DIR}/component_scripts/01_00_rock-dkms.sh "$@" +${BASE_DIR}/component_scripts/01_01_roct.sh "$@" +${BASE_DIR}/component_scripts/01_02_rocr.sh "$@" +${BASE_DIR}/component_scripts/01_03_rocm_smi.sh "$@" +${BASE_DIR}/component_scripts/01_04_rocm_cmake.sh "$@" +${BASE_DIR}/component_scripts/01_05_rocminfo.sh "$@" +${BASE_DIR}/component_scripts/01_06_rocprofiler.sh "$@" +${BASE_DIR}/component_scripts/01_07_opencl.sh "$@" +${BASE_DIR}/component_scripts/01_08_clang-ocl.sh "$@" +${BASE_DIR}/component_scripts/01_09_hcc.sh "$@" +${BASE_DIR}/component_scripts/01_10_hip.sh "$@" +${BASE_DIR}/component_scripts/01_11_rocm_device_libs.sh "$@" +${BASE_DIR}/component_scripts/01_12_atmi.sh "$@" +${BASE_DIR}/component_scripts/01_13_comgr.sh "$@" +${BASE_DIR}/component_scripts/01_14_rocr_debug_agent.sh "$@" +${BASE_DIR}/component_scripts/01_15_rocm_bandwidth_test.sh "$@" +${BASE_DIR}/component_scripts/01_16_rocm_meta_packages.sh "$@" + +if [ ${ROCM_LOCAL_INSTALL} = false ]; then + # Detect if you are actually logged into the system or not. + # Containers, for instance, may not have you as a user with + # a meaningful value for logname + num_users=`who am i | wc -l` + if [ ${num_users} -gt 0 ]; then + ${ROCM_SUDO_COMMAND} usermod -a -G video `logname` + else + echo "" + echo "Was going to attempt to add your user to the 'video' group." + echo "However, it appears that we cannot determine your username." + echo "Perhaps you are running inside a container?" + echo "" + fi +fi + +if [ ${ROCM_FORCE_YES} = true ]; then + ROCM_RUN_NEXT_SCRIPT=true +elif [ ${ROCM_FORCE_NO} = true ]; then + ROCM_RUN_NEXT_SCRIPT=false +else + echo "" + echo "The next script will set up users on the system to have GPU access." + read -p "Do you want to automatically run the next script now? (y/n)? " answer + case ${answer:0:1} in + y|Y ) + ROCM_RUN_NEXT_SCRIPT=true + echo 'User chose "yes". Running next setup script.' + ;; + * ) + echo 'User chose "no". Not running the next script.' + ;; + esac +fi + +if [ ${ROCM_RUN_NEXT_SCRIPT} = true ]; then + ${BASE_DIR}/02_setup_rocm_users.sh "$@" +fi diff --git a/distro_install_scripts/OpenSUSE/common/src_install_rocm_libraries.sh b/distro_install_scripts/OpenSUSE/common/src_install_rocm_libraries.sh new file mode 100755 index 0000000..49fdaf7 --- /dev/null +++ b/distro_install_scripts/OpenSUSE/common/src_install_rocm_libraries.sh @@ -0,0 +1,45 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2018 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +############################################################################### +BASE_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +set -e +trap 'lastcmd=$curcmd; curcmd=$BASH_COMMAND' DEBUG +trap 'errno=$?; print_cmd=$lastcmd; if [ $errno -ne 0 ]; then echo "\"${print_cmd}\" command failed with exit code $errno."; fi' EXIT +source "$BASE_DIR/common/common_options.sh" +parse_args "$@" + +${BASE_DIR}/component_scripts/03_00_rocblas.sh "$@" +${BASE_DIR}/component_scripts/03_01_hipblas.sh "$@" +${BASE_DIR}/component_scripts/03_02_rocfft.sh "$@" +${BASE_DIR}/component_scripts/03_03_rocrand.sh "$@" +${BASE_DIR}/component_scripts/03_04_rocprim.sh "$@" +${BASE_DIR}/component_scripts/03_05_rocsparse.sh "$@" +${BASE_DIR}/component_scripts/03_06_hipsparse.sh "$@" +${BASE_DIR}/component_scripts/03_07_rocalution.sh "$@" +${BASE_DIR}/component_scripts/03_08_miopengemm.sh "$@" +${BASE_DIR}/component_scripts/03_09_miopen.sh "$@" +# By default, this installs miopen-hip, because PyTorch and Tensorflow use it +# If you want to use OpenVX you may need to install miopen-opencl instead of miopen-hip +${BASE_DIR}/component_scripts/03_10_library_meta_packages.sh "$@" +${BASE_DIR}/component_scripts/03_11_hip-thrust.sh "$@" +${BASE_DIR}/component_scripts/03_12_rocm_smi64.sh "$@" +${BASE_DIR}/component_scripts/03_13_rccl.sh "$@" diff --git a/distro_install_scripts/README.md b/distro_install_scripts/README.md index f9d598f..9f0339b 100644 --- a/distro_install_scripts/README.md +++ b/distro_install_scripts/README.md @@ -19,6 +19,8 @@ These tools have been built and tested on the following distributions: - [Fedora](Fedora) - [Fedora 28](Fedora/Fedora_28)† - [Fedora 29](Fedora/Fedora_29)† +- [OpenSUSE](OpenSUSE) + - [Leap 15](OpenSUSE/Leap_15)† - [Red Hat Enterprise Linux (RHEL)](RHEL) - [RHEL 7.4](RHEL/RHEL_7.4) - [RHEL 7.5](RHEL/RHEL_7.5)