Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2939effe0a |
+183
@@ -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
|
||||
@@ -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.
|
||||
|
||||
|
||||
Submodule
+1
Submodule libs/AMDMIGraphX added at b1c8c8e8d8
Submodule
+1
Submodule libs/HIP added at 50ec90c65c
Submodule
+1
Submodule libs/HIPIFY added at c4696fc7f2
Submodule
+1
Submodule libs/MIOpen added at 36bb7fd4a2
Submodule
+1
Submodule libs/MIVisionX added at 5236504693
Submodule
+1
Submodule libs/ROCK-Kernel-Driver added at 2889fc765d
Submodule
+1
Submodule libs/ROCR-Runtime added at 1d1b8456c3
Submodule
+1
Submodule libs/ROCT-Thunk-Interface added at c8db22210d
Submodule
+1
Submodule libs/ROCdbgapi added at 4566f62a0d
Submodule
+1
Submodule libs/ROCgdb added at 7ba4b4f96d
Submodule
+1
Submodule libs/ROCmValidationSuite added at 7e36b6f378
Submodule
+1
Submodule libs/Tensile added at dbc2062dce
Submodule
+1
Submodule libs/amdsmi added at 2b02a07970
Submodule
+1
Submodule libs/clr added at dd7f957662
Submodule
+1
Submodule libs/composable_kernel added at bbf7375b77
Submodule
+1
Submodule libs/half added at 1ddada2251
Submodule
+1
Submodule libs/hipBLAS added at e734acbca0
Submodule
+1
Submodule libs/hipBLASLt added at 500158158f
Submodule
+1
Submodule libs/hipCUB added at 1875530e7d
Submodule
+1
Submodule libs/hipFFT added at baee8f8a70
Submodule
+1
Submodule libs/hipRAND added at 080186daed
Submodule
+1
Submodule libs/hipSOLVER added at 4e095b95b9
Submodule
+1
Submodule libs/hipSPARSE added at 3800cfe6e0
Submodule
+1
Submodule libs/hipSPARSELt added at 004dacd5bc
Submodule
+1
Submodule libs/hipTensor added at b767a2f935
Submodule
+1
Submodule libs/hipfort added at a971a24e08
Submodule
+1
Submodule libs/hipother added at c18a23c1de
Submodule
+1
Submodule libs/llvm-project added at 26466ce804
Submodule
+1
Submodule libs/omniperf added at 17eb9e3a44
Submodule
+1
Submodule libs/omnitrace added at f0bd9126a5
Submodule
+1
Submodule libs/openmp-extras/aomp added at 825bfac150
Submodule
+1
Submodule libs/openmp-extras/aomp-extras added at ae81005bb3
Submodule
+1
Submodule libs/openmp-extras/flang added at 9a9e2c8e92
Submodule
+1
Submodule libs/rccl added at 45b618a315
Submodule
+1
Submodule libs/rdc added at 8c56855a05
Submodule
+1
Submodule libs/rocAL added at 6c331ce047
Submodule
+1
Submodule libs/rocALUTION added at 3bf8de2f04
Submodule
+1
Submodule libs/rocBLAS added at 54f305c18f
Submodule
+1
Submodule libs/rocDecode added at 9d44600e95
Submodule
+1
Submodule libs/rocFFT added at 7a8c4759ac
Submodule
+1
Submodule libs/rocPRIM added at eab1eed11e
Submodule
+1
Submodule libs/rocPyDecode added at 961da22a80
Submodule
+1
Submodule libs/rocRAND added at e7154bdfc6
Submodule
+1
Submodule libs/rocSOLVER added at 7e1b068c95
Submodule
+1
Submodule libs/rocSPARSE added at b293299f99
Submodule
+1
Submodule libs/rocThrust added at ae693f61db
Submodule
+1
Submodule libs/rocWMMA added at 677b441c6e
Submodule
+1
Submodule libs/rocm-cmake added at 1862031456
Submodule
+1
Submodule libs/rocm-core added at 98a50c572a
Submodule
+1
Submodule libs/rocm-examples added at 7d558faac4
Submodule
+1
Submodule libs/rocm_bandwidth_test added at cdd3c7bdce
Submodule
+1
Submodule libs/rocm_smi_lib added at 5ac86f6f5a
Submodule
+1
Submodule libs/rocminfo added at 6c8d92d382
Submodule
+1
Submodule libs/rocprofiler added at c3404b8023
Submodule
+1
Submodule libs/rocprofiler-sdk added at b2b99d424a
Submodule
+1
Submodule libs/rocr_debug_agent added at 65fc9ab998
Submodule
+1
Submodule libs/roctracer added at 228cd05a72
Submodule
+1
Submodule libs/rpp added at 07d64ecffc
Executable
+150
@@ -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
|
||||
Reference in New Issue
Block a user