From 99a35bb1fc23b08975ec977506b45d17235ddb2b Mon Sep 17 00:00:00 2001 From: Daniel Su Date: Tue, 18 Mar 2025 11:41:23 -0400 Subject: [PATCH] Ex CI: remove /opt/rocm symlinks from nine components (#4508) --- .azuredevops/components/MIOpen.yml | 10 ++-- .azuredevops/components/MIVisionX.yml | 20 ++++--- .azuredevops/components/ROCgdb.yml | 2 +- .azuredevops/components/Tensile.yml | 44 +++------------ .azuredevops/components/aomp.yml | 3 +- .azuredevops/components/hip-tests.yml | 2 +- .azuredevops/components/hipBLASLt.yml | 6 +-- .azuredevops/components/hipfort.yml | 2 +- .azuredevops/components/rdc.yml | 7 +-- .azuredevops/components/rocDecode.yml | 24 ++++----- .azuredevops/components/rocJPEG.yml | 25 +++++---- .azuredevops/components/rocMLIR.yml | 7 +-- .azuredevops/components/rocPyDecode.yml | 17 ++---- .../components/rocprofiler-systems.yml | 54 ++++--------------- .azuredevops/components/rocprofiler.yml | 18 +++---- .azuredevops/components/rpp.yml | 16 +++--- 16 files changed, 93 insertions(+), 164 deletions(-) diff --git a/.azuredevops/components/MIOpen.yml b/.azuredevops/components/MIOpen.yml index 8488412a7..ff3908d4b 100644 --- a/.azuredevops/components/MIOpen.yml +++ b/.azuredevops/components/MIOpen.yml @@ -60,6 +60,8 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm pool: ${{ variables.MEDIUM_BUILD_POOL }} workspace: clean: all @@ -92,11 +94,11 @@ jobs: targetType: inline workingDirectory: $(Build.SourcesDirectory) script: | - sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm sed -i '/composable_kernel/d' requirements.txt mkdir -p $(Agent.BuildDirectory)/miopen-deps + export CXX=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ + export CC=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang cmake -P install_deps.cmake --prefix $(Agent.BuildDirectory)/miopen-deps - sudo rm -rf /opt/rocm - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- @@ -168,11 +170,11 @@ jobs: targetType: inline workingDirectory: $(Build.SourcesDirectory) script: | - sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm sed -i '/composable_kernel/d' requirements.txt mkdir -p $(Agent.BuildDirectory)/miopen-deps + export CXX=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ + export CC=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang cmake -P install_deps.cmake --prefix $(Agent.BuildDirectory)/miopen-deps - sudo rm -rf /opt/rocm - task: CMake@1 displayName: 'MIOpen Test CMake Flags' inputs: diff --git a/.azuredevops/components/MIVisionX.yml b/.azuredevops/components/MIVisionX.yml index 4f79715d4..a14cf63d9 100644 --- a/.azuredevops/components/MIVisionX.yml +++ b/.azuredevops/components/MIVisionX.yml @@ -120,6 +120,8 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: LD_LIBRARY_PATH + value: $(Agent.BuildDirectory)/rocm/lib:$(Agent.BuildDirectory)/rocm/include/mivisionx/VX pool: $(JOB_TEST_POOL) workspace: clean: all @@ -145,14 +147,16 @@ jobs: checkoutRef: ${{ parameters.checkoutRef }} dependencyList: ${{ parameters.rocmTestDependencies }} gpuTarget: $(JOB_GPU_TARGET) - # anything in /opt may be persistent across runs - # so we need to remove the symlink if it already exists - - script: | - sudo rm -f /opt/rocm - sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm - mkdir mivisionx-tests - cd mivisionx-tests - cmake /opt/rocm/share/mivisionx/test + - task: Bash@3 + displayName: Build MIVisionX tests + inputs: + targetType: inline + script: | + # Assuming that /opt is no longer persistent across runs, test environments are fully ephemeral + sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm + mkdir mivisionx-tests + cd mivisionx-tests + cmake $(Agent.BuildDirectory)/rocm/share/mivisionx/test - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/gpu-diagnostics.yml - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/test.yml parameters: diff --git a/.azuredevops/components/ROCgdb.yml b/.azuredevops/components/ROCgdb.yml index 39fa2cc8d..07a4bf5bf 100644 --- a/.azuredevops/components/ROCgdb.yml +++ b/.azuredevops/components/ROCgdb.yml @@ -89,7 +89,7 @@ jobs: inputs: targetType: inline script: | - sudo rm -rf /opt/rocm + # Assuming that /opt is no longer persistent across runs, test environments are fully ephemeral sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm echo "##vso[task.prependpath]/opt/rocm/bin" - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-links.yml diff --git a/.azuredevops/components/Tensile.yml b/.azuredevops/components/Tensile.yml index 407c2ac9d..51ad9a4a3 100644 --- a/.azuredevops/components/Tensile.yml +++ b/.azuredevops/components/Tensile.yml @@ -35,6 +35,8 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm pool: vmImage: ${{ variables.BASE_BUILD_POOL }} workspace: @@ -59,8 +61,6 @@ jobs: targetType: inline script: python3 setup.py bdist_wheel workingDirectory: $(Build.SourcesDirectory) - env: - ROCM_PATH: $(Agent.BuildDirectory)/rocm - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-prepare-package.yml parameters: sourceDir: $(Build.SourcesDirectory)/dist @@ -90,12 +90,14 @@ jobs: # pipModules: ${{ parameters.pipModules }} - job: Tensile_testing - timeoutInMinutes: 90 + timeoutInMinutes: 120 dependsOn: Tensile condition: and(succeeded(), eq(variables.ENABLE_GFX942_TESTS, 'true'), not(containsValue(split(variables.DISABLED_GFX942_TESTS, ','), variables['Build.DefinitionName']))) variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm pool: $(JOB_TEST_POOL) workspace: clean: all @@ -138,25 +140,12 @@ jobs: inputs: targetType: inline script: | - sudo rm -rf /opt/rocm + # Assuming that /opt is no longer persistent across runs, test environments are fully ephemeral sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm - - task: Bash@3 - displayName: Add Python site-packages binaries to path - inputs: - targetType: inline - script: | USER_BASE=$(python3 -m site --user-base) echo "##vso[task.prependpath]$USER_BASE/bin" - - task: Bash@3 - displayName: Add ROCm binaries to PATH - inputs: - targetType: inline - script: echo "##vso[task.prependpath]$(Agent.BuildDirectory)/rocm/bin" - - task: Bash@3 - displayName: Add ROCm compilers to PATH - inputs: - targetType: inline - script: echo "##vso[task.prependpath]$(Agent.BuildDirectory)/rocm/llvm/bin" + echo "##vso[task.prependpath]$(Agent.BuildDirectory)/rocm/bin" + echo "##vso[task.prependpath]$(Agent.BuildDirectory)/rocm/llvm/bin" - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/gpu-diagnostics.yml - task: Bash@3 displayName: tox test @@ -164,23 +153,6 @@ jobs: targetType: inline script: tox run -v -e ci -- -m pre_checkin workingDirectory: $(Build.SourcesDirectory) - - task: Bash@3 - displayName: Remove Python site-packages binaries from path - inputs: - targetType: inline - script: | - USER_BASE=$(python3 -m site --user-base) - echo "##vso[task.setvariable variable=PATH]$(echo $PATH | sed -e 's;:$USER_BASE/bin;;' -e 's;^/;;' -e 's;/$;;')" - - task: Bash@3 - displayName: Remove ROCm binaries from PATH - inputs: - targetType: inline - script: echo "##vso[task.setvariable variable=PATH]$(echo $PATH | sed -e 's;:$(Agent.BuildDirectory)/rocm/bin;;' -e 's;^/;;' -e 's;/$;;')" - - task: Bash@3 - displayName: Remove ROCm compilers from PATH - inputs: - targetType: inline - script: echo "##vso[task.setvariable variable=PATH]$(echo $PATH | sed -e 's;:$(Agent.BuildDirectory)/rocm/llvm/bin;;' -e 's;^/;;' -e 's;/$;;')" - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/docker-container.yml parameters: aptPackages: ${{ parameters.aptPackages }} diff --git a/.azuredevops/components/aomp.yml b/.azuredevops/components/aomp.yml index 3a14847fb..feb5e41b7 100644 --- a/.azuredevops/components/aomp.yml +++ b/.azuredevops/components/aomp.yml @@ -103,6 +103,7 @@ jobs: # dependencies from the new artifacts, we use temporary symbolic links # for the compilation and installation to go through. - script: | + # Assuming that /opt is no longer persistent across runs, test environments are fully ephemeral sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm mkdir -p $(Build.BinariesDirectory)/lib/llvm/bin ln -s $(Agent.BuildDirectory)/rocm/llvm/bin/clang $(Build.BinariesDirectory)/lib/llvm/bin/clang @@ -474,7 +475,7 @@ jobs: inputs: targetType: inline script: | - sudo rm -rf /opt/rocm + # Assuming that /opt is no longer persistent across runs, test environments are fully ephemeral sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml parameters: diff --git a/.azuredevops/components/hip-tests.yml b/.azuredevops/components/hip-tests.yml index 1dcbabf15..74b4b859d 100644 --- a/.azuredevops/components/hip-tests.yml +++ b/.azuredevops/components/hip-tests.yml @@ -130,7 +130,7 @@ jobs: inputs: targetType: inline script: | - sudo rm -rf /opt/rocm + # Assuming that /opt is no longer persistent across runs, test environments are fully ephemeral sudo mkdir -p /opt/rocm/bin sudo ln -s $(Agent.BuildDirectory)/rocm/bin/rocm_agent_enumerator /opt/rocm/bin/rocm_agent_enumerator - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/gpu-diagnostics.yml diff --git a/.azuredevops/components/hipBLASLt.yml b/.azuredevops/components/hipBLASLt.yml index a11da34e3..312ec0219 100644 --- a/.azuredevops/components/hipBLASLt.yml +++ b/.azuredevops/components/hipBLASLt.yml @@ -89,8 +89,6 @@ jobs: checkoutRef: ${{ parameters.checkoutRef }} dependencyList: ${{ parameters.rocmDependencies }} gpuTarget: $(JOB_GPU_TARGET) - - script: sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm - displayName: ROCm symbolic link # Build and install gtest, lapack, hipBLAS-common # $(Pipeline.Workspace)/deps is a temporary folder for the build process # $(Pipeline.Workspace)/s/deps is part of the hipBLASLt repo @@ -124,6 +122,7 @@ jobs: parameters: extraBuildFlags: >- -DCMAKE_BUILD_TYPE=Release + -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ -DCMAKE_C_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang -DCMAKE_CXX_COMPILER_LAUNCHER=ccache @@ -132,7 +131,6 @@ jobs: -DTensile_LOGIC= -DTensile_CPU_THREADS= -DTensile_LIBRARY_FORMAT=msgpack - -DCMAKE_PREFIX_PATH="$(Agent.BuildDirectory)/rocm" -DBUILD_CLIENTS_TESTS=ON -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/manifest.yml @@ -164,6 +162,8 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm pool: $(JOB_TEST_POOL) workspace: clean: all diff --git a/.azuredevops/components/hipfort.yml b/.azuredevops/components/hipfort.yml index e2bf6ae45..c7eb31141 100644 --- a/.azuredevops/components/hipfort.yml +++ b/.azuredevops/components/hipfort.yml @@ -135,7 +135,7 @@ jobs: inputs: targetType: inline script: | - sudo rm -rf /opt/rocm + # Assuming that /opt is no longer persistent across runs, test environments are fully ephemeral sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm workingDirectory: $(Build.SourcesDirectory) - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/gpu-diagnostics.yml diff --git a/.azuredevops/components/rdc.yml b/.azuredevops/components/rdc.yml index 9bdd375e3..3f3656e18 100644 --- a/.azuredevops/components/rdc.yml +++ b/.azuredevops/components/rdc.yml @@ -126,6 +126,10 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm + - name: ROCM_DIR + value: $(Agent.BuildDirectory)/rocm pool: $(JOB_TEST_POOL) workspace: clean: all @@ -156,9 +160,6 @@ jobs: inputs: targetType: inline script: | - sudo rm -rf /opt/rocm - sudo rm -rf /usr/sbin/rdcd - sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm sudo ln -s $(Agent.BuildDirectory)/rocm/bin/rdcd /usr/sbin/rdcd echo $(Agent.BuildDirectory)/rocm/lib/rdc/grpc/lib | sudo tee /etc/ld.so.conf.d/grpc.conf sudo ldconfig -v diff --git a/.azuredevops/components/rocDecode.yml b/.azuredevops/components/rocDecode.yml index 745a3e3a9..421772535 100644 --- a/.azuredevops/components/rocDecode.yml +++ b/.azuredevops/components/rocDecode.yml @@ -45,6 +45,8 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm pool: vmImage: ${{ variables.BASE_BUILD_POOL }} workspace: @@ -65,8 +67,6 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DROCM_PATH=$(Agent.BuildDirectory)/rocm - -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DCMAKE_BUILD_TYPE=Release -GNinja - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/manifest.yml @@ -83,6 +83,8 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm pool: name: $(JOB_TEST_POOL) demands: firstRenderDeviceAccess @@ -109,21 +111,19 @@ jobs: checkoutRef: ${{ parameters.checkoutRef }} dependencyList: ${{ parameters.rocmTestDependencies }} gpuTarget: $(JOB_GPU_TARGET) - # anything in /opt may be persistent across runs - # so we need to remove the symlink if it already exists - - script: | - sudo rm -rf /opt/rocm - sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm - mkdir rocDecode-tests - cd rocDecode-tests - cmake /opt/rocm/share/rocdecode/test + - task: Bash@3 + displayName: Build rocDecode tests + inputs: + targetType: inline + script: | + mkdir rocDecode-tests + cd rocDecode-tests + cmake $(Agent.BuildDirectory)/rocm/share/rocdecode/test - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/gpu-diagnostics.yml - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/test.yml parameters: componentName: rocDecode testDir: 'rocDecode-tests' - - script: sudo rm /opt/rocm - condition: always() - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/docker-container.yml parameters: aptPackages: ${{ parameters.aptPackages }} diff --git a/.azuredevops/components/rocJPEG.yml b/.azuredevops/components/rocJPEG.yml index 419391662..0ea54a9a3 100644 --- a/.azuredevops/components/rocJPEG.yml +++ b/.azuredevops/components/rocJPEG.yml @@ -40,6 +40,8 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm pool: vmImage: ${{ variables.BASE_BUILD_POOL }} workspace: @@ -67,8 +69,6 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: extraBuildFlags: >- - -DROCM_PATH=$(Agent.BuildDirectory)/rocm - -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm -DCMAKE_BUILD_TYPE=Release -DGPU_TARGETS=$(JOB_GPU_TARGET) -GNinja @@ -87,6 +87,8 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm pool: name: $(JOB_TEST_POOL) demands: firstRenderDeviceAccess @@ -113,25 +115,22 @@ jobs: checkoutRef: ${{ parameters.checkoutRef }} dependencyList: ${{ parameters.rocmTestDependencies }} gpuTarget: $(JOB_GPU_TARGET) - # anything in /opt may be persistent across runs - # so we need to remove the symlink if it already exists - - script: | - sudo rm -rf /opt/rocm - sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm - mkdir rocJPEG-tests - cd rocJPEG-tests - cmake $(Agent.BuildDirectory)/rocm/share/rocjpeg/test + - task: Bash@3 + displayName: Build rocJPEG tests + inputs: + targetType: inline + script: | + mkdir rocJPEG-tests + cd rocJPEG-tests + cmake $(Agent.BuildDirectory)/rocm/share/rocjpeg/test - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/gpu-diagnostics.yml - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/test.yml parameters: componentName: rocJPEG testDir: 'rocJPEG-tests' - - script: sudo rm /opt/rocm - condition: always() - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/docker-container.yml parameters: aptPackages: ${{ parameters.aptPackages }} environment: test gpuTarget: $(JOB_GPU_TARGET) registerROCmPackages: true - optSymLink: true diff --git a/.azuredevops/components/rocMLIR.yml b/.azuredevops/components/rocMLIR.yml index b624447ec..0216fb599 100644 --- a/.azuredevops/components/rocMLIR.yml +++ b/.azuredevops/components/rocMLIR.yml @@ -105,12 +105,13 @@ jobs: dependencyList: ${{ parameters.rocmDependencies }} gpuTarget: $(JOB_GPU_TARGET) - task: Bash@3 - displayName: ROCm symbolic link + displayName: Symlink rocm_agent_enumerator inputs: targetType: inline script: | - sudo rm -rf /opt/rocm - sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm + # Assuming that /opt is no longer persistent across runs, test environments are fully ephemeral + sudo mkdir -p /opt/rocm/bin + sudo ln -s $(Agent.BuildDirectory)/rocm/bin/rocm_agent_enumerator /opt/rocm/bin/rocm_agent_enumerator - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: installEnabled: false diff --git a/.azuredevops/components/rocPyDecode.yml b/.azuredevops/components/rocPyDecode.yml index f4d6ca137..7e8962aac 100644 --- a/.azuredevops/components/rocPyDecode.yml +++ b/.azuredevops/components/rocPyDecode.yml @@ -42,6 +42,8 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm pool: vmImage: ${{ variables.BASE_BUILD_POOL }} workspace: @@ -66,13 +68,6 @@ jobs: checkoutRef: ${{ parameters.checkoutRef }} dependencyList: ${{ parameters.rocmDependencies }} gpuTarget: $(JOB_GPU_TARGET) - - task: Bash@3 - displayName: 'ROCm symbolic link' - inputs: - targetType: inline - script: | - sudo rm -rf /opt/rocm - sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm - task: Bash@3 displayName: 'Save Python Package Paths' inputs: @@ -85,7 +80,6 @@ jobs: parameters: installEnabled: false extraBuildFlags: >- - -DROCM_PATH=$(Agent.BuildDirectory)/rocm -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm;$(PYTHON_USER_SITE)/pybind11;$(PYTHON_DIST_PACKAGES)/pybind11;$(PYBIND11_PATH) -DCMAKE_BUILD_TYPE=Release -DGPU_TARGETS=$(JOB_GPU_TARGET) @@ -111,7 +105,6 @@ jobs: inputs: targetType: inline script: | - export ROCM_PATH=$(Agent.BuildDirectory)/rocm export HIP_INCLUDE_DIRS=$(Agent.BuildDirectory)/rocm/include/hip sudo python3 setup.py bdist_wheel sudo chown -R $(whoami):$(id -gn) $(find . -name "*.whl") @@ -143,7 +136,6 @@ jobs: # aptPackages: ${{ parameters.aptPackages }} # pipModules: ${{ parameters.pipModules }} # gpuTarget: $(JOB_GPU_TARGET) - # optSymLink: true - job: rocPyDecode_testing dependsOn: rocPyDecode @@ -151,6 +143,8 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm pool: name: $(JOB_TEST_POOL) demands: firstRenderDeviceAccess @@ -209,8 +203,6 @@ jobs: inputs: targetType: inline script: | - sudo rm -rf /opt/rocm - sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm echo "##vso[task.setvariable variable=PYTHON_USER_SITE;]$(python3 -m site --user-site)" echo "##vso[task.setvariable variable=PYTHON_DIST_PACKAGES;]$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')" echo "##vso[task.setvariable variable=PYBIND11_PATH;]$(python3 -c 'import pybind11; print(pybind11.get_cmake_dir())')" @@ -218,7 +210,6 @@ jobs: displayName: 'rocPyDecode Test CMake Flags' inputs: cmakeArgs: >- - -DROCM_PATH=$(Agent.BuildDirectory)/rocm -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm;$(PYTHON_USER_SITE)/pybind11;$(PYTHON_DIST_PACKAGES)/pybind11;$(PYBIND11_PATH) -DCMAKE_BUILD_TYPE=Release -DGPU_TARGETS=$(JOB_GPU_TARGET) diff --git a/.azuredevops/components/rocprofiler-systems.yml b/.azuredevops/components/rocprofiler-systems.yml index 0fd3d85f6..2ffaf7621 100644 --- a/.azuredevops/components/rocprofiler-systems.yml +++ b/.azuredevops/components/rocprofiler-systems.yml @@ -65,6 +65,8 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm pool: ${{ variables.MEDIUM_BUILD_POOL }} workspace: clean: all @@ -90,29 +92,17 @@ jobs: checkoutRef: ${{ parameters.checkoutRef }} dependencyList: ${{ parameters.rocmDependencies }} gpuTarget: $(JOB_GPU_TARGET) - - task: Bash@3 - displayName: ROCm symbolic link - inputs: - targetType: inline - script: | - sudo rm -rf /opt/rocm - sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm - task: Bash@3 displayName: Add ROCm binaries to PATH inputs: targetType: inline - script: echo "##vso[task.prependpath]$(Agent.BuildDirectory)/rocm/bin" - - task: Bash@3 - displayName: Add ROCm compilers to PATH - inputs: - targetType: inline - script: echo "##vso[task.prependpath]$(Agent.BuildDirectory)/rocm/llvm/bin" + script: | + echo "##vso[task.prependpath]$(Agent.BuildDirectory)/rocm/bin" + echo "##vso[task.prependpath]$(Agent.BuildDirectory)/rocm/llvm/bin" - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: # build flags reference: https://rocm.docs.amd.com/projects/omnitrace/en/latest/install/install.html extraBuildFlags: >- - -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm - -DROCM_PATH=$(Agent.BuildDirectory)/rocm -DROCPROFSYS_BUILD_TESTING=ON -DROCPROFSYS_BUILD_DYNINST=ON -DROCPROFSYS_BUILD_LIBUNWIND=ON @@ -138,7 +128,6 @@ jobs: pipModules: ${{ parameters.pipModules }} gpuTarget: $(JOB_GPU_TARGET) registerROCmPackages: true - optSymLink: true extraPaths: /home/user/workspace/rocm/bin:/home/user/workspace/rocm/llvm/bin - job: rocprofiler_systems_testing @@ -148,6 +137,8 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm pool: name: $(JOB_TEST_POOL) demands: firstRenderDeviceAccess @@ -177,29 +168,17 @@ jobs: checkoutRef: ${{ parameters.checkoutRef }} dependencyList: ${{ parameters.rocmDependencies }} gpuTarget: $(JOB_GPU_TARGET) - - task: Bash@3 - displayName: ROCm symbolic link - inputs: - targetType: inline - script: | - sudo rm -rf /opt/rocm - sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm - task: Bash@3 displayName: Add ROCm binaries to PATH inputs: targetType: inline - script: echo "##vso[task.prependpath]$(Agent.BuildDirectory)/rocm/bin" - - task: Bash@3 - displayName: Add ROCm compilers to PATH - inputs: - targetType: inline - script: echo "##vso[task.prependpath]$(Agent.BuildDirectory)/rocm/llvm/bin" + script: | + echo "##vso[task.prependpath]$(Agent.BuildDirectory)/rocm/bin" + echo "##vso[task.prependpath]$(Agent.BuildDirectory)/rocm/llvm/bin" - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml parameters: # build flags reference: https://rocm.docs.amd.com/projects/omnitrace/en/latest/install/install.html extraBuildFlags: >- - -DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm - -DROCM_PATH=$(Agent.BuildDirectory)/rocm -DROCPROFSYS_BUILD_TESTING=ON -DROCPROFSYS_BUILD_DYNINST=ON -DROCPROFSYS_BUILD_LIBUNWIND=ON @@ -221,18 +200,6 @@ jobs: - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/test.yml parameters: componentName: rocprofiler-systems - - task: Bash@3 - displayName: Remove ROCm binaries from PATH - condition: always() - inputs: - targetType: inline - script: echo "##vso[task.setvariable variable=PATH]$(echo $PATH | sed -e 's;:$(Agent.BuildDirectory)/rocm/bin;;' -e 's;^/;;' -e 's;/$;;')" - - task: Bash@3 - displayName: Remove ROCm compilers from PATH - condition: always() - inputs: - targetType: inline - script: echo "##vso[task.setvariable variable=PATH]$(echo $PATH | sed -e 's;:$(Agent.BuildDirectory)/rocm/llvm/bin;;' -e 's;^/;;' -e 's;/$;;')" - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/manifest.yml parameters: gpuTarget: $(JOB_GPU_TARGET) @@ -246,5 +213,4 @@ jobs: environment: test registerROCmPackages: true gpuTarget: $(JOB_GPU_TARGET) - optSymLink: true extraPaths: /home/user/workspace/rocm/bin:/home/user/workspace/rocm/llvm/bin diff --git a/.azuredevops/components/rocprofiler.yml b/.azuredevops/components/rocprofiler.yml index c6b2634f8..b0df3de81 100644 --- a/.azuredevops/components/rocprofiler.yml +++ b/.azuredevops/components/rocprofiler.yml @@ -106,6 +106,10 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm + - name: LD_LIBRARY_PATH + value: $(Agent.BuildDirectory)/rocm/lib/rocprofiler:$(Agent.BuildDirectory)/rocm/share/rocprofiler/tests-v1/test:$(Agent.BuildDirectory)/rocm/share/rocprofiler/tests pool: $(JOB_TEST_POOL) workspace: clean: all @@ -131,31 +135,23 @@ jobs: checkoutRef: ${{ parameters.checkoutRef }} dependencyList: ${{ parameters.rocmDependencies }} gpuTarget: $(JOB_GPU_TARGET) - - task: Bash@3 - displayName: Setup test environment - inputs: - targetType: inline - script: | - sudo rm -rf /opt/rocm - sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/gpu-diagnostics.yml - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/test.yml parameters: componentName: rocprofilerV1 - testExecutable: LD_LIBRARY_PATH="$(Agent.BuildDirectory)/rocm/lib/rocprofiler:$(Agent.BuildDirectory)/rocm/share/rocprofiler/tests-v1/test" ./run.sh testDir: $(Agent.BuildDirectory)/rocm/share/rocprofiler/tests-v1 + testExecutable: ./run.sh testParameters: '' testPublishResults: false - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/test.yml parameters: componentName: rocprofilerV2 - testExecutable: LD_LIBRARY_PATH="$(Agent.BuildDirectory)/rocm/lib/rocprofiler:$(Agent.BuildDirectory)/rocm/share/rocprofiler/tests" share/rocprofiler/tests/runUnitTests - testParameters: '--gtest_output=xml:./test_output.xml --gtest_color=yes' testDir: $(Agent.BuildDirectory)/rocm + testExecutable: share/rocprofiler/tests/runUnitTests + testParameters: '--gtest_output=xml:./test_output.xml --gtest_color=yes' - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/docker-container.yml parameters: aptPackages: ${{ parameters.aptPackages }} pipModules: ${{ parameters.pipModules }} environment: test gpuTarget: $(JOB_GPU_TARGET) - optSymLink: true diff --git a/.azuredevops/components/rpp.yml b/.azuredevops/components/rpp.yml index ef8ba89a2..07676b062 100644 --- a/.azuredevops/components/rpp.yml +++ b/.azuredevops/components/rpp.yml @@ -50,6 +50,8 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm pool: vmImage: ${{ variables.BASE_BUILD_POOL }} workspace: @@ -78,8 +80,6 @@ jobs: extraBuildFlags: >- -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 -DGPU_TARGETS=$(JOB_GPU_TARGET) @@ -104,8 +104,8 @@ jobs: variables: - group: common - template: /.azuredevops/variables-global.yml - - name: LD_LIBRARY_PATH - value: $(Agent.BuildDirectory)/rocm/lib;$(Agent.BuildDirectory)/rocm/llvm/lib + - name: ROCM_PATH + value: $(Agent.BuildDirectory)/rocm pool: $(JOB_TEST_POOL) workspace: clean: all @@ -168,21 +168,17 @@ jobs: inputs: targetType: 'inline' script: | - sudo rm -rf /opt/rocm - sudo ln -s $(Agent.BuildDirectory)/rocm /opt/rocm mkdir rpp-tests cd rpp-tests - cmake /opt/rocm/share/rpp/test \ + cmake $(Agent.BuildDirectory)/rocm/share/rpp/test \ -DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++ \ -DCMAKE_C_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/gpu-diagnostics.yml - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/test.yml parameters: componentName: rpp - testExecutable: 'export PATH=$(Agent.BuildDirectory)/rocm/llvm/bin:$PATH; CC=$(Agent.BuildDirectory)/rocm/llvm/bin/amdclang CMAKE_VERBOSE_MAKEFILE=ON VERBOSE=1 ctest' + testExecutable: 'CMAKE_VERBOSE_MAKEFILE=ON VERBOSE=1 ctest' testDir: 'rpp-tests' - - script: sudo rm /opt/rocm - condition: always() - template: ${{ variables.CI_TEMPLATE_PATH }}/steps/docker-container.yml parameters: aptPackages: ${{ parameters.aptPackages }}