mirror of
https://github.com/ROCm/ROCm.git
synced 2026-04-05 03:01:17 -04:00
227 lines
8.1 KiB
YAML
227 lines
8.1 KiB
YAML
parameters:
|
|
- name: checkoutRepo
|
|
type: string
|
|
default: 'self'
|
|
- name: checkoutRef
|
|
type: string
|
|
default: ''
|
|
# set to true if doing full build of ROCm stack
|
|
# and dependencies are pulled from same pipeline
|
|
- name: aggregatePipeline
|
|
type: boolean
|
|
default: false
|
|
- name: aptPackages
|
|
type: object
|
|
default:
|
|
- git
|
|
- libdrm-dev
|
|
- libmsgpack-dev
|
|
- libnuma-dev
|
|
- ninja-build
|
|
- python3-pip
|
|
- python3-venv
|
|
- gfortran
|
|
- libblas-dev
|
|
- ccache
|
|
- name: pipModules
|
|
type: object
|
|
default:
|
|
- joblib
|
|
- "packaging>=22.0"
|
|
- --upgrade
|
|
- name: rocmDependencies
|
|
type: object
|
|
default:
|
|
- aomp
|
|
- clr
|
|
- hipBLAS-common
|
|
- llvm-project
|
|
- rocminfo
|
|
- rocm_smi_lib
|
|
- rocprofiler-register
|
|
- ROCR-Runtime
|
|
- roctracer
|
|
- name: rocmTestDependencies
|
|
type: object
|
|
default:
|
|
- aomp
|
|
- clr
|
|
- hipBLAS-common
|
|
- llvm-project
|
|
- rocminfo
|
|
- rocm_smi_lib
|
|
- rocprofiler-register
|
|
- ROCR-Runtime
|
|
- roctracer
|
|
|
|
- name: jobMatrix
|
|
type: object
|
|
default:
|
|
buildJobs:
|
|
- gfx942:
|
|
target: gfx942
|
|
- gfx90a:
|
|
target: gfx90a
|
|
testJobs:
|
|
- gfx942:
|
|
target: gfx942
|
|
- gfx90a:
|
|
target: gfx90a
|
|
|
|
jobs:
|
|
- ${{ each job in parameters.jobMatrix.buildJobs }}:
|
|
- job: hipBLASLt_build_${{ job.target }}
|
|
timeoutInMinutes: 300
|
|
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/amdclang
|
|
- name: TENSILE_ROCM_OFFLOAD_BUNDLER_PATH
|
|
value: $(Agent.BuildDirectory)/rocm/llvm/bin/clang-offload-bundler
|
|
- name: ROCM_PATH
|
|
value: $(Agent.BuildDirectory)/rocm
|
|
- name: DAY_STRING
|
|
value: $[format('{0:ddMMyyyy}', pipeline.startTime)]
|
|
pool: ${{ variables.ULTRA_BUILD_POOL }}
|
|
workspace:
|
|
clean: all
|
|
steps:
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-other.yml
|
|
parameters:
|
|
aptPackages: ${{ parameters.aptPackages }}
|
|
pipModules: ${{ parameters.pipModules }}
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-cmake-latest.yml
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/preamble.yml
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml
|
|
parameters:
|
|
checkoutRepo: ${{ parameters.checkoutRepo }}
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml
|
|
parameters:
|
|
checkoutRef: ${{ parameters.checkoutRef }}
|
|
dependencyList: ${{ parameters.rocmDependencies }}
|
|
gpuTarget: ${{ job.target }}
|
|
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
|
- task: Bash@3
|
|
displayName: Add ROCm binaries to PATH
|
|
inputs:
|
|
targetType: inline
|
|
script: |
|
|
echo "##vso[task.prependpath]$(Agent.BuildDirectory)/rocm/bin"
|
|
echo "##vso[task.prependpath]$(Agent.BuildDirectory)/rocm/llvm/bin"
|
|
# 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
|
|
- script: mkdir $(Pipeline.Workspace)/deps
|
|
displayName: Create temp folder for external dependencies
|
|
# hipBLASLt already has a CMake script for external deps, so we can just run that
|
|
# https://github.com/ROCm/hipBLASLt/blob/develop/deps/CMakeLists.txt
|
|
- script: cmake $(Pipeline.Workspace)/s/deps
|
|
displayName: Configure hipBLASLt external dependencies
|
|
workingDirectory: $(Pipeline.Workspace)/deps
|
|
- script: make
|
|
displayName: Build hipBLASLt external dependencies
|
|
workingDirectory: $(Pipeline.Workspace)/deps
|
|
- script: sudo make install
|
|
displayName: Install hipBLASLt external dependencies
|
|
workingDirectory: $(Pipeline.Workspace)/deps
|
|
- script: |
|
|
mkdir -p $(CCACHE_DIR)
|
|
echo "##vso[task.prependpath]/usr/lib/ccache"
|
|
displayName: Update path for ccache
|
|
- task: Cache@2
|
|
displayName: Ccache caching
|
|
inputs:
|
|
key: hipBLASLt | $(Agent.OS) | ${{ job.target }} | $(DAY_STRING) | $(Agent.BuildDirectory)/rocm/llvm/bin/amdclang++
|
|
path: $(CCACHE_DIR)
|
|
restoreKeys: |
|
|
hipBLASLt | $(Agent.OS) | ${{ job.target }} | $(DAY_STRING)
|
|
hipBLASLt | $(Agent.OS) | ${{ job.target }}
|
|
hipBLASLt | $(Agent.OS)
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
|
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
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache
|
|
-DAMDGPU_TARGETS=${{ job.target }}
|
|
-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
|
|
parameters:
|
|
gpuTarget: ${{ job.target }}
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml
|
|
parameters:
|
|
gpuTarget: ${{ job.target }}
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-links.yml
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/docker-container.yml
|
|
parameters:
|
|
aptPackages: ${{ parameters.aptPackages }}
|
|
pipModules: ${{ parameters.pipModules }}
|
|
gpuTarget: ${{ job.target }}
|
|
extraPaths: /home/user/workspace/rocm/llvm/bin:/home/user/workspace/rocm/bin
|
|
installLatestCMake: true
|
|
extraEnvVars:
|
|
- HIP_ROCCLR_HOME:::/home/user/workspace/rocm
|
|
- TENSILE_ROCM_ASSEMBLER_PATH:::/home/user/workspace/rocm/llvm/bin/amdclang
|
|
- TENSILE_ROCM_OFFLOAD_BUNDLER_PATH:::/home/user/workspace/rocm/llvm/bin/clang-offload-bundler
|
|
- ROCM_PATH:::/home/user/workspace/rocm
|
|
extraCopyDirectories:
|
|
- deps
|
|
|
|
- ${{ each job in parameters.jobMatrix.testJobs }}:
|
|
- job: hipBLASLt_test_${{ job.target }}
|
|
timeoutInMinutes: 300
|
|
dependsOn: hipBLASLt_build_${{ job.target }}
|
|
condition:
|
|
and(succeeded(),
|
|
eq(variables['ENABLE_${{ upper(job.target) }}_TESTS'], 'true'),
|
|
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName'])),
|
|
eq(${{ parameters.aggregatePipeline }}, False)
|
|
)
|
|
variables:
|
|
- group: common
|
|
- template: /.azuredevops/variables-global.yml
|
|
- name: ROCM_PATH
|
|
value: $(Agent.BuildDirectory)/rocm
|
|
pool: ${{ job.target }}_test_pool
|
|
workspace:
|
|
clean: all
|
|
steps:
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-other.yml
|
|
parameters:
|
|
aptPackages: ${{ parameters.aptPackages }}
|
|
pipModules: ${{ parameters.pipModules }}
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/preamble.yml
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/local-artifact-download.yml
|
|
parameters:
|
|
gpuTarget: ${{ job.target }}
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-aqlprofile.yml
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml
|
|
parameters:
|
|
checkoutRef: ${{ parameters.checkoutRef }}
|
|
dependencyList: ${{ parameters.rocmTestDependencies }}
|
|
gpuTarget: ${{ job.target }}
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/gpu-diagnostics.yml
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/test.yml
|
|
parameters:
|
|
componentName: hipBLASLt
|
|
testDir: '$(Agent.BuildDirectory)/rocm/bin'
|
|
testExecutable: './hipblaslt-test'
|
|
testParameters: '--gtest_output=xml:./test_output.xml --gtest_color=yes --gtest_filter=*pre_checkin*'
|
|
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/docker-container.yml
|
|
parameters:
|
|
aptPackages: ${{ parameters.aptPackages }}
|
|
pipModules: ${{ parameters.pipModules }}
|
|
environment: test
|
|
gpuTarget: ${{ job.target }}
|