Compare commits

...

1 Commits

Author SHA1 Message Date
David Galiffi
2939effe0a Create submodules to the ROCm 6.2.0 components.
- Synced to rocm-6.2.0
- Saved to the ./libs folder
- Add a script to help update submodules when the next version
of ROCm is released. Saved in ./tools/submodules
- Update README to remove `repo` instructions and add
`git submodule` instructions.

Signed-off-by: David Galiffi <David.Galiffi@amd.com>
2024-08-09 16:58:57 -04:00
61 changed files with 396 additions and 29 deletions

183
.gitmodules vendored Normal file
View File

@@ -0,0 +1,183 @@
[submodule "libs/ROCK-Kernel-Driver"]
path = libs/ROCK-Kernel-Driver
url = ../ROCK-Kernel-Driver
[submodule "libs/ROCT-Thunk-Interface"]
path = libs/ROCT-Thunk-Interface
url = ../ROCT-Thunk-Interface
[submodule "libs/ROCR-Runtime"]
path = libs/ROCR-Runtime
url = ../ROCR-Runtime
[submodule "libs/amdsmi"]
path = libs/amdsmi
url = ../amdsmi
[submodule "libs/rocm_smi_lib"]
path = libs/rocm_smi_lib
url = ../rocm_smi_lib
[submodule "libs/rocm-core"]
path = libs/rocm-core
url = ../rocm-core
[submodule "libs/rocm-cmake"]
path = libs/rocm-cmake
url = ../rocm-cmake
[submodule "libs/rocminfo"]
path = libs/rocminfo
url = ../rocminfo
[submodule "libs/rocm_bandwidth_test"]
path = libs/rocm_bandwidth_test
url = ../rocm_bandwidth_test
[submodule "libs/rocprofiler"]
path = libs/rocprofiler
url = ../rocprofiler
[submodule "libs/roctracer"]
path = libs/roctracer
url = ../roctracer
[submodule "libs/rdc"]
path = libs/rdc
url = ../rdc
[submodule "libs/HIP"]
path = libs/HIP
url = ../HIP
[submodule "libs/clr"]
path = libs/clr
url = ../clr
[submodule "libs/hipother"]
path = libs/hipother
url = ../hipother
[submodule "libs/HIPIFY"]
path = libs/HIPIFY
url = ../HIPIFY
[submodule "libs/HIPCC"]
path = libs/HIPCC
url = ../HIPCC
[submodule "libs/llvm-project"]
path = libs/llvm-project
url = ../llvm-project
[submodule "libs/ROCm-Device-Libs"]
path = libs/ROCm-Device-Libs
url = ../ROCm-Device-Libs
[submodule "libs/ROCm-CompilerSupport"]
path = libs/ROCm-CompilerSupport
url = ../ROCm-CompilerSupport
[submodule "libs/half"]
path = libs/half
url = ../half
[submodule "libs/ROCgdb"]
path = libs/ROCgdb
url = ../ROCgdb
[submodule "libs/ROCdbgapi"]
path = libs/ROCdbgapi
url = ../ROCdbgapi
[submodule "libs/rocr_debug_agent"]
path = libs/rocr_debug_agent
url = ../rocr_debug_agent
[submodule "libs/rocBLAS"]
path = libs/rocBLAS
url = ../rocBLAS
[submodule "libs/Tensile"]
path = libs/Tensile
url = ../Tensile
[submodule "libs/hipTensor"]
path = libs/hipTensor
url = ../hipTensor
[submodule "libs/hipBLAS"]
path = libs/hipBLAS
url = ../hipBLAS
[submodule "libs/hipBLASLt"]
path = libs/hipBLASLt
url = ../hipBLASLt
[submodule "libs/rocFFT"]
path = libs/rocFFT
url = ../rocFFT
[submodule "libs/hipFFT"]
path = libs/hipFFT
url = ../hipFFT
[submodule "libs/rocRAND"]
path = libs/rocRAND
url = ../rocRAND
[submodule "libs/hipRAND"]
path = libs/hipRAND
url = ../hipRAND
[submodule "libs/rocSPARSE"]
path = libs/rocSPARSE
url = ../rocSPARSE
[submodule "libs/hipSPARSELt"]
path = libs/hipSPARSELt
url = ../hipSPARSELt
[submodule "libs/rocSOLVER"]
path = libs/rocSOLVER
url = ../rocSOLVER
[submodule "libs/hipSOLVER"]
path = libs/hipSOLVER
url = ../hipSOLVER
[submodule "libs/hipSPARSE"]
path = libs/hipSPARSE
url = ../hipSPARSE
[submodule "libs/rocALUTION"]
path = libs/rocALUTION
url = ../rocALUTION
[submodule "libs/rocThrust"]
path = libs/rocThrust
url = ../rocThrust
[submodule "libs/hipCUB"]
path = libs/hipCUB
url = ../hipCUB
[submodule "libs/rocPRIM"]
path = libs/rocPRIM
url = ../rocPRIM
[submodule "libs/rocWMMA"]
path = libs/rocWMMA
url = ../rocWMMA
[submodule "libs/rccl"]
path = libs/rccl
url = ../rccl
[submodule "libs/MIOpen"]
path = libs/MIOpen
url = ../MIOpen
[submodule "libs/composable_kernel"]
path = libs/composable_kernel
url = ../composable_kernel
[submodule "libs/MIVisionX"]
path = libs/MIVisionX
url = ../MIVisionX
[submodule "libs/rpp"]
path = libs/rpp
url = ../rpp
[submodule "libs/hipfort"]
path = libs/hipfort
url = ../hipfort
[submodule "libs/AMDMIGraphX"]
path = libs/AMDMIGraphX
url = ../AMDMIGraphX
[submodule "libs/ROCmValidationSuite"]
path = libs/ROCmValidationSuite
url = ../ROCmValidationSuite
[submodule "libs/openmp-extras/aomp"]
path = libs/openmp-extras/aomp
url = ../aomp
[submodule "libs/openmp-extras/aomp-extras"]
path = libs/openmp-extras/aomp-extras
url = ../aomp-extras
[submodule "libs/openmp-extras/flang"]
path = libs/openmp-extras/flang
url = ../flang
[submodule "libs/rocDecode"]
path = libs/rocDecode
url = ../rocDecode
[submodule "libs/omnitrace"]
path = libs/omnitrace
url = ../omnitrace
[submodule "libs/omniperf"]
path = libs/omniperf
url = ../omniperf
[submodule "libs/rocprofiler-sdk"]
path = libs/rocprofiler-sdk
url = ../rocprofiler-sdk
[submodule "libs/rocm-examples"]
path = libs/rocm-examples
url = ../rocm-examples
[submodule "libs/rocPyDecode"]
path = libs/rocPyDecode
url = ../rocPyDecode
[submodule "libs/rocAL"]
path = libs/rocAL
url = ../rocAL

View File

@@ -21,19 +21,7 @@ source software compilers, debuggers, and libraries. ROCm is fully integrated in
## Getting the ROCm Source Code
AMD ROCm is built from open source software. It is, therefore, possible to modify the various components of ROCm by downloading the source code and rebuilding the components. The source code for ROCm components can be cloned from each of the GitHub repositories using git. For easy access to download the correct versions of each of these tools, the ROCm repository contains a repo manifest file called [default.xml](./default.xml). You can use this manifest file to download the source code for ROCm software.
### Installing the repo tool
The repo tool from Google allows you to manage multiple git repositories simultaneously. Run the following commands to install the repo tool:
```bash
mkdir -p ~/bin/
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
```
**Note:** The ```~/bin/``` folder is used as an example. You can specify a different folder to install the repo tool into if you desire.
AMD ROCm is built from open source software. It is, therefore, possible to modify the various components of ROCm by downloading the source code and rebuilding the components. The source code for ROCm components can be cloned from each of the GitHub repositories using git. For easy access to download the correct versions of each of these tools, the ROCm repository contains submodules that point to the correct versions of each of the ROCm components. They can be found in the `/libs` directory of the ROCm repository.
### Installing git-lfs
@@ -45,17 +33,12 @@ sudo apt-get install git-lfs
### Downloading the ROCm source code
The following example shows how to use the repo tool to download the ROCm source code. If you choose a directory other than ~/bin/ to install the repo tool, you must use that chosen directory in the code as shown below:
The following example shows how to download the ROCm source from this repository.
```bash
mkdir -p ~/ROCm/
cd ~/ROCm/
~/bin/repo init -u http://github.com/ROCm/ROCm.git -b roc-6.0.x
~/bin/repo sync
git clone https://github.com/ROCm/ROCm -b amd/dgaliffi/submodules-6-2-0 --recurse-submodules
```
**Note:** Using this sample code will cause the repo tool to download the open source code associated with the specified ROCm release. Ensure that you have ssh-keys configured on your machine for your GitHub ID prior to the download as explained at [Connecting to GitHub with SSH](https://docs.github.com/en/authentication/connecting-to-github-with-ssh).
## Building the ROCm source code
Each ROCm component repository contains directions for building that component, such as the rocSPARSE documentation [Installation and Building for Linux](https://rocm.docs.amd.com/projects/rocSPARSE/en/latest/install/Linux_Install_Guide.html). Refer to the specific component documentation for instructions on building the repository.
@@ -76,9 +59,8 @@ The Build time will reduce significantly if we limit the GPU Architecture/s agai
mkdir -p ~/WORKSPACE/ # Or any folder name other than WORKSPACE
cd ~/WORKSPACE/
export ROCM_VERSION=6.1.0 # or 6.1.1 6.1.2
~/bin/repo init -u http://github.com/ROCm/ROCm.git -b roc-6.1.x -m tools/rocm-build/rocm-${ROCM_VERSION}.xml
~/bin/repo sync
export ROCM_VERSION=6.2.0 # or 6.1.1 6.1.2
git clone https://github.com/ROCm/ROCm -b amd/dgaliffi/submodules-${ROCM_VERSION} --recurse-submodules
# --------------------------------------
# Step 2: Prepare build environment
@@ -155,12 +137,6 @@ Note: [Overview for ROCm.mk](tools/rocm-build/README.md)
## ROCm documentation
This repository contains the [manifest file](https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md)
for ROCm releases, changelogs, and release information.
The `default.xml` file contains information for all repositories and the associated commit used to build
the current ROCm release; `default.xml` uses the [Manifest Format repository](https://gerrit.googlesource.com/git-repo/).
Source code for our documentation is located in the `/docs` folder of most ROCm repositories. The
`develop` branch of our repositories contains content for the next ROCm release.

1
libs/AMDMIGraphX Submodule

Submodule libs/AMDMIGraphX added at b1c8c8e8d8

1
libs/HIP Submodule

Submodule libs/HIP added at 50ec90c65c

1
libs/HIPIFY Submodule

Submodule libs/HIPIFY added at c4696fc7f2

1
libs/MIOpen Submodule

Submodule libs/MIOpen added at 36bb7fd4a2

1
libs/MIVisionX Submodule

Submodule libs/MIVisionX added at 5236504693

1
libs/ROCR-Runtime Submodule

Submodule libs/ROCR-Runtime added at 1d1b8456c3

1
libs/ROCdbgapi Submodule

Submodule libs/ROCdbgapi added at 4566f62a0d

1
libs/ROCgdb Submodule

Submodule libs/ROCgdb added at 7ba4b4f96d

1
libs/Tensile Submodule

Submodule libs/Tensile added at dbc2062dce

1
libs/amdsmi Submodule

Submodule libs/amdsmi added at 2b02a07970

1
libs/clr Submodule

Submodule libs/clr added at dd7f957662

1
libs/half Submodule

Submodule libs/half added at 1ddada2251

1
libs/hipBLAS Submodule

Submodule libs/hipBLAS added at e734acbca0

1
libs/hipBLASLt Submodule

Submodule libs/hipBLASLt added at 500158158f

1
libs/hipCUB Submodule

Submodule libs/hipCUB added at 1875530e7d

1
libs/hipFFT Submodule

Submodule libs/hipFFT added at baee8f8a70

1
libs/hipRAND Submodule

Submodule libs/hipRAND added at 080186daed

1
libs/hipSOLVER Submodule

Submodule libs/hipSOLVER added at 4e095b95b9

1
libs/hipSPARSE Submodule

Submodule libs/hipSPARSE added at 3800cfe6e0

1
libs/hipSPARSELt Submodule

Submodule libs/hipSPARSELt added at 004dacd5bc

1
libs/hipTensor Submodule

Submodule libs/hipTensor added at b767a2f935

1
libs/hipfort Submodule

Submodule libs/hipfort added at a971a24e08

1
libs/hipother Submodule

Submodule libs/hipother added at c18a23c1de

1
libs/llvm-project Submodule

Submodule libs/llvm-project added at 26466ce804

1
libs/omniperf Submodule

Submodule libs/omniperf added at 17eb9e3a44

1
libs/omnitrace Submodule

Submodule libs/omnitrace added at f0bd9126a5

1
libs/rccl Submodule

Submodule libs/rccl added at 45b618a315

1
libs/rdc Submodule

Submodule libs/rdc added at 8c56855a05

1
libs/rocAL Submodule

Submodule libs/rocAL added at 6c331ce047

1
libs/rocALUTION Submodule

Submodule libs/rocALUTION added at 3bf8de2f04

1
libs/rocBLAS Submodule

Submodule libs/rocBLAS added at 54f305c18f

1
libs/rocDecode Submodule

Submodule libs/rocDecode added at 9d44600e95

1
libs/rocFFT Submodule

Submodule libs/rocFFT added at 7a8c4759ac

1
libs/rocPRIM Submodule

Submodule libs/rocPRIM added at eab1eed11e

1
libs/rocPyDecode Submodule

Submodule libs/rocPyDecode added at 961da22a80

1
libs/rocRAND Submodule

Submodule libs/rocRAND added at e7154bdfc6

1
libs/rocSOLVER Submodule

Submodule libs/rocSOLVER added at 7e1b068c95

1
libs/rocSPARSE Submodule

Submodule libs/rocSPARSE added at b293299f99

1
libs/rocThrust Submodule

Submodule libs/rocThrust added at ae693f61db

1
libs/rocWMMA Submodule

Submodule libs/rocWMMA added at 677b441c6e

1
libs/rocm-cmake Submodule

Submodule libs/rocm-cmake added at 1862031456

1
libs/rocm-core Submodule

Submodule libs/rocm-core added at 98a50c572a

1
libs/rocm-examples Submodule

Submodule libs/rocm-examples added at 7d558faac4

1
libs/rocm_smi_lib Submodule

Submodule libs/rocm_smi_lib added at 5ac86f6f5a

1
libs/rocminfo Submodule

Submodule libs/rocminfo added at 6c8d92d382

1
libs/rocprofiler Submodule

Submodule libs/rocprofiler added at c3404b8023

1
libs/rocprofiler-sdk Submodule

Submodule libs/rocprofiler-sdk added at b2b99d424a

1
libs/rocr_debug_agent Submodule

Submodule libs/rocr_debug_agent added at 65fc9ab998

1
libs/roctracer Submodule

Submodule libs/roctracer added at 228cd05a72

1
libs/rpp Submodule

Submodule libs/rpp added at 07d64ecffc

View File

@@ -0,0 +1,150 @@
#!/usr/bin/bash
# Color codes
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
printHelp() {
# Print the help message
printf -- \
"
Usage: update-submodules.sh [-t <tag>] [-p <path>]
Description: Update submodules to the ROCm release tag
Options:
-h, --help: Print the help message
-t, --tag: The ROCm release tag to update the submodules to
-p, --path: The path to the submodules directory
Example:
./update-submodules.sh -t rocm-6.1.0 -p ../../libs"
}
updateSubmodules() {
# Update the submodules in the given directory to the desired tag
# $1: The directory to update the submodules in
local directory=$1
pushd "$directory" >> /dev/null || exit
for d in */
do
pushd "$d" >> /dev/null || exit
if [[ -e .git ]]; then
echo -e "${GREEN}${d} is a git folder${NC}"
if ! git fetch --all; then
echo -e "${RED}Failed to fetch for ${d}${NC}"
# Save the current directory to an array to output the list of
# failed fetches at the end.
gitFetchErrors+=("$d")
fi
# Checkout the desired tag
if ! git checkout tags/"${RocmRelease}"; then
echo -e "${RED}Failed to checkout tag ${RocmRelease} for ${d}${NC}"
# Save the current directory to an array to output the list of
# failed checkouts at the end.
gitCheckoutErrors+=("$d")
fi
else
echo -e "${RED}${d} is NOT a git folder${NC}"
# Save the current directory to an array to output the list of
# non-git folders at the end.
nonGitFolders+=("$d")
fi
echo -e "${NC}"
popd >> /dev/null || exit
done
popd >> /dev/null || exit
}
#######
# MAIN PROGRAM
#######
# Default values
RocmRelease=rocm-6.1.0
PathToSubmodules=../../libs
# Parse command line parameters.
while [ $# -gt 0 ]; do
case $1 in
-h | --help )
printHelp
exit 0
;;
-t | --tag )
shift
RocmRelease=$1
shift
;;
-p | --path )
shift
PathToSubmodules=$1
shift
;;
* )
shift
;;
esac
done
echo "********************************"
echo -e "${BLUE}Path to Submodules: ${PathToSubmodules}${NC}"
pushd "$PathToSubmodules" >> /dev/null || exit
echo -e "${BLUE}Syncing to Tag: ${RocmRelease}.${NC}"
echo "********************************"
echo
# Update submodules in the current directory
updateSubmodules "."
# Update the `openmp-extras` modules
updateSubmodules "openmp-extras"
popd >> /dev/null || exit
# Output summary of errors
echo "********************************"
echo -e "${BLUE}*** Error Report ***${NC}"
echo "********************************"
echo
if [ ${#nonGitFolders[@]} -gt 0 ]; then
echo -e "${RED}The following folders are not git folders:${NC}"
for d in "${nonGitFolders[@]}"
do
echo "${d}"
done
echo
fi
if [ ${#gitFetchErrors[@]} -gt 0 ]; then
echo -e "${RED}The following folders failed to fetch:${NC}"
for d in "${gitFetchErrors[@]}"
do
echo "${d}"
done
echo
fi
if [ ${#gitCheckoutErrors[@]} -gt 0 ]; then
echo -e "${RED}The following folders failed to checkout tag ${RocmRelease}:${NC}"
for d in "${gitCheckoutErrors[@]}"
do
echo "${d}"
done
echo
fi