From 7f2fabeb9d23ae51298c41a70298a0b11b83a5a9 Mon Sep 17 00:00:00 2001 From: Joseph Macaranas <145489236+amd-jmacaran@users.noreply.github.com> Date: Tue, 21 May 2024 11:05:49 -0400 Subject: [PATCH] Remove docker image dependency from some External CI (#3140) - Fixed compilers to pick amdclang. - Added ldconfig step for setting up linking of shared libraries. - Set Azure VMs to medium only. - Remove empty directories in published tarballs. --- .azuredevops/components/AMDMIGraphX.yml | 12 ++---- .azuredevops/components/HIP.yml | 16 ++++---- .azuredevops/components/HIPIFY.yml | 4 +- .azuredevops/components/MIOpen.yml | 4 +- .azuredevops/components/ROCR-Runtime.yml | 6 +-- .azuredevops/components/composable_kernel.yml | 2 +- .azuredevops/components/hipBLAS.yml | 4 +- .azuredevops/components/hipCUB.yml | 2 +- .azuredevops/components/hipRAND.yml | 17 ++++---- .azuredevops/components/hipSPARSELt.yml | 2 +- .azuredevops/components/hipTensor.yml | 2 +- .azuredevops/components/hipfort.yml | 2 +- .azuredevops/components/llvm-project.yml | 6 +-- .azuredevops/components/rccl.yml | 6 +-- .azuredevops/components/rdc.yml | 2 +- .azuredevops/components/rocALUTION.yml | 4 +- .azuredevops/components/rocBLAS.yml | 6 +-- .azuredevops/components/rocFFT.yml | 6 +-- .azuredevops/components/rocMLIR.yml | 4 +- .azuredevops/components/rocPRIM.yml | 6 +-- .azuredevops/components/rocRAND.yml | 31 ++++++++++++--- .azuredevops/components/rocSOLVER.yml | 4 +- .azuredevops/components/rocSPARSE.yml | 2 +- .azuredevops/components/rocThrust.yml | 4 +- .azuredevops/components/rocWMMA.yml | 2 +- .azuredevops/components/rocminfo.yml | 6 +-- .azuredevops/components/rocprofiler.yml | 2 +- .azuredevops/components/roctracer.yml | 24 +++++++++--- .azuredevops/components/rpp.yml | 4 +- .azuredevops/tag-builds/clr.yml | 39 +++++++++++++++++++ .../templates/steps/artifact-download.yml | 12 +++--- .azuredevops/templates/steps/build-cmake.yml | 2 +- .../templates/steps/dependencies-rocm.yml | 26 +++++++++++++ 33 files changed, 178 insertions(+), 93 deletions(-) create mode 100644 .azuredevops/tag-builds/clr.yml diff --git a/.azuredevops/components/AMDMIGraphX.yml b/.azuredevops/components/AMDMIGraphX.yml index 04b941122c..b88de64bb9 100644 --- a/.azuredevops/components/AMDMIGraphX.yml +++ b/.azuredevops/components/AMDMIGraphX.yml @@ -77,19 +77,15 @@ jobs: parameters: dependencyList: ${{ parameters.rocmDependencies }} dependencySource: tag-builds - - script: 'ls -1R /opt/rocm' - displayName: 'Artifact listing' - - script: 'ls -1R $(Agent.BuildDirectory)/rocm' - displayName: 'Artifact listing' - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang + -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS=gfx1030;gfx1100 - -DCMAKE_PREFIX_PATH="$(Agent.BuildDirectory)/rocm;/opt/rocm/llvm;opt/rocm" - -DHALF_INCLUDE_DIR="$(Agent.BuildDirectory)/rocm/include" + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm;/opt/rocm/llvm;opt/rocm + -DHALF_INCLUDE_DIR=$(Agent.BuildDirectory)/rocm/include -DMIGRAPHX_USE_COMPOSABLEKERNEL=OFF -DBUILD_TESTING=ON -GNinja diff --git a/.azuredevops/components/HIP.yml b/.azuredevops/components/HIP.yml index 7ab0ba6e20..6c3929773e 100644 --- a/.azuredevops/components/HIP.yml +++ b/.azuredevops/components/HIP.yml @@ -67,19 +67,17 @@ jobs: parameters: dependencyList: ${{ parameters.rocmDependenciesAMD }} dependencySource: tag-builds - - script: 'ls -1R $(Agent.BuildDirectory)/rocm' - displayName: 'Artifact listing' # compile clr - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: componentName: clr cmakeBuildDir: 'clr/build' extraBuildFlags: >- - -DHIP_COMMON_DIR="$(Build.SourcesDirectory)/HIP" + -DHIP_COMMON_DIR=$(Build.SourcesDirectory)/HIP -DHIP_PLATFORM=amd - -DCMAKE_PREFIX_PATH="$(Agent.BuildDirectory)/rocm" - -DROCM_PATH="$(Agent.BuildDirectory)/rocm" - -DHIPCC_BIN_DIR="$(Agent.BuildDirectory)/rocm/bin" + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm + -DROCM_PATH=$(Agent.BuildDirectory)/rocm + -DHIPCC_BIN_DIR=$(Agent.BuildDirectory)/rocm/bin -DCLR_BUILD_HIP=ON -DCLR_BUILD_OCL=ON - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml @@ -132,12 +130,12 @@ jobs: componentName: clr cmakeBuildDir: 'clr/build' extraBuildFlags: >- - -DHIP_COMMON_DIR="$(Build.SourcesDirectory)/HIP" + -DHIP_COMMON_DIR=$(Build.SourcesDirectory)/HIP -DHIP_PLATFORM=nvidia - -DHIPCC_BIN_DIR="$(Agent.BuildDirectory)/rocm/bin" + -DHIPCC_BIN_DIR=$(Agent.BuildDirectory)/rocm/bin -DCLR_BUILD_HIP=ON -DCLR_BUILD_OCL=OFF - -DHIPNV_DIR="$(Build.SourcesDirectory)/hipother/hipnv" + -DHIPNV_DIR=$(Build.SourcesDirectory)/hipother/hipnv - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml parameters: artifactName: nvidia diff --git a/.azuredevops/components/HIPIFY.yml b/.azuredevops/components/HIPIFY.yml index c1cd29e7ac..695f79df51 100644 --- a/.azuredevops/components/HIPIFY.yml +++ b/.azuredevops/components/HIPIFY.yml @@ -49,7 +49,7 @@ jobs: parameters: extraBuildFlags: >- -DCMAKE_BUILD_TYPE=Release - -DCMAKE_PREFIX_PATH="$(Agent.BuildDirectory)/rocm/llvm" - -DROCM_PATH="$(Agent.BuildDirectory)/rocm" + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm/llvm + -DROCM_PATH=$(Agent.BuildDirectory)/rocm -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/MIOpen.yml b/.azuredevops/components/MIOpen.yml index 4418587e35..0e6c18dbdf 100644 --- a/.azuredevops/components/MIOpen.yml +++ b/.azuredevops/components/MIOpen.yml @@ -70,8 +70,8 @@ jobs: parameters: extraBuildFlags: >- -DMIOPEN_BACKEND=HIP - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang + -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang -DCMAKE_PREFIX_PATH="$(Agent.BuildDirectory)/rocm" -DMIOPEN_ENABLE_AI_KERNEL_TUNING=OFF -DMIOPEN_ENABLE_AI_IMMED_MODE_FALLBACK=OFF diff --git a/.azuredevops/components/ROCR-Runtime.yml b/.azuredevops/components/ROCR-Runtime.yml index e524fc4a3e..eb9bd4ac4f 100644 --- a/.azuredevops/components/ROCR-Runtime.yml +++ b/.azuredevops/components/ROCR-Runtime.yml @@ -48,13 +48,9 @@ jobs: parameters: dependencyList: ${{ parameters.rocmDependencies }} dependencySource: tag-builds - - script: 'ls -1R $(Agent.BuildDirectory)/rocm' - displayName: 'Artifact listing' - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_PREFIX_PATH="$(Agent.BuildDirectory)/rocm" - "-DCMAKE_EXE_LINKER_FLAGS_INIT=-Wl,--enable-new-dtags,--build-id=sha1,--rpath,$ORIGIN" - "-DCMAKE_SHARED_LINKER_FLAGS_INIT=-Wl,--enable-new-dtags,--build-id=sha1,--rpath,$ORIGIN/../lib" + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm cmakeBuildDir: 'src/build' - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/composable_kernel.yml b/.azuredevops/components/composable_kernel.yml index cd1302e489..88e703c0b4 100644 --- a/.azuredevops/components/composable_kernel.yml +++ b/.azuredevops/components/composable_kernel.yml @@ -17,7 +17,7 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml - pool: ${{ variables.ULTRA_BUILD_POOL }} + pool: ${{ variables.MEDIUM_BUILD_POOL }} container: image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: diff --git a/.azuredevops/components/hipBLAS.yml b/.azuredevops/components/hipBLAS.yml index 57a0ad2488..d6bbd9dbea 100644 --- a/.azuredevops/components/hipBLAS.yml +++ b/.azuredevops/components/hipBLAS.yml @@ -26,7 +26,7 @@ jobs: - template: /.azuredevops/variables-global.yml - name: LD_LIBRARY_PATH value: '/lib:/usr/lib:/usr/local/lib' - pool: ${{ variables.LOW_BUILD_POOL }} + pool: ${{ variables.MEDIUM_BUILD_POOL }} container: image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: @@ -64,7 +64,7 @@ jobs: extraBuildFlags: >- -DCMAKE_PREFIX_PATH=/opt/rocm -DCMAKE_BUILD_TYPE=Release - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ + -DCMAKE_CXX_COMPILER=/opt/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 cfe9dbe053..12b8e530b9 100644 --- a/.azuredevops/components/hipCUB.yml +++ b/.azuredevops/components/hipCUB.yml @@ -19,7 +19,7 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml - pool: ${{ variables.LOW_BUILD_POOL }} + pool: ${{ variables.MEDIUM_BUILD_POOL }} container: image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: diff --git a/.azuredevops/components/hipRAND.yml b/.azuredevops/components/hipRAND.yml index 970b3284c7..e0b43082fd 100644 --- a/.azuredevops/components/hipRAND.yml +++ b/.azuredevops/components/hipRAND.yml @@ -15,6 +15,10 @@ parameters: - name: rocmDependencies type: object default: + - llvm-project + - ROCR-Runtime + - clr + - rocminfo - rocRAND jobs: @@ -22,10 +26,10 @@ jobs: 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: @@ -51,13 +55,12 @@ 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_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang -DBUILD_TEST=ON - -DCMAKE_MODULE_PATH="/opt/rocm/lib/cmake/hip" - -DCMAKE_PREFIX_PATH="$(Agent.BuildDirectory)/rocm;/opt/rocm" + -DCMAKE_MODULE_PATH=$(Agent.BuildDirectory)/rocm/lib/cmake/hip + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS=gfx1030;gfx1100 - -DHIP_COMPILER=clang -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/hipSPARSELt.yml b/.azuredevops/components/hipSPARSELt.yml index d946777217..0554aa7756 100644 --- a/.azuredevops/components/hipSPARSELt.yml +++ b/.azuredevops/components/hipSPARSELt.yml @@ -24,7 +24,7 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml - pool: ${{ variables.LOW_BUILD_POOL }} + pool: ${{ variables.MEDIUM_BUILD_POOL }} container: image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: diff --git a/.azuredevops/components/hipTensor.yml b/.azuredevops/components/hipTensor.yml index 1eebc0f957..b75c74198a 100644 --- a/.azuredevops/components/hipTensor.yml +++ b/.azuredevops/components/hipTensor.yml @@ -22,7 +22,7 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml - pool: ${{ variables.LOW_BUILD_POOL }} + pool: ${{ variables.MEDIUM_BUILD_POOL }} container: image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: diff --git a/.azuredevops/components/hipfort.yml b/.azuredevops/components/hipfort.yml index b9c84f1108..2b3918b5c3 100644 --- a/.azuredevops/components/hipfort.yml +++ b/.azuredevops/components/hipfort.yml @@ -32,5 +32,5 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DHIPFORT_INSTALL_DIR=/tmp/hipfort .. + -DHIPFORT_INSTALL_DIR=/tmp/hipfort - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/llvm-project.yml b/.azuredevops/components/llvm-project.yml index c5b899f7e5..a1a06c50b3 100644 --- a/.azuredevops/components/llvm-project.yml +++ b/.azuredevops/components/llvm-project.yml @@ -77,11 +77,7 @@ jobs: -DCLANG_DEFAULT_RTLIB=compiler-rt -DCLANG_DEFAULT_UNWINDLIB=libgcc -DSANITIZER_AMDGPU=OFF - -DPACKAGE_VENDOR="AMD" - -DCMAKE_SKIP_BUILD_RPATH=TRUE - -DCMAKE_SKIP_INSTALL_RPATH=TRUE - "-DCMAKE_EXE_LINKER_FLAGS_INIT=-Wl,--enable-new-dtags,--build-id=sha1,--rpath,$ORIGIN" - "-DCMAKE_SHARED_LINKER_FLAGS_INIT=-Wl,--enable-new-dtags,--build-id=sha1,--rpath,$ORIGIN/../lib" + -DPACKAGE_VENDOR=AMD -DCLANG_LINK_FLANG_LEGACY=ON -DCMAKE_CXX_STANDARD=17 -DFLANG_INCLUDE_DOCS=OFF diff --git a/.azuredevops/components/rccl.yml b/.azuredevops/components/rccl.yml index 82cd89df40..fe47b32ff6 100644 --- a/.azuredevops/components/rccl.yml +++ b/.azuredevops/components/rccl.yml @@ -20,7 +20,7 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml - pool: ${{ variables.LOW_BUILD_POOL }} + pool: ${{ variables.MEDIUM_BUILD_POOL }} container: image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: @@ -36,8 +36,8 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang + -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DCMAKE_PREFIX_PATH="/opt/rocm;/opt/rocm/share/rocm/cmake/" diff --git a/.azuredevops/components/rdc.yml b/.azuredevops/components/rdc.yml index 2f596e5b2a..5bf4352ea7 100644 --- a/.azuredevops/components/rdc.yml +++ b/.azuredevops/components/rdc.yml @@ -23,7 +23,7 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml - pool: ${{ variables.LOW_BUILD_POOL }} + pool: ${{ variables.MEDIUM_BUILD_POOL }} container: image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: diff --git a/.azuredevops/components/rocALUTION.yml b/.azuredevops/components/rocALUTION.yml index 1f663224a0..2954642018 100644 --- a/.azuredevops/components/rocALUTION.yml +++ b/.azuredevops/components/rocALUTION.yml @@ -38,8 +38,8 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang + -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/opt/rocm;/opt/rocm/share/rocm/cmake/" -DAMDGPU_TARGETS=gfx1030;gfx1100 diff --git a/.azuredevops/components/rocBLAS.yml b/.azuredevops/components/rocBLAS.yml index 36315e9006..8a2240d481 100644 --- a/.azuredevops/components/rocBLAS.yml +++ b/.azuredevops/components/rocBLAS.yml @@ -28,7 +28,7 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml - pool: ${{ variables.HIGH_BUILD_POOL }} + pool: ${{ variables.MEDIUM_BUILD_POOL }} container: image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: @@ -48,8 +48,8 @@ jobs: -DCMAKE_TOOLCHAIN_FILE=toolchain-linux.cmake -DCMAKE_PREFIX_PATH="/opt/rocm;$(Pipeline.Workspace)/deps-install" -DCMAKE_BUILD_TYPE=Release - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang + -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang -DAMDGPU_TARGETS=gfx1030;gfx1100 -DTensile_CODE_OBJECT_VERSION=default -DTensile_LOGIC=asm_full diff --git a/.azuredevops/components/rocFFT.yml b/.azuredevops/components/rocFFT.yml index ac87dd084a..fcfb58ee3f 100644 --- a/.azuredevops/components/rocFFT.yml +++ b/.azuredevops/components/rocFFT.yml @@ -21,7 +21,7 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml - pool: ${{ variables.ULTRA_BUILD_POOL }} + pool: ${{ variables.MEDIUM_BUILD_POOL }} container: image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: @@ -37,8 +37,8 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang + -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang -DCMAKE_PREFIX_PATH=/opt/rocm -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS=gfx1030;gfx1100 diff --git a/.azuredevops/components/rocMLIR.yml b/.azuredevops/components/rocMLIR.yml index 23a0c05744..ea4ee2fae0 100644 --- a/.azuredevops/components/rocMLIR.yml +++ b/.azuredevops/components/rocMLIR.yml @@ -33,8 +33,8 @@ jobs: parameters: extraBuildFlags: >- -DCMAKE_BUILD_TYPE=Release - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang + -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang -DCMAKE_PREFIX_PATH=/opt/rocm -DBUILD_FAT_LIBROCKCOMPILER=1 -GNinja diff --git a/.azuredevops/components/rocPRIM.yml b/.azuredevops/components/rocPRIM.yml index 8a94a0057e..6c12ab9fdf 100644 --- a/.azuredevops/components/rocPRIM.yml +++ b/.azuredevops/components/rocPRIM.yml @@ -18,7 +18,7 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml - pool: ${{ variables.LOW_BUILD_POOL }} + pool: ${{ variables.MEDIUM_BUILD_POOL }} container: image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: @@ -38,8 +38,8 @@ jobs: parameters: extraBuildFlags: >- -DBUILD_BENCHMARK=ON - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang + -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/rocRAND.yml b/.azuredevops/components/rocRAND.yml index 3c57ac9b39..7cfda0f702 100644 --- a/.azuredevops/components/rocRAND.yml +++ b/.azuredevops/components/rocRAND.yml @@ -11,17 +11,26 @@ parameters: - cmake - ninja-build - googletest + - libgtest-dev - git +- name: rocmDependencies + type: object + default: + - rocm-cmake + - llvm-project + - ROCR-Runtime + - clr + - rocminfo jobs: - job: rocRAND 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: @@ -32,14 +41,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_PREFIX_PATH="/opt/rocm" + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DBUILD_TEST=ON - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang + -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ -DAMDGPU_TARGETS=gfx1030;gfx1100 - -DAMDGPU_TEST_TARGETS=gfx1030;gfx1100 -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/rocSOLVER.yml b/.azuredevops/components/rocSOLVER.yml index 1dd08df04b..df47cb70bc 100644 --- a/.azuredevops/components/rocSOLVER.yml +++ b/.azuredevops/components/rocSOLVER.yml @@ -60,8 +60,8 @@ jobs: parameters: extraBuildFlags: >- -DCMAKE_PREFIX_PATH="/opt/rocm;$(Pipeline.Workspace)/deps-install" - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang + -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang -DAMDGPU_TARGETS=gfx1030;gfx1100 -DUSE_CUDA=OFF -DBUILD_CLIENTS_TESTS=ON diff --git a/.azuredevops/components/rocSPARSE.yml b/.azuredevops/components/rocSPARSE.yml index d46d16e78f..b5907db812 100644 --- a/.azuredevops/components/rocSPARSE.yml +++ b/.azuredevops/components/rocSPARSE.yml @@ -23,7 +23,7 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml - pool: ${{ variables.LOW_BUILD_POOL }} + pool: ${{ variables.MEDIUM_BUILD_POOL }} container: image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: diff --git a/.azuredevops/components/rocThrust.yml b/.azuredevops/components/rocThrust.yml index c5ef0028af..191d36f474 100644 --- a/.azuredevops/components/rocThrust.yml +++ b/.azuredevops/components/rocThrust.yml @@ -39,8 +39,8 @@ jobs: parameters: extraBuildFlags: >- -GNinja - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang + -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 -DAMDGPU_TARGETS=gfx1030;gfx1100 diff --git a/.azuredevops/components/rocWMMA.yml b/.azuredevops/components/rocWMMA.yml index bae358d7d2..5dd8476363 100644 --- a/.azuredevops/components/rocWMMA.yml +++ b/.azuredevops/components/rocWMMA.yml @@ -22,7 +22,7 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml - pool: ${{ variables.HIGH_BUILD_POOL }} + pool: ${{ variables.MEDIUM_BUILD_POOL }} container: image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: diff --git a/.azuredevops/components/rocminfo.yml b/.azuredevops/components/rocminfo.yml index ec5b335eca..3ef0c15a69 100644 --- a/.azuredevops/components/rocminfo.yml +++ b/.azuredevops/components/rocminfo.yml @@ -9,6 +9,7 @@ parameters: type: object default: - ROCR-Runtime + - rocprofiler-register jobs: - job: rocminfo @@ -39,9 +40,6 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_PREFIX_PATH="$(Agent.BuildDirectory)/rocm" - -DCMAKE_SKIP_BUILD_RPATH=TRUE + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DROCRTST_BLD_TYPE=release - "-DCMAKE_EXE_LINKER_FLAGS_INIT=-Wl,--enable-new-dtags,--build-id=sha1,--rpath,$ORIGIN" - "-DCMAKE_SHARED_LINKER_FLAGS_INIT=-Wl,--enable-new-dtags,--build-id=sha1,--rpath,$ORIGIN/../lib" - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml diff --git a/.azuredevops/components/rocprofiler.yml b/.azuredevops/components/rocprofiler.yml index 80ff95efab..f7d41fb4b9 100644 --- a/.azuredevops/components/rocprofiler.yml +++ b/.azuredevops/components/rocprofiler.yml @@ -32,7 +32,7 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml - pool: ${{ variables.LOW_BUILD_POOL }} + pool: ${{ variables.MEDIUM_BUILD_POOL }} container: image: ${{ variables.DOCKER_IMAGE_NAME }}:${{ variables.LATEST_DOCKER_VERSION }} workspace: diff --git a/.azuredevops/components/roctracer.yml b/.azuredevops/components/roctracer.yml index 59a1cf7b73..3ed00199d4 100644 --- a/.azuredevops/components/roctracer.yml +++ b/.azuredevops/components/roctracer.yml @@ -10,6 +10,8 @@ parameters: default: - cmake - ninja-build + - doxygen + - graphviz - name: pipModules type: object default: @@ -19,16 +21,20 @@ parameters: type: object default: - llvm-project + - ROCR-Runtime + - rocprofiler-register + - clr + - rocminfo jobs: - job: roctracer 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: @@ -56,9 +62,15 @@ jobs: parameters: extraBuildFlags: >- -DCMAKE_BUILD_TYPE=release - -DCMAKE_MODULE_PATH="$(Agent.BuildDirectory)/rocm/lib/cmake" - -DCMAKE_PREFIX_PATH="$(Agent.BuildDirectory)/rocm/llvm;$(Agent.BuildDirectory)/rocm" - -DENABLE_LDCONFIG=OFF + -DROCM_PATH=$(Agent.BuildDirectory)/rocm + -DCMAKE_MODULE_PATH=$(Agent.BuildDirectory)/rocm/lib/cmake/hip + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DGPU_TARGETS=gfx1030;gfx1100 -GNinja - - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml +# - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml +# - task: Bash@3 +# displayName: 'Tests' +# inputs: +# targetType: inline +# script: ./run.sh +# workingDirectory: build diff --git a/.azuredevops/components/rpp.yml b/.azuredevops/components/rpp.yml index 25f0098299..b998f84a84 100644 --- a/.azuredevops/components/rpp.yml +++ b/.azuredevops/components/rpp.yml @@ -36,8 +36,8 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ - -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang + -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/amdclang++ + -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/amdclang -DCMAKE_BUILD_TYPE=Release -DBUILD_CLIENTS=ON -DAMDGPU_TARGETS=gfx1030;gfx1100 diff --git a/.azuredevops/tag-builds/clr.yml b/.azuredevops/tag-builds/clr.yml new file mode 100644 index 0000000000..105f2bcc7f --- /dev/null +++ b/.azuredevops/tag-builds/clr.yml @@ -0,0 +1,39 @@ +variables: +- group: common +- template: /.azuredevops/variables-global.yml + +parameters: +- name: checkoutRef + type: string + default: refs/tags/$(LATEST_RELEASE_TAG) + +resources: + repositories: + - repository: pipelines_repo + type: github + endpoint: ROCm + name: ROCm/ROCm + - repository: release_repo + type: github + endpoint: ROCm + name: ROCm/clr + ref: ${{ parameters.checkoutRef }} + - repository: matching_repo + type: github + endpoint: ROCm + name: ROCm/HIP + ref: ${{ parameters.checkoutRef }} + - repository: hipother_repo + type: github + endpoint: ROCm + name: ROCm/hipother + ref: ${{ parameters.checkoutRef }} + +trigger: none +pr: none + +jobs: + - template: ${{ variables.CI_COMPONENT_PATH }}/HIP.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 e065f2ff6c..1814d4725b 100644 --- a/.azuredevops/templates/steps/artifact-download.yml +++ b/.azuredevops/templates/steps/artifact-download.yml @@ -13,6 +13,7 @@ parameters: type: object default: AMDMIGraphX: develop + clr: develop composable_kernel: develop half: master HIP: develop @@ -24,6 +25,7 @@ parameters: rocBLAS: develop rocFFT: develop rocm-cmake: develop + rocminfo: master rocMLIR: develop rocPRIM: develop rocprofiler-register: amd-mainline @@ -48,7 +50,7 @@ steps: inputs: buildType: 'specific' project: ROCm-CI - pipeline: ${{ parameters.pipelineId }} + definition: ${{ parameters.pipelineId }} specificBuildWithTriggering: true ${{ if eq(parameters.useDefaultBranch, true) }}: branchName: ${{ parameters.defaultBranchList[parameters.componentName] }} @@ -56,17 +58,17 @@ steps: branchName: ${{ parameters.branchName }} ${{ if in(parameters.componentName, parameters.componentsFailureOkay) }}: allowPartiallySucceededBuilds: true - targetPath: '$(System.ArtifactsDirectory)' + targetPath: '$(Pipeline.Workspace)/d' - task: ExtractFiles@1 displayName: Extract ${{ parameters.componentName }} inputs: - archiveFilePatterns: '$(System.ArtifactsDirectory)/**/*.tar.gz' + archiveFilePatterns: '$(Pipeline.Workspace)/d/**/*.tar.gz' destinationFolder: '$(Agent.BuildDirectory)/rocm' cleanDestinationFolder: false overwriteExistingFiles: true - task: DeleteFiles@1 displayName: Cleanup Compressed ${{ parameters.componentName }} inputs: - SourceFolder: '$(System.ArtifactsDirectory)' - Contents: '/**/*.tar.gz' + SourceFolder: '$(Pipeline.Workspace)/d' + Contents: '**/*.tar.gz' RemoveDotFiles: true diff --git a/.azuredevops/templates/steps/build-cmake.yml b/.azuredevops/templates/steps/build-cmake.yml index ffaa77c0e8..6ba86d7a1b 100644 --- a/.azuredevops/templates/steps/build-cmake.yml +++ b/.azuredevops/templates/steps/build-cmake.yml @@ -37,7 +37,7 @@ steps: # equivalent to running make $cmakeTarget from $cmakeBuildDir # e.g., make install - task: CMake@1 - displayName: '${{parameters.componentName }} Install' + displayName: '${{parameters.componentName }} ${{ parameters.cmakeTarget }}' inputs: workingDirectory: ${{ parameters.cmakeBuildDir }} cmakeArgs: '--build ${{ parameters.cmakeTargetDir }} --target ${{ parameters.cmakeTarget }}' diff --git a/.azuredevops/templates/steps/dependencies-rocm.yml b/.azuredevops/templates/steps/dependencies-rocm.yml index f739ac83cd..b62892a95b 100644 --- a/.azuredevops/templates/steps/dependencies-rocm.yml +++ b/.azuredevops/templates/steps/dependencies-rocm.yml @@ -24,6 +24,7 @@ parameters: type: object default: AMDMIGraphX: $(amdmigraphx-pipeline-id) + clr: $(clr-pipeline-id) composable_kernel: $(composable-kernel-pipeline-id) half: $(half-pipeline-id) hipBLAS: $(hipblas-pipeline-id) @@ -34,6 +35,7 @@ parameters: rocBLAS: $(rocblas-pipeline-id) rocFFT: $(rotfft-pipeline-id) rocm-cmake: $(rocm-cmake-pipeline-id) + rocminfo: $(rocminfo-pipeline-id) rocMLIR: $(rocmlir-pipeline-id) rocPRIM: $(rocprim-pipeline-id) rocprofiler-register: $(rocprofiler-register-pipeline-id) @@ -47,6 +49,7 @@ parameters: type: object default: AMDMIGraphX: $(amdmigraphx-tagged-pipeline-id) + clr: $(clr-tagged-pipeline-id) composable_kernel: $(composable-kernel-tagged-pipeline-id) half: $(half-tagged-pipeline-id) hipBLAS: $(hipblas-tagged-pipeline-id) @@ -57,6 +60,7 @@ parameters: rocBLAS: $(rocblas-tagged-pipeline-id) rocFFT: $(rotfft-tagged-pipeline-id) rocm-cmake: $(rocm-cmake-tagged-pipeline-id) + rocminfo: $(rocminfo-tagged-pipeline-id) rocMLIR: $(rocmlir-tagged-pipeline-id) rocPRIM: $(rocprim-tagged-pipeline-id) rocprofiler-register: $(rocprofiler-register-tagged-pipeline-id) @@ -66,6 +70,11 @@ parameters: rocSPARSE: $(rocsparse-tagged-pipeline-id) ROCT-Thunk-Interface: $(roct-thunk-interface-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 +- name: skipLibraryLinking + type: boolean + default: false steps: # assuming artifact-download.yml template file in same directory @@ -86,3 +95,20 @@ steps: parameters: componentName: ${{ parameters.fixedComponentName }} pipelineId: ${{ parameters.fixedPipelineIdentifier }} +- task: Bash@3 + displayName: 'list downloaded ROCm files' + inputs: + targetType: inline + script: ls -1R $(Agent.BuildDirectory)/rocm +- ${{ if eq(parameters.skipLibraryLinking, false) }}: + - task: Bash@3 + displayName: 'link ROCm shared libraries' + inputs: + targetType: inline +# OS ignores if the ROCm lib folder shows up more than once + script: | + echo "$(Agent.BuildDirectory)/rocm/lib + " | sudo tee -a /etc/ld.so.conf + sudo cat /etc/ld.so.conf + sudo ldconfig -v + ldconfig -p