diff --git a/.azuredevops/ci-builds/aomp.yml b/.azuredevops/ci-builds/aomp.yml new file mode 100644 index 000000000..3b15e09df --- /dev/null +++ b/.azuredevops/ci-builds/aomp.yml @@ -0,0 +1,33 @@ +variables: +- group: common +- template: /.azuredevops/variables-global.yml + +resources: + repositories: + - repository: release_repo + type: github + endpoint: ROCm + name: ROCm/aomp + ref: ${{ parameters.checkoutRef }} + - repository: llvm-project_repo + type: github + endpoint: ROCm + name: ROCm/llvm-project + ref: ${{ parameters.checkoutRef }} + pipelines: + - pipeline: rocr-runtime_pipeline + source: \ROCR-Runtime + trigger: + branches: + include: + - master + +# this job will only be triggered after successful build sequence of llvm-project and ROCR-Runtime + +trigger: none +pr: none + +jobs: + - template: ${{ variables.CI_COMPONENT_PATH }}/aomp.yml + parameters: + checkoutRepo: release_repo diff --git a/.azuredevops/components/MIOpen.yml b/.azuredevops/components/MIOpen.yml index 0e6c18dbd..a784e9d07 100644 --- a/.azuredevops/components/MIOpen.yml +++ b/.azuredevops/components/MIOpen.yml @@ -9,12 +9,9 @@ parameters: type: object default: - software-properties-common + - python3-pip - cmake - ninja-build - - composablekernel-dev - - half - - rocrand - - rocblas - libsqlite3-dev - libbz2-dev - nlohmann-json3-dev @@ -23,6 +20,15 @@ parameters: type: object default: - rocMLIR + - rocRAND + - rocBLAS + - half + - composable_kernel + - rocm-cmake + - llvm-project + - ROCR-Runtime + - clr + - rocminfo jobs: - job: MIOpen @@ -30,8 +36,6 @@ jobs: - group: common - template: /.azuredevops/variables-global.yml pool: ${{ variables.MEDIUM_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -70,9 +74,8 @@ jobs: parameters: extraBuildFlags: >- -DMIOPEN_BACKEND=HIP - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang - -DCMAKE_PREFIX_PATH="$(Agent.BuildDirectory)/rocm" + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DMIOPEN_ENABLE_AI_KERNEL_TUNING=OFF -DMIOPEN_ENABLE_AI_IMMED_MODE_FALLBACK=OFF -DCMAKE_BUILD_TYPE=Release diff --git a/.azuredevops/components/MIVisionX.yml b/.azuredevops/components/MIVisionX.yml index 57f855513..9a492bc77 100644 --- a/.azuredevops/components/MIVisionX.yml +++ b/.azuredevops/components/MIVisionX.yml @@ -14,10 +14,6 @@ parameters: - wget - unzip - pkg-config - - half - - rocblas-dev - - miopen-hip-dev - - migraphx-dev - protobuf-compiler - libprotoc-dev - ffmpeg @@ -25,10 +21,6 @@ parameters: - libavformat-dev - libavutil-dev - libswscale-dev - - rpp - - rpp-dev - - rocdecode - - rocdecode-dev - build-essential - libgtk2.0-dev - libavcodec-dev @@ -41,6 +33,7 @@ parameters: - libtiff-dev - libdc1394-dev - libgmp-dev + - libopencv-dev - name: pipModules type: object default: @@ -50,6 +43,21 @@ parameters: - google==3.0.0 - protobuf==3.12.4 - onnx==1.12.0 +- name: rocmDependencies + type: object + default: + - rocm-cmake + - llvm-project + - ROCR-Runtime + - clr + - rocminfo + - rocprofiler-register + - half + - rocBLAS + - MIOpen + - AMDMIGraphX + - rpp + - rocDecode jobs: - job: MIVisionX @@ -58,8 +66,6 @@ jobs: - template: /.azuredevops/variables-global.yml pool: vmImage: ${{ variables.BASE_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -71,11 +77,23 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} +# CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- -DCMAKE_BUILD_TYPE=Release - -DROCM_PATH=/opt/rocm + -DROCM_PATH=$(Agent.BuildDirectory)/rocm -DROCM_DEP_ROCMCORE=ON -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/ROCdbgapi.yml b/.azuredevops/components/ROCdbgapi.yml index 05317a0e1..9d05060f3 100644 --- a/.azuredevops/components/ROCdbgapi.yml +++ b/.azuredevops/components/ROCdbgapi.yml @@ -10,6 +10,13 @@ parameters: default: - cmake - ninja-build +- name: rocmDependencies + type: object + default: + - clr + - llvm-project + - rocminfo + - ROCR-Runtime jobs: - job: ROCdbgapi @@ -18,8 +25,6 @@ jobs: - template: /.azuredevops/variables-global.yml pool: vmImage: ${{ variables.BASE_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -30,9 +35,22 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} +# CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- -DCMAKE_BUILD_TYPE=Release + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/rocgdb.yml b/.azuredevops/components/ROCgdb.yml similarity index 100% rename from .azuredevops/components/rocgdb.yml rename to .azuredevops/components/ROCgdb.yml diff --git a/.azuredevops/components/ROCmValidationSuite.yml b/.azuredevops/components/ROCmValidationSuite.yml index 40d75b3eb..f4042bdaa 100644 --- a/.azuredevops/components/ROCmValidationSuite.yml +++ b/.azuredevops/components/ROCmValidationSuite.yml @@ -10,22 +10,33 @@ parameters: default: - cmake - ninja-build - - rocblas - libyaml-cpp-dev - libpci-dev - libpci3 - googletest - git +- name: rocmDependencies + type: object + default: + - clr + - llvm-project + - rocBLAS + - rocm-cmake + - rocm_smi_lib + - rocminfo + - rocprofiler-register + - ROCR-Runtime + - ROCT-Thunk-Interface jobs: - job: ROCmValidationSuite variables: - group: common - template: /.azuredevops/variables-global.yml + - name: HIP_ROCCLR_HOME + value: $(Build.BinariesDirectory)/rocm pool: vmImage: ${{ variables.BASE_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -36,11 +47,23 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} +# CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DROCM_PATH=/opt/rocm - -DCMAKE_PREFIX_PATH=/opt/rocm - -DCPACK_PACKAGING_INSTALL_PREFIX='$(Build.BinariesDirectory)' + -DROCM_PATH=$(Agent.BuildDirectory)/rocm + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm + -DCPACK_PACKAGING_INSTALL_PREFIX=$(Build.BinariesDirectory) -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/composable_kernel.yml b/.azuredevops/components/composable_kernel.yml index 88e703c0b..adef93e84 100644 --- a/.azuredevops/components/composable_kernel.yml +++ b/.azuredevops/components/composable_kernel.yml @@ -11,6 +11,16 @@ parameters: - cmake - ninja-build - git + - python3-pip +- name: rocmDependencies + type: object + default: + - rocm-cmake + - llvm-project + - ROCR-Runtime + - clr + - rocminfo + - rocprofiler-register jobs: - job: composable_kernel @@ -18,8 +28,6 @@ jobs: - group: common - template: /.azuredevops/variables-global.yml pool: ${{ variables.MEDIUM_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -30,11 +38,24 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} +# CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/bin/amdclang + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DCMAKE_BUILD_TYPE=Release -DGPU_TARGETS=gfx1030;gfx1100 -GNinja diff --git a/.azuredevops/components/half.yml b/.azuredevops/components/half.yml index a8e7e3677..7cbb7d46e 100644 --- a/.azuredevops/components/half.yml +++ b/.azuredevops/components/half.yml @@ -8,8 +8,17 @@ parameters: - name: aptPackages type: object default: + - python3-pip - cmake - ninja-build +- name: rocmDependencies + type: object + default: + - rocm-cmake + - llvm-project + - ROCR-Runtime + - clr + - rocminfo jobs: - job: half @@ -18,8 +27,6 @@ jobs: - template: /.azuredevops/variables-global.yml pool: vmImage: ${{ variables.BASE_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -30,9 +37,22 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} + # CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging + # manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/hipBLAS.yml b/.azuredevops/components/hipBLAS.yml index d6bbd9dbe..03747afa7 100644 --- a/.azuredevops/components/hipBLAS.yml +++ b/.azuredevops/components/hipBLAS.yml @@ -10,25 +10,33 @@ parameters: default: - cmake - ninja-build - - rocblas-dev - - rocsparse - - rocsolver-dev - gfortran - googletest - git - libgtest-dev - wget + - python3-pip + - libomp-dev +- name: rocmDependencies + type: object + default: + - rocm-cmake + - llvm-project + - ROCR-Runtime + - clr + - rocminfo + - rocprofiler-register + - rocBLAS + - rocSPARSE + - rocSOLVER + - aomp jobs: - job: hipBLAS variables: - group: common - template: /.azuredevops/variables-global.yml - - name: LD_LIBRARY_PATH - value: '/lib:/usr/lib:/usr/local/lib' pool: ${{ variables.MEDIUM_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -51,20 +59,24 @@ jobs: targetType: inline script: sudo apt install --yes ./aocl-linux-aocc-4.1.0_1_amd64.deb workingDirectory: '$(Pipeline.Workspace)' - - task: Bash@3 - displayName: 'ldconfig' - inputs: - targetType: inline - script: sudo ldconfig - workingDirectory: '/usr/local/lib' - - script: 'ls -1R /usr/local' - displayName: 'Artifact listing' +# CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_PREFIX_PATH=/opt/rocm + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DCMAKE_BUILD_TYPE=Release - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ -DAMDGPU_TARGETS=gfx1030;gfx1100 -DHIP_PLATFORM=amd -DBUILD_CLIENTS_TESTS=ON diff --git a/.azuredevops/components/hipCUB.yml b/.azuredevops/components/hipCUB.yml index 12b8e530b..e09062961 100644 --- a/.azuredevops/components/hipCUB.yml +++ b/.azuredevops/components/hipCUB.yml @@ -10,9 +10,17 @@ parameters: default: - cmake - ninja-build - - rocprim - googletest - git + - python3-pip +- name: rocmDependencies + type: object + default: + - clr + - llvm-project + - rocminfo + - rocPRIM + - ROCR-Runtime jobs: - job: hipCUB @@ -20,8 +28,6 @@ jobs: - group: common - template: /.azuredevops/variables-global.yml pool: ${{ variables.MEDIUM_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -32,12 +38,24 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} +# CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/bin/amdclang - -DCMAKE_PREFIX_PATH="/opt/rocm" + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DBUILD_TEST=ON -DAMDGPU_TARGETS=gfx1030;gfx1100 -GNinja diff --git a/.azuredevops/components/hipFFT.yml b/.azuredevops/components/hipFFT.yml index 7b2ef784c..64c7fb5e2 100644 --- a/.azuredevops/components/hipFFT.yml +++ b/.azuredevops/components/hipFFT.yml @@ -10,22 +10,31 @@ parameters: default: - cmake - ninja-build - - rocrand - - hiprand - - rocfft - libboost-program-options-dev - - googletest + - libgtest-dev - libfftw3-dev - + - python3-pip + - libomp-14-dev +# rocm dependencies should match dependencies-rocm.yml +- name: rocmDependencies + type: object + default: + - rocRAND + - hipRAND + - llvm-project + - ROCR-Runtime + - clr + - rocminfo + - rocFFT + - aomp jobs: - job: hipFFT variables: - group: common - template: /.azuredevops/variables-global.yml - pool: - vmImage: ${{ variables.BASE_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} + - name: HIP_ROCCLR_HOME + value: $(Build.BinariesDirectory)/rocm + pool: ${{ variables.BASE_BUILD_POOL }} workspace: clean: all steps: @@ -36,16 +45,31 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} + # CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/bin/amdclang + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang + -DCMAKE_MODULE_PATH=$(Agent.BuildDirectory)/rocm/lib/cmake/hip + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS=gfx1030;gfx1100 + -DUSE_HIP_CLANG=ON + -DHIP_COMPILER=clang -DBUILD_CLIENTS_TESTS=ON - -DBUILD_CLIENTS_BENCH=OFF + -DBUILD_CLIENTS_BENCHMARKS=OFF -DBUILD_CLIENTS_SAMPLES=OFF - -L -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/hipSOLVER.yml b/.azuredevops/components/hipSOLVER.yml index 8c1884d11..a4cf173ac 100644 --- a/.azuredevops/components/hipSOLVER.yml +++ b/.azuredevops/components/hipSOLVER.yml @@ -10,15 +10,23 @@ parameters: default: - cmake - ninja-build - - rocblas - - rocsparse - - hipsparse - - rocsolver - libsuitesparse-dev - gfortran - git - googletest - libgtest-dev +- name: rocmDependencies + type: object + default: + - clr + - hipSPARSE + - llvm-project + - rocBLAS + - rocm-cmake + - rocminfo + - ROCR-Runtime + - rocSPARSE + - rocSOLVER jobs: - job: hipSOLVER @@ -27,8 +35,6 @@ jobs: - template: /.azuredevops/variables-global.yml pool: vmImage: ${{ variables.BASE_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -39,6 +45,18 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} +# CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds # build external gtest and lapack - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: @@ -52,10 +70,10 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_PREFIX_PATH="/opt/rocm;$(Pipeline.Workspace)/deps-install" + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm;$(Pipeline.Workspace)/deps-install -DCMAKE_BUILD_TYPE=Release - -DCMAKE_CXX_COMPILER=/opt/rocm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/bin/amdclang + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang -DAMDGPU_TARGETS=gfx1030;gfx1100 -DBUILD_CLIENTS_TESTS=ON -DUSE_CUDA=OFF diff --git a/.azuredevops/components/hipSPARSE.yml b/.azuredevops/components/hipSPARSE.yml index 0ab8353b4..69e46c98a 100644 --- a/.azuredevops/components/hipSPARSE.yml +++ b/.azuredevops/components/hipSPARSE.yml @@ -13,10 +13,18 @@ parameters: - libboost-program-options-dev - googletest - libfftw3-dev - - rocsparse - git - gfortran - libgtest-dev +- name: rocmDependencies + type: object + default: + - clr + - llvm-project + - rocminfo + - rocprofiler-register + - ROCR-Runtime + - rocSPARSE jobs: - job: hipSPARSE @@ -25,8 +33,6 @@ jobs: - template: /.azuredevops/variables-global.yml pool: vmImage: ${{ variables.BASE_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -37,15 +43,25 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} +# CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/bin/amdclang + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ -DCMAKE_BUILD_TYPE=Release - -DCMAKE_PREFIX_PATH="/opt/rocm;/opt/rocm/share/rocm/cmake/" + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm;$(Agent.BuildDirectory)/rocm/share/rocm/cmake/ -DBUILD_CLIENTS_TESTS=ON -DBUILD_CLIENTS_SAMPLES=OFF - -DBUILD_CLIENTS_BENCHMARKS=OFF -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/hipTensor.yml b/.azuredevops/components/hipTensor.yml index b75c74198..7ca60781b 100644 --- a/.azuredevops/components/hipTensor.yml +++ b/.azuredevops/components/hipTensor.yml @@ -10,12 +10,17 @@ parameters: default: - cmake - ninja-build - - composablekernel-dev + - python3-pip - git - name: rocmDependencies type: object default: + - rocm-cmake - llvm-project + - ROCR-Runtime + - clr + - rocminfo + - composable_kernel jobs: - job: hipTensor @@ -23,8 +28,6 @@ jobs: - group: common - template: /.azuredevops/variables-global.yml pool: ${{ variables.MEDIUM_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -50,9 +53,8 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/bin/amdclang - -DCMAKE_PREFIX_PATH="$(Agent.BuildDirectory)/rocm/llvm" + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm;$(Agent.BuildDirectory)/rocm/llvm + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ -DROCM_PATH="$(Agent.BuildDirectory)/rocm" -DCMAKE_BUILD_TYPE=Release -DHIPTENSOR_BUILD_TESTS=ON diff --git a/.azuredevops/components/llvm-project.yml b/.azuredevops/components/llvm-project.yml index a1a06c50b..1159ab57f 100644 --- a/.azuredevops/components/llvm-project.yml +++ b/.azuredevops/components/llvm-project.yml @@ -14,6 +14,7 @@ parameters: - ninja-build - python-is-python3 - zlib1g-dev + - pkg-config - name: rocmDependencies type: object default: @@ -68,8 +69,6 @@ jobs: -DLIBCXXABI_INSTALL_STATIC_LIBRARY=OFF -DLLVM_BUILD_DOCS=OFF -DLLVM_ENABLE_SPHINX=OFF - -DSPHINX_WARNINGS_AS_ERRORS=OFF - -DSPHINX_OUTPUT_MAN=OFF -DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_ENABLE_Z3_SOLVER=OFF -DLLVM_ENABLE_ZLIB=ON @@ -80,7 +79,6 @@ jobs: -DPACKAGE_VENDOR=AMD -DCLANG_LINK_FLANG_LEGACY=ON -DCMAKE_CXX_STANDARD=17 - -DFLANG_INCLUDE_DOCS=OFF -DROCM_LLVM_BACKWARD_COMPAT_LINK=$(Build.BinariesDirectory)/llvm -DROCM_LLVM_BACKWARD_COMPAT_LINK_TARGET=./lib/llvm -GNinja diff --git a/.azuredevops/components/rccl.yml b/.azuredevops/components/rccl.yml index fe47b32ff..5b97477a1 100644 --- a/.azuredevops/components/rccl.yml +++ b/.azuredevops/components/rccl.yml @@ -8,21 +8,37 @@ parameters: - name: aptPackages type: object default: + - python3-pip - cmake - libboost-program-options-dev - googletest - libfftw3-dev - git - ninja-build + - libstdc++-12-dev +- name: rocmDependencies + type: object + default: + - rocm-cmake + - llvm-project + - ROCR-Runtime + - clr + - rocminfo + - rocm-smi-lib + - rocprofiler-register + - rocm-core + - HIPIFY + - aomp + - aomp-extras jobs: - job: rccl variables: - group: common - template: /.azuredevops/variables-global.yml + - name: HIP_ROCCLR_HOME + value: $(Build.BinariesDirectory)/rocm pool: ${{ variables.MEDIUM_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -33,14 +49,28 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} + # CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging + # manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/bin/hipcc + -DCMAKE_C_COMPILER=$(Agent.BuildDirectory)/rocm/bin/hipcc + -DHALF_INCLUDE_DIR=$(Agent.BuildDirectory)/rocm/include -DCMAKE_BUILD_TYPE=Release + -DROCM_PATH=$(Agent.BuildDirectory)/rocm -DBUILD_TESTS=ON - -DCMAKE_PREFIX_PATH="/opt/rocm;/opt/rocm/share/rocm/cmake/" + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm;$(Agent.BuildDirectory)/rocm/share/rocm/cmake/ -DAMDGPU_TARGETS=gfx1030;gfx1100 -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/rdc.yml b/.azuredevops/components/rdc.yml index 5bf4352ea..68958c8a3 100644 --- a/.azuredevops/components/rdc.yml +++ b/.azuredevops/components/rdc.yml @@ -8,6 +8,7 @@ parameters: - name: aptPackages type: object default: + - python3-pip - cmake - ninja-build - git @@ -17,6 +18,15 @@ parameters: - autoconf - libtool - pkg-config +- name: rocmDependencies + type: object + default: + - rocm-cmake + - llvm-project + - ROCR-Runtime + - clr + - rocminfo + - rocm-smi-lib jobs: - job: rdc @@ -24,8 +34,6 @@ jobs: - group: common - template: /.azuredevops/variables-global.yml pool: ${{ variables.MEDIUM_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -36,6 +44,18 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} + # CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging + # manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds # Build grpc - task: Bash@3 displayName: 'git clone grpc' @@ -57,6 +77,7 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DGRPC_ROOT="$(Build.SourcesDirectory)/bin" -DBUILD_TESTS=ON - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/rocALUTION.yml b/.azuredevops/components/rocALUTION.yml index 295464201..53a3e7631 100644 --- a/.azuredevops/components/rocALUTION.yml +++ b/.azuredevops/components/rocALUTION.yml @@ -15,16 +15,29 @@ parameters: - git - mpich - ninja-build +- name: rocmDependencies + type: object + default: + - aomp + - clr + - llvm-project + - rocBLAS + - rocminfo + - rocPRIM + - rocprofiler-register + - ROCR-Runtime + - rocRAND + - rocSPARSE jobs: - job: rocALUTION variables: - group: common - template: /.azuredevops/variables-global.yml + - name: HIP_ROCCLR_HOME + value: $(Build.BinariesDirectory)/rocm pool: vmImage: ${{ variables.BASE_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -35,13 +48,25 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} +# CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ -DCMAKE_BUILD_TYPE=Release - -DCMAKE_PREFIX_PATH="/opt/rocm;/opt/rocm/share/rocm/cmake/" + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm;$(Agent.BuildDirectory)/rocm/share/rocm/cmake/ + -DCMAKE_MODULE_PATH=$(Agent.BuildDirectory)/rocm;$(Agent.BuildDirectory)/rocm/lib/cmake/hip -DAMDGPU_TARGETS=gfx1030;gfx1100 -DBUILD_CLIENTS_TESTS=ON -DBUILD_CLIENTS_BENCHMARKS=OFF diff --git a/.azuredevops/components/rocBLAS.yml b/.azuredevops/components/rocBLAS.yml index 8a2240d48..765c3972d 100644 --- a/.azuredevops/components/rocBLAS.yml +++ b/.azuredevops/components/rocBLAS.yml @@ -18,19 +18,38 @@ parameters: - googletest - libgtest-dev - wget + - python3-pip + - libdrm-dev - name: pipModules type: object default: - joblib +- name: rocmDependencies + type: object + default: + - rocm-cmake + - llvm-project + - ROCR-Runtime + - clr + - rocminfo + - rocprofiler-register jobs: - job: rocBLAS variables: - group: common - template: /.azuredevops/variables-global.yml + - name: HIP_ROCCLR_HOME + value: $(Build.BinariesDirectory)/rocm + - name: TENSILE_ROCM_ASSEMBLER_PATH + value: $(Agent.BuildDirectory)/rocm/llvm/bin/clang + - name: CMAKE_CXX_COMPILER + value: $(Agent.BuildDirectory)/rocm/bin/hipcc + - name: TENSILE_ROCM_OFFLOAD_BUNDLER_PATH + value: $(Agent.BuildDirectory)/rocm/llvm/bin/clang-offload-bundler + - name: PATH + value: $(Agent.BuildDirectory)/rocm/llvm/bin:$(Agent.BuildDirectory)/rocm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin pool: ${{ variables.MEDIUM_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -42,23 +61,36 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} +# CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds + - script: echo $PATH - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- -DCMAKE_TOOLCHAIN_FILE=toolchain-linux.cmake - -DCMAKE_PREFIX_PATH="/opt/rocm;$(Pipeline.Workspace)/deps-install" + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm/llvm;$(Agent.BuildDirectory)/rocm;$(Pipeline.Workspace)/deps-install -DCMAKE_BUILD_TYPE=Release - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/bin/hipcc + -DCMAKE_C_COMPILER=$(Agent.BuildDirectory)/rocm/bin/hipcc -DAMDGPU_TARGETS=gfx1030;gfx1100 -DTensile_CODE_OBJECT_VERSION=default -DTensile_LOGIC=asm_full -DTensile_SEPARATE_ARCHITECTURES=ON -DTensile_LAZY_LIBRARY_LOADING=ON -DTensile_LIBRARY_FORMAT=msgpack - -DTENSILE_VENV_UPGRADE_PIP=ON -DBUILD_CLIENTS_TESTS=ON -DBUILD_CLIENTS_BENCHMARKS=OFF -DBUILD_CLIENTS_SAMPLES=OFF + -DROCM_PATH=$(Agent.BuildDirectory)/rocm -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/rocDecode.yml b/.azuredevops/components/rocDecode.yml index 2e067d6db..a4d7f67f0 100644 --- a/.azuredevops/components/rocDecode.yml +++ b/.azuredevops/components/rocDecode.yml @@ -8,6 +8,7 @@ parameters: - name: aptPackages type: object default: + - python3-pip - cmake - ninja-build - pkg-config @@ -18,6 +19,16 @@ parameters: - libstdc++-12-dev - libva-dev - mesa-amdgpu-va-drivers + - libdrm-dev +- name: rocmDependencies + type: object + default: + - rocm-cmake + - llvm-project + - ROCR-Runtime + - clr + - rocminfo + - rocm-core jobs: - job: rocDecode @@ -26,11 +37,21 @@ jobs: - template: /.azuredevops/variables-global.yml pool: vmImage: ${{ variables.BASE_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: + # Since mesa-amdgpu-multimedia-devel is not directly available from apt, register it + - task: Bash@3 + displayName: 'Register ROCm packages' + inputs: + targetType: inline + script: | + sudo mkdir --parents --mode=0755 /etc/apt/keyrings + wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null + echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/${{ variables.KEYRING_VERSION }}/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/amdgpu.list + echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/${{ variables.KEYRING_VERSION }} jammy main" | sudo tee --append /etc/apt/sources.list.d/rocm.list + echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600 + sudo apt update - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-other.yml parameters: aptPackages: ${{ parameters.aptPackages }} @@ -38,10 +59,24 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} + # CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging + # manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ + -DROCM_PATH=$(Agent.BuildDirectory)/rocm + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DCMAKE_BUILD_TYPE=Release - -L -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/rocPRIM.yml b/.azuredevops/components/rocPRIM.yml index 6c12ab9fd..8dab1b870 100644 --- a/.azuredevops/components/rocPRIM.yml +++ b/.azuredevops/components/rocPRIM.yml @@ -12,6 +12,14 @@ parameters: - ninja-build - libgtest-dev - git +- name: rocmDependencies + type: object + default: + - rocm-cmake + - llvm-project + - ROCR-Runtime + - clr + - rocminfo jobs: - job: rocPRIM @@ -19,8 +27,6 @@ jobs: - group: common - template: /.azuredevops/variables-global.yml pool: ${{ variables.MEDIUM_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -34,12 +40,24 @@ jobs: # ${{ }} are resolved during compile-time # so this next step is skipped completely until # we define explicit aptPackages needed to install + # CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging + # manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DBUILD_BENCHMARK=ON -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang -DAMDGPU_TARGETS=gfx1030;gfx1100 -DBUILD_TEST=ON -GNinja diff --git a/.azuredevops/components/rocSOLVER.yml b/.azuredevops/components/rocSOLVER.yml index df47cb70b..ca9a00c90 100644 --- a/.azuredevops/components/rocSOLVER.yml +++ b/.azuredevops/components/rocSOLVER.yml @@ -10,15 +10,24 @@ parameters: default: - cmake - ninja-build - - rocblas - - rocsparse - - hipsparse - libsuitesparse-dev - gfortran - libfmt-dev - git - googletest - libgtest-dev + - python3-pip +- name: rocmDependencies + type: object + default: + - rocm-cmake + - llvm-project + - ROCR-Runtime + - clr + - rocminfo + - rocBLAS + - rocSPARSE + - hipSPARSE jobs: - job: rocSOLVER @@ -26,8 +35,6 @@ jobs: - group: common - template: /.azuredevops/variables-global.yml pool: ${{ variables.MEDIUM_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -44,6 +51,18 @@ jobs: targetType: inline script: git clone --depth 1 --branch v3.9.1 https://github.com/Reference-LAPACK/lapack workingDirectory: '$(Build.SourcesDirectory)' +# CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: componentName: lapack @@ -59,11 +78,10 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_PREFIX_PATH="/opt/rocm;$(Pipeline.Workspace)/deps-install" - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm;$(Pipeline.Workspace)/deps-install + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang -DAMDGPU_TARGETS=gfx1030;gfx1100 - -DUSE_CUDA=OFF -DBUILD_CLIENTS_TESTS=ON -DBUILD_CLIENTS_BENCHMARKS=OFF -DBUILD_CLIENTS_SAMPLES=OFF diff --git a/.azuredevops/components/rocSPARSE.yml b/.azuredevops/components/rocSPARSE.yml index b5907db81..e0dcc1e16 100644 --- a/.azuredevops/components/rocSPARSE.yml +++ b/.azuredevops/components/rocSPARSE.yml @@ -8,6 +8,7 @@ parameters: - name: aptPackages type: object default: + - python3-pip - cmake - ninja-build - libboost-program-options-dev @@ -15,17 +16,27 @@ parameters: - libfftw3-dev - git - gfortran - - rocprim-dev - libgtest-dev + - libdrm-dev +- name: rocmDependencies + type: object + default: + - rocm-cmake + - llvm-project + - ROCR-Runtime + - clr + - rocminfo + - rocPRIM + - rocprofiler-register jobs: - job: rocSPARSE variables: - group: common - template: /.azuredevops/variables-global.yml + - name: HIP_ROCCLR_HOME + value: $(Build.BinariesDirectory)/rocm pool: ${{ variables.MEDIUM_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -36,16 +47,30 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} + # CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging + # manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc - -DCMAKE_C_COMPILER=/opt/rocm/bin/hipcc + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/bin/hipcc + -DCMAKE_C_COMPILER=$(Agent.BuildDirectory)/rocm/bin/hipcc + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm + -DROCM_PATH=$(Agent.BuildDirectory)/rocm -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS=gfx1030;gfx1100 -DBUILD_CLIENTS_SAMPLES=OFF -DBUILD_CLIENTS_TESTS=ON -DBUILD_CLIENTS_BENCHMARKS=OFF - -DCMAKE_MODULE_PATH="/opt/rocm/lib/cmake/hip;/opt/rocm/hip/cmake" + -DCMAKE_MODULE_PATH=$(Agent.BuildDirectory)/rocm/lib/cmake/hip;$(Agent.BuildDirectory)/rocm/hip/cmake -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/rocThrust.yml b/.azuredevops/components/rocThrust.yml index 191d36f47..bed9da5de 100644 --- a/.azuredevops/components/rocThrust.yml +++ b/.azuredevops/components/rocThrust.yml @@ -10,12 +10,20 @@ parameters: default: - cmake - ninja-build - - hiprand - - rocprim-dev - libboost-program-options-dev - googletest - libfftw3-dev - git + - python3-pip +- name: rocmDependencies + type: object + default: + - clr + - hipRAND + - llvm-project + - rocminfo + - rocPRIM + - ROCR-Runtime jobs: - job: rocThrust @@ -23,8 +31,6 @@ jobs: - group: common - template: /.azuredevops/variables-global.yml pool: ${{ variables.MEDIUM_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -35,14 +41,25 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} +# CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- -GNinja - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang - -DROCM_PATH=/opt/rocm - -DCMAKE_PREFIX_PATH=/opt/rocm + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ + -DROCM_PATH=$(Agent.BuildDirectory)/rocm + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DAMDGPU_TARGETS=gfx1030;gfx1100 -DBUILD_TEST=ON - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/rocWMMA.yml b/.azuredevops/components/rocWMMA.yml index 5dd847636..e1179419e 100644 --- a/.azuredevops/components/rocWMMA.yml +++ b/.azuredevops/components/rocWMMA.yml @@ -8,6 +8,7 @@ parameters: - name: aptPackages type: object default: + - python3-pip - cmake - ninja-build - libboost-program-options-dev @@ -15,7 +16,18 @@ parameters: - googletest - libfftw3-dev - git - - rocblas + - libomp-dev +- name: rocmDependencies + type: object + default: + - rocm-cmake + - llvm-project + - ROCR-Runtime + - clr + - rocminfo + - rocBLAS + - aomp + - rocm-smi-lib jobs: - job: rocWMMA @@ -23,8 +35,6 @@ jobs: - group: common - template: /.azuredevops/variables-global.yml pool: ${{ variables.MEDIUM_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -35,11 +45,23 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} + # CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging + # manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/bin/amdclang + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ -DCMAKE_BUILD_TYPE=Release -DROCWMMA_BUILD_TESTS=ON -DROCWMMA_BUILD_SAMPLES=OFF diff --git a/.azuredevops/components/rocr_debug_agent.yml b/.azuredevops/components/rocr_debug_agent.yml index c614b662b..ee4429284 100644 --- a/.azuredevops/components/rocr_debug_agent.yml +++ b/.azuredevops/components/rocr_debug_agent.yml @@ -12,6 +12,14 @@ parameters: - ninja-build - libelf-dev - libdw-dev +- name: rocmDependencies + type: object + default: + - clr + - llvm-project + - ROCdbgapi + - rocminfo + - ROCR-Runtime jobs: - job: rocr_debug_agent @@ -20,8 +28,6 @@ jobs: - template: /.azuredevops/variables-global.yml pool: vmImage: ${{ variables.BASE_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -32,11 +38,23 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} +# CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- -DCMAKE_BUILD_TYPE=Release - -DROCM_PATH=/opt/rocm - -DCMAKE_MODULE_PATH=/opt/rocm/lib/cmake + -DCMAKE_MODULE_PATH=$(Agent.BuildDirectory)/rocm/lib/cmake;$(Agent.BuildDirectory)/rocm/lib/cmake/hip + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/roctracer.yml b/.azuredevops/components/roctracer.yml index 3ed00199d..d66f10034 100644 --- a/.azuredevops/components/roctracer.yml +++ b/.azuredevops/components/roctracer.yml @@ -67,10 +67,4 @@ jobs: -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DGPU_TARGETS=gfx1030;gfx1100 -GNinja -# - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml -# - task: Bash@3 -# displayName: 'Tests' -# inputs: -# targetType: inline -# script: ./run.sh -# workingDirectory: build + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/rpp.yml b/.azuredevops/components/rpp.yml index b998f84a8..a86bcc9dd 100644 --- a/.azuredevops/components/rpp.yml +++ b/.azuredevops/components/rpp.yml @@ -9,10 +9,18 @@ parameters: type: object default: - cmake + - libomp-dev # needed to pass flag step - ninja-build - clang +- name: rocmDependencies + type: object + default: + - aomp # needed to pass build step + - clr - half - - libomp-dev + - llvm-project + - rocminfo + - ROCR-Runtime jobs: - job: rpp @@ -21,8 +29,6 @@ jobs: - template: /.azuredevops/variables-global.yml pool: vmImage: ${{ variables.BASE_BUILD_POOL }} - container: - image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: clean: all steps: @@ -33,13 +39,27 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: checkoutRepo: ${{ parameters.checkoutRepo }} +# CI case: download latest default branch build + - ${{ if eq(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: staging +# manual build case: triggered by ROCm/ROCm repo + - ${{ if ne(parameters.checkoutRef, '') }}: + - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml + parameters: + dependencyList: ${{ parameters.rocmDependencies }} + dependencySource: tag-builds - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang + -DROCM_PATH=$(Agent.BuildDirectory)/rocm + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm + -DHALF_INCLUDE_DIRS=$(Agent.BuildDirectory)/rocm/include -DCMAKE_BUILD_TYPE=Release - -DBUILD_CLIENTS=ON -DAMDGPU_TARGETS=gfx1030;gfx1100 -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/tag-builds/rocgdb.yml b/.azuredevops/tag-builds/ROCgdb.yml similarity index 89% rename from .azuredevops/tag-builds/rocgdb.yml rename to .azuredevops/tag-builds/ROCgdb.yml index 3b2569dd3..970e40023 100644 --- a/.azuredevops/tag-builds/rocgdb.yml +++ b/.azuredevops/tag-builds/ROCgdb.yml @@ -23,7 +23,7 @@ trigger: none pr: none jobs: - - template: ${{ variables.CI_COMPONENT_PATH }}/rocgdb.yml + - template: ${{ variables.CI_COMPONENT_PATH }}/ROCgdb.yml parameters: checkoutRepo: release_repo checkoutRef: ${{ parameters.checkoutRef }} diff --git a/.azuredevops/templates/steps/artifact-download.yml b/.azuredevops/templates/steps/artifact-download.yml index 90b67eae7..a1cd9aef2 100644 --- a/.azuredevops/templates/steps/artifact-download.yml +++ b/.azuredevops/templates/steps/artifact-download.yml @@ -25,8 +25,11 @@ parameters: llvm-project: amd-staging MIOpen: develop rocBLAS: develop + ROCdbgapi : amd-master + rocDecode: develop rocFFT: develop rocm-cmake: develop + rocm_smi_lib: develop rocminfo: master rocMLIR: develop rocPRIM: develop @@ -36,6 +39,7 @@ parameters: rocSOLVER: develop rocSPARSE: develop ROCT-Thunk-Interface: master + roctracer: amd-master rpp: master - name: componentsFailureOkay type: object diff --git a/.azuredevops/templates/steps/dependencies-rocm.yml b/.azuredevops/templates/steps/dependencies-rocm.yml index 4d39e2838..f4337b75c 100644 --- a/.azuredevops/templates/steps/dependencies-rocm.yml +++ b/.azuredevops/templates/steps/dependencies-rocm.yml @@ -30,15 +30,21 @@ parameters: composable_kernel: $(composable-kernel-pipeline-id) half: $(half-pipeline-id) hipBLAS: $(hipblas-pipeline-id) + HIPIFY: $(hipify-pipeline-id) hipRAND: $(hiprand-pipeline-id) hipSPARSE: $(hipsparse-pipeline-id) llvm-project: $(llvm-project-pipeline-id) MIOpen: $(miopen-pipeline-id) rocBLAS: $(rocblas-pipeline-id) - rocFFT: $(rotfft-pipeline-id) + ROCdbgapi : $(rocdbgapi-pipeline-id) + rocDecode: $(rocdecode-pipeline-id) + rocFFT: $(rocfft-pipeline-id) rocm-cmake: $(rocm-cmake-pipeline-id) + rocm-core: $(rocm-core-pipeline-id) + rocm_smi_lib: $(rocm-smi-lib-pipeline-id) rocminfo: $(rocminfo-pipeline-id) rocMLIR: $(rocmlir-pipeline-id) + rocm-smi-lib: $(rocm-smi-lib-pipeline-id) rocPRIM: $(rocprim-pipeline-id) rocprofiler-register: $(rocprofiler-register-pipeline-id) ROCR-Runtime: $(rocr-runtime-pipeline-id) @@ -46,6 +52,7 @@ parameters: rocSOLVER: $(rocsolver-pipeline-id) rocSPARSE: $(rocsparse-pipeline-id) ROCT-Thunk-Interface: $(roct-thunk-interface-pipeline-id) + roctracer: $(roctracer-pipeline-id) rpp: $(rpp-pipeline-id) - name: taggedPipelineIdentifiers type: object @@ -57,15 +64,21 @@ parameters: composable_kernel: $(composable-kernel-tagged-pipeline-id) half: $(half-tagged-pipeline-id) hipBLAS: $(hipblas-tagged-pipeline-id) + HIPIFY: $(hipify-tagged-pipeline-id) hipRAND: $(hiprand-tagged-pipeline-id) hipSPARSE: $(hipsparse-tagged-pipeline-id) llvm-project: $(llvm-project-tagged-pipeline-id) MIOpen: $(miopen-tagged-pipeline-id) rocBLAS: $(rocblas-tagged-pipeline-id) - rocFFT: $(rotfft-tagged-pipeline-id) + ROCdbgapi : $(rocdbgapi-tagged-pipeline-id) + rocDecode: $(rocdecode-tagged-pipeline-id) + rocFFT: $(rocfft-tagged-pipeline-id) rocm-cmake: $(rocm-cmake-tagged-pipeline-id) + rocm-core: $(rocm-core-tagged-pipeline-id) + rocm_smi_lib: $(rocm-smi-lib-tagged-pipeline-id) rocminfo: $(rocminfo-tagged-pipeline-id) rocMLIR: $(rocmlir-tagged-pipeline-id) + rocm-smi-lib: $(rocm-smi-lib-tagged-pipeline-id) rocPRIM: $(rocprim-tagged-pipeline-id) rocprofiler-register: $(rocprofiler-register-tagged-pipeline-id) ROCR-Runtime: $(rocr-runtime-tagged-pipeline-id) @@ -73,6 +86,7 @@ parameters: rocSOLVER: $(rocsolver-tagged-pipeline-id) rocSPARSE: $(rocsparse-tagged-pipeline-id) ROCT-Thunk-Interface: $(roct-thunk-interface-tagged-pipeline-id) + roctracer: $(roctracer-tagged-pipeline-id) rpp: $(rpp-tagged-pipeline-id) # set to true if you're calling this template file multiple files in same pipeline # only leave last call false to optimize sequence diff --git a/.azuredevops/variables-global.yml b/.azuredevops/variables-global.yml index 421b52f3d..d74ed2960 100644 --- a/.azuredevops/variables-global.yml +++ b/.azuredevops/variables-global.yml @@ -27,3 +27,5 @@ variables: value: rocm/dev-ubuntu-22.04 - name: LATEST_DOCKER_VERSION value: 6.1 +- name: KEYRING_VERSION + value: 6.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c2e0a716..67d62dd85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,10 +70,33 @@ HIPCC for ROCm 6.1.1 ROCm SMI for ROCm 6.1.1 +##### Additions + +* Added the capability to unlock mutex when a process is dead. Added related debug output. +* Added the `Partition ID` field to the `rocm-smi` CLI. +* Added `NODE`, `GUID`, and `GFX Version` fields to the CLI. +* Documentation now includes C++ and Python tutorials, API guides, and reference material. + +##### Changes + +* Some `rocm-smi` fields now display `N/A` instead of `unknown/unsupported` for consistency. +* Changed stacked ID formatting in the `rocm-smi` CLI to make it easier to spot identifiers. + +##### Fixes + +* Fixed HIP and ROCm SMI mismatch on GPU bus assignments. +* Fixed memory leaks caused by not closing directories and creating maps nodes instead of using `.at()`. +* Fixed initializing calls which reuse `rocmsmi.initializeRsmi()` bindings in the `rocmsmi` Python API. +* Fixed an issue causing `rsmi_dev_activity_metric_get` gfx/memory to not update with GPU activity. + ##### Known issues * ROCm SMI reports GPU utilization incorrectly for RDNA3 GPUs in some situations. See the issue on [GitHub](https://github.com/ROCm/ROCm/issues/3112). +```{note} +See the [detailed ROCm SMI changelog](https://github.com/ROCm/rocm_smi_lib/blob/docs/6.1.1/CHANGELOG.md) with code samples for more information. +``` + ### Library changes in ROCm 6.1.1 | Library | Version | diff --git a/RELEASE.md b/RELEASE.md index 3a0b1b31e..451955ee0 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -62,10 +62,33 @@ HIPCC for ROCm 6.1.1 ROCm SMI for ROCm 6.1.1 +### Additions + +* Added the capability to unlock mutex when a process is dead. Added related debug output. +* Added the `Partition ID` field to the `rocm-smi` CLI. +* Added `NODE`, `GUID`, and `GFX Version` fields to the CLI. +* Documentation now includes C++ and Python tutorials, API guides, and reference material. + +### Changes + +* Some `rocm-smi` fields now display `N/A` instead of `unknown/unsupported` for consistency. +* Changed stacked ID formatting in the `rocm-smi` CLI to make it easier to spot identifiers. + +### Fixes + +* Fixed HIP and ROCm SMI mismatch on GPU bus assignments. +* Fixed memory leaks caused by not closing directories and creating maps nodes instead of using `.at()`. +* Fixed initializing calls which reuse `rocmsmi.initializeRsmi()` bindings in the `rocmsmi` Python API. +* Fixed an issue causing `rsmi_dev_activity_metric_get` gfx/memory to not update with GPU activity. + ### Known issues - ROCm SMI reports GPU utilization incorrectly for RDNA3 GPUs in some situations. See the issue on [GitHub](https://github.com/ROCm/ROCm/issues/3112). +```{note} +See the [detailed ROCm SMI changelog](https://github.com/ROCm/rocm_smi_lib/blob/docs/6.1.1/CHANGELOG.md) with code samples for more information. +``` + ## Library changes in ROCm 6.1.1 | Library | Version | @@ -97,11 +120,11 @@ ROCm SMI for ROCm 6.1.1 | rpp | [1.5.0](https://github.com/ROCm/rpp/releases/tag/rocm-6.1.1) | | Tensile | [4.40.0](https://github.com/ROCm/Tensile/releases/tag/rocm-6.1.1) | -#### hipBLASLt 0.7.0 +### hipBLASLt 0.7.0 hipBLASLt 0.7.0 for ROCm 6.1.1 -##### Additions +#### Additions - Added `hipblasltExtSoftmax` extension API. - Added `hipblasltExtLayerNorm` extension API. @@ -109,7 +132,7 @@ hipBLASLt 0.7.0 for ROCm 6.1.1 - Added `GemmTuning` extension parameter to set split-k by user. - Added support for mixed precision datatype: fp16/fp8 in with fp16 outk. -##### Deprecations +#### Deprecations - **Upcoming**: `algoGetHeuristic()` ext API for GroupGemm will be deprecated in a future release of hipBLASLt. diff --git a/docs/conceptual/setting-cus.rst b/docs/conceptual/setting-cus.rst new file mode 100644 index 000000000..91fa7cc89 --- /dev/null +++ b/docs/conceptual/setting-cus.rst @@ -0,0 +1,47 @@ +.. meta:: + :description: Setting the number of CUs + :keywords: AMD, ROCm, cu, number of cus + +.. _env-variables-reference: + +************************************************************* +Setting the number of CUs +************************************************************* + +When using GPUs to accelerate compute workloads, it sometimes becomes necessary +to configure the hardware's usage of Compute Units (CU). This is a more advanced +option, so please read this page before experimentation. + +The GPU driver provides two environment variables to set the number of CUs used. The +first one is ``HSA_CU_MASK`` and the second one is ``ROC_GLOBAL_CU_MASK``. The main +difference is that ``ROC_GLOBAL_CU_MASK`` sets the CU mask on queues created by the HIP +or the OpenCL runtimes. While ``HSA_CU_MASK`` sets the mask on a lower level of queue +creation in the driver, this mask will also be set for queues being profiled. + +The environment variables have the following syntax: + +:: + + ID = [0-9][0-9]* ex. base 10 numbers + ID_list = (ID | ID-ID)[, (ID | ID-ID)]* ex. 0,2-4,7 + GPU_list = ID_list ex. 0,2-4,7 + CU_list = 0x[0-F]* | ID_list ex. 0x337F OR 0,2-4,7 + CU_Set = GPU_list : CU_list ex. 0,2-4,7:0-15,32-47 OR 0,2-4,7:0x337F + HSA_CU_MASK = CU_Set [; CU_Set]* ex. 0,2-4,7:0-15,32-47; 3-9:0x337F + +The GPU indices are taken post ``ROCR_VISIBLE_DEVICES`` reordering. For GPUs listed, +the listed or masked CUs will be enabled, the rest disabled. Unlisted GPUs will not +be affected, their CUs will all be enabled. + +The parsing of the variable is stopped when a syntax error occurs. The erroneous set +and the ones following will be ignored. Repeating GPU or CU IDs are a syntax error. +Specifying a mask with no usable CUs (CU_list is 0x0) is a syntax error. For excluding +GPU devices use ``ROCR_VISIBLE_DEVICES``. + +These environment variables only affect ROCm software, not graphics applications. + +It's important to know that not all CU configurations are valid on all devices. For +instance, on devices where two CUs can be combined into a WGP (for kernels running in +WGP mode), it is not valid to disable only a single CU in a WGP. `This paper +`_ can provide more information +about what to expect, when disabling CUs. diff --git a/docs/data/how-to/framework_install_2024_05_23.png b/docs/data/how-to/framework_install_2024_05_23.png new file mode 100644 index 000000000..363f30c07 Binary files /dev/null and b/docs/data/how-to/framework_install_2024_05_23.png differ diff --git a/docs/how-to/deep-learning-rocm.md b/docs/how-to/deep-learning-rocm.md deleted file mode 100644 index 5592d8d50..000000000 --- a/docs/how-to/deep-learning-rocm.md +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - -# Deep learning guide - -The following sections cover the different framework installations for ROCm and -deep-learning applications. The following image provides -the sequential flow for the use of each framework. Refer to the ROCm Compatible -Frameworks Release Notes for each framework's most current release notes at -{doc}`Third-party support`. - -![ROCm Compatible Frameworks Flowchart](../data/how-to/magma005.png "ROCm Compatible Frameworks") - -## Frameworks installation - -* {doc}`PyTorch for ROCm` -* {doc}`TensorFlow for ROCm` -* {doc}`MAGMA for ROCm` diff --git a/docs/how-to/deep-learning-rocm.rst b/docs/how-to/deep-learning-rocm.rst new file mode 100644 index 000000000..5493be62e --- /dev/null +++ b/docs/how-to/deep-learning-rocm.rst @@ -0,0 +1,69 @@ +.. meta:: + :description: How to install deep learning frameworks for ROCm + :keywords: deep learning, frameworks, ROCm, install, PyTorch, TensorFlow, JAX, MAGMA, DeepSpeed, ML, AI + +******************************************** +Installing deep learning frameworks for ROCm +******************************************** + +ROCm provides a comprehensive ecosystem for deep learning development, including +:ref:`libraries ` for optimized deep learning operations and ROCm-aware versions of popular +deep learning frameworks and libraries such as PyTorch, TensorFlow, JAX, and MAGMA. ROCm works closely with these +frameworks to ensure that framework-specific optimizations take advantage of AMD accelerator and GPU architectures. + +The following guides cover installation processes for ROCm-aware deep learning frameworks. + +.. grid:: + + .. grid-item:: + :columns: 3 + + :doc:`PyTorch for ROCm ` + + .. grid-item:: + :columns: 3 + + :doc:`TensorFlow for ROCm ` + + .. grid-item:: + :columns: 3 + + .. grid-item:: + :columns: 3 + + .. grid-item:: + :columns: 3 + + :doc:`JAX for ROCm ` + + .. grid-item:: + :columns: 3 + + :doc:`MAGMA for ROCm ` + + .. grid-item:: + :columns: 3 + + .. grid-item:: + :columns: 3 + +The following chart steps through typical installation workflows for installing deep learning frameworks for ROCm. + +.. image:: ../data/how-to/framework_install_2024_05_23.png + :alt: Flowchart for installing ROCm-aware machine learning frameworks + :align: center + +Find information on version compatibility and framework release notes in :doc:`Third-party support matrix +`. + +.. Learn how to take advantage of your ROCm-aware deep learning environment using the following tutorials. +.. +.. * :doc:`How to use ROCm for AI ` +.. +.. * :doc:`How to fine-tune LLMs with ROCm ` +.. + +.. note:: + + For guidance on installing ROCm itself, refer to :doc:`ROCm installation for Linux `. + diff --git a/docs/how-to/tuning-guides.md b/docs/how-to/tuning-guides.md index 18341db10..a1fbcc5cb 100644 --- a/docs/how-to/tuning-guides.md +++ b/docs/how-to/tuning-guides.md @@ -1,13 +1,14 @@ - + -# Tuning guides +# System optimization -Use case-specific system setup and tuning guides. +This guide outlines system setup and tuning suggestions for AMD hardware to optimize performance for specific types of +workloads or use-cases. ## High-performance computing diff --git a/docs/index.md b/docs/index.md index 7eada8714..05e31e4de 100644 --- a/docs/index.md +++ b/docs/index.md @@ -37,12 +37,13 @@ Our documentation is organized into the following categories: * Windows * {doc}`Windows install guide` * {doc}`Application deployment guidelines` -* {doc}`Install Docker containers` -* {doc}`PyTorch for ROCm` -* {doc}`TensorFlow for ROCm` -* {doc}`JAX for ROCm` -* {doc}`MAGMA for ROCm` -* {doc}`ROCm & Spack` +* [Deep learning frameworks](./how-to/deep-learning-rocm.rst) + * {doc}`Install Docker containers` + * {doc}`PyTorch for ROCm` + * {doc}`TensorFlow for ROCm` + * {doc}`JAX for ROCm` + * {doc}`MAGMA for ROCm` + * {doc}`ROCm & Spack` ::: :::{grid-item-card} @@ -94,7 +95,6 @@ Our documentation is organized into the following categories: * [MI100](./how-to/tuning-guides/mi100.md) * [MI200](./how-to/tuning-guides/mi200.md) * [RDNA2](./how-to/tuning-guides/w6000-v620.md) -* [Setting up for deep learning with ROCm](./how-to/deep-learning-rocm.md) * [GPU-enabled MPI](./how-to/gpu-enabled-mpi.rst) * [Using compiler features](./conceptual/compiler-topics.md) * [Using AddressSanitizer](./conceptual/using-gpu-sanitizer.md) @@ -115,6 +115,7 @@ Our documentation is organized into the following categories: * [MI250](./conceptual/gpu-arch/mi250.md) * [MI300](./conceptual/gpu-arch/mi300.md) * [GPU memory](./conceptual/gpu-memory.md) +* [Setting the number of CUs](./conceptual/setting-cus) * [File structure (Linux FHS)](./conceptual/file-reorg.md) * [GPU isolation techniques](./conceptual/gpu-isolation.md) * [Using CMake](./conceptual/cmake-packages.rst) diff --git a/docs/sphinx/_toc.yml.in b/docs/sphinx/_toc.yml.in index ebb46ad4e..283b3badc 100644 --- a/docs/sphinx/_toc.yml.in +++ b/docs/sphinx/_toc.yml.in @@ -22,6 +22,8 @@ subtrees: title: ROCm on Linux - url: https://rocm.docs.amd.com/projects/install-on-windows/en/${branch}/ title: HIP SDK on Windows + - file: how-to/deep-learning-rocm.md + title: Deep learning frameworks - caption: Compatibility entries: @@ -48,7 +50,7 @@ subtrees: - caption: How to entries: - file: how-to/tuning-guides.md - title: Tuning guides + title: System optimization subtrees: - entries: - file: how-to/tuning-guides/mi100.md @@ -57,8 +59,6 @@ subtrees: title: MI200 - file: how-to/tuning-guides/w6000-v620.md title: RDNA2 - - file: how-to/deep-learning-rocm.md - title: Deep learning - file: how-to/gpu-enabled-mpi.rst title: Using MPI - file: conceptual/compiler-topics.md @@ -110,6 +110,8 @@ subtrees: title: White paper - file: conceptual/gpu-memory.md title: GPU memory + - file: conceptual/setting-cus + title: Setting the number of CUs - file: conceptual/file-reorg.md title: File structure (Linux FHS) - file: conceptual/gpu-isolation.md diff --git a/tools/autotag/templates/rocm_changes/6.1.1.md b/tools/autotag/templates/rocm_changes/6.1.1.md index e2548a2c4..77b7ac846 100644 --- a/tools/autotag/templates/rocm_changes/6.1.1.md +++ b/tools/autotag/templates/rocm_changes/6.1.1.md @@ -52,6 +52,29 @@ HIPCC for ROCm 6.1.1 ROCm SMI for ROCm 6.1.1 +#### Additions + +* Added the capability to unlock mutex when a process is dead. Added related debug output. +* Added the `Partition ID` field to the `rocm-smi` CLI. +* Added `NODE`, `GUID`, and `GFX Version` fields to the CLI. +* Documentation now includes C++ and Python tutorials, API guides, and reference material. + +#### Changes + +* Some `rocm-smi` fields now display `N/A` instead of `unknown/unsupported` for consistency. +* Changed stacked ID formatting in the `rocm-smi` CLI to make it easier to spot identifiers. + +#### Fixes + +* Fixed HIP and ROCm SMI mismatch on GPU bus assignments. +* Fixed memory leaks caused by not closing directories and creating maps nodes instead of using `.at()`. +* Fixed initializing calls which reuse `rocmsmi.initializeRsmi()` bindings in the `rocmsmi` Python API. +* Fixed an issue causing `rsmi_dev_activity_metric_get` gfx/memory to not update with GPU activity. + #### Known issues * ROCm SMI reports GPU utilization incorrectly for RDNA3 GPUs in some situations. See the issue on [GitHub](https://github.com/ROCm/ROCm/issues/3112). + +```{note} +See the [detailed ROCm SMI changelog](https://github.com/ROCm/rocm_smi_lib/blob/docs/6.1.1/CHANGELOG.md) with code samples for more information. +```