mirror of
https://github.com/ROCm/ROCm.git
synced 2026-01-10 15:18:11 -05:00
Compare commits
53 Commits
jax_comp_u
...
comp_page_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e100cff912 | ||
|
|
93bc9847cc | ||
|
|
9c5b3c7f4c | ||
|
|
028c2e4dbd | ||
|
|
d58d133762 | ||
|
|
065d1cdc95 | ||
|
|
5b859352b2 | ||
|
|
f15a1e830e | ||
|
|
a2628dce5d | ||
|
|
e0098d0668 | ||
|
|
71cffa9681 | ||
|
|
ab49590526 | ||
|
|
94337a9887 | ||
|
|
6700febed9 | ||
|
|
c8054fc6d2 | ||
|
|
18d98ca692 | ||
|
|
e014590d35 | ||
|
|
c8144c4a60 | ||
|
|
ed45d6add9 | ||
|
|
e93e0bf925 | ||
|
|
547bb41f6d | ||
|
|
4f86b2801a | ||
|
|
9c07ed1726 | ||
|
|
34ca259220 | ||
|
|
d04443ac13 | ||
|
|
d0c2a23d3a | ||
|
|
311b4cd62b | ||
|
|
97b3cdda9c | ||
|
|
61eb483a5e | ||
|
|
f766b823c3 | ||
|
|
d2ccd706a5 | ||
|
|
699f668a2b | ||
|
|
3bc09b6faa | ||
|
|
3e3b8989f8 | ||
|
|
824d760646 | ||
|
|
d0862bdfc5 | ||
|
|
cb412a7a7f | ||
|
|
78f5c18837 | ||
|
|
0bc0dfd8da | ||
|
|
63682eaf86 | ||
|
|
75f84536d9 | ||
|
|
50d41f633c | ||
|
|
62d20c8581 | ||
|
|
0e54b2d006 | ||
|
|
d1b426f2d0 | ||
|
|
639e2dc232 | ||
|
|
5bf3f6c059 | ||
|
|
abe86d3f14 | ||
|
|
5104389ab3 | ||
|
|
6b71afe8a2 | ||
|
|
d2c914d477 | ||
|
|
15298c51cb | ||
|
|
a9fe4dd2bb |
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -32,12 +27,12 @@ parameters:
|
||||
type: object
|
||||
default:
|
||||
- https://github.com/RadeonOpenCompute/rbuild/archive/master.tar.gz
|
||||
- "onnx>=1.14.1"
|
||||
- "numpy>=1.21.6"
|
||||
- "typing>=3.7.4"
|
||||
- "pytest>=6.0.1"
|
||||
- "packaging>=23.0"
|
||||
- "protobuf>=3.20.2"
|
||||
- onnx>=1.14.1
|
||||
- numpy>=1.21.6
|
||||
- typing>=3.7.4
|
||||
- pytest>=6.0.1
|
||||
- packaging>=23.0
|
||||
- protobuf>=3.20.2
|
||||
- name: rocmDependencies
|
||||
type: object
|
||||
default:
|
||||
@@ -120,7 +115,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -151,8 +145,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -47,7 +42,7 @@ jobs:
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
@@ -72,7 +67,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependenciesAMD }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
# compile clr
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
@@ -105,7 +99,7 @@ jobs:
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
@@ -131,7 +125,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependenciesNvidia }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- script: 'ls -1R $(Agent.BuildDirectory)/rocm'
|
||||
displayName: 'Artifact listing'
|
||||
# compile clr
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -82,7 +77,7 @@ jobs:
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
- name: ROCM_PATH
|
||||
value: $(Agent.BuildDirectory)/rocm
|
||||
pool: ${{ variables.HIGH_BUILD_POOL }}
|
||||
pool: ${{ variables.MEDIUM_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
@@ -102,7 +97,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- task: Bash@3
|
||||
displayName: Build and install other dependencies
|
||||
inputs:
|
||||
@@ -113,7 +107,7 @@ jobs:
|
||||
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 --generator Ninja
|
||||
cmake -P install_deps.cmake --prefix $(Agent.BuildDirectory)/miopen-deps
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -148,8 +142,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
@@ -214,7 +207,7 @@ jobs:
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/test.yml
|
||||
parameters:
|
||||
componentName: MIOpen
|
||||
testParameters: '--output-on-failure --force-new-ctest-process --output-junit test_output.xml --exclude-regex "test_rnn_seq_api|GPU_Conv2dTuningAsm_FP32"'
|
||||
testParameters: '--output-on-failure --force-new-ctest-process --output-junit test_output.xml --exclude-regex test_rnn_seq_api'
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/docker-container.yml
|
||||
parameters:
|
||||
aptPackages: ${{ parameters.aptPackages }}
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -108,7 +103,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -135,8 +129,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -47,7 +42,7 @@ jobs:
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
@@ -63,7 +58,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -84,8 +78,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -29,7 +24,7 @@ jobs:
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
@@ -45,7 +40,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
|
||||
@@ -5,17 +5,11 @@ parameters:
|
||||
- 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
|
||||
# reference: https://github.com/ROCm/ROCgdb/blob/amd-staging/README-ROCM.md
|
||||
- name: aptPackages
|
||||
type: object
|
||||
default:
|
||||
- bison
|
||||
- cmake
|
||||
- dejagnu
|
||||
- flex
|
||||
- libbabeltrace-dev
|
||||
@@ -40,72 +34,19 @@ parameters:
|
||||
- name: jobMatrix
|
||||
type: object
|
||||
default:
|
||||
testJobs:
|
||||
buildTestJobs:
|
||||
- gfx942:
|
||||
target: gfx942
|
||||
- gfx90a:
|
||||
target: gfx90a
|
||||
|
||||
jobs:
|
||||
- job: ROCgdb
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
- name: PKG_CONFIG_PATH
|
||||
value: $(Agent.BuildDirectory)/rocm/share/pkgconfig
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-other.yml
|
||||
parameters:
|
||||
aptPackages: ${{ parameters.aptPackages }}
|
||||
- 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-aqlprofile.yml
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/dependencies-rocm.yml
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-autotools.yml
|
||||
parameters:
|
||||
configureFlags: >-
|
||||
--program-prefix=roc
|
||||
--enable-64-bit-bfd
|
||||
--enable-targets="x86_64-linux-gnu,amdgcn-amd-amdhsa"
|
||||
--disable-ld
|
||||
--disable-gas
|
||||
--disable-gdbserver
|
||||
--disable-sim
|
||||
--enable-tui
|
||||
--disable-gdbtk
|
||||
--disable-shared
|
||||
--disable-gprofng
|
||||
--with-expat
|
||||
--with-system-zlib
|
||||
--without-guile
|
||||
--with-babeltrace
|
||||
--with-lzma
|
||||
--with-python=python3
|
||||
--with-rocm-dbgapi=$(Agent.BuildDirectory)/rocm
|
||||
LDFLAGS="-Wl,--enable-new-dtags,-rpath=$(Agent.BuildDirectory)/rocm/lib"
|
||||
makeCallPrefix: LD_RUN_PATH='${ORIGIN}/../lib'
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/manifest.yml
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-links.yml
|
||||
|
||||
- ${{ each job in parameters.jobMatrix.testJobs }}:
|
||||
- job: ROCgdb_test_${{ job.target }}
|
||||
dependsOn: ROCgdb
|
||||
- ${{ each job in parameters.jobMatrix.buildTestJobs }}:
|
||||
- job: ROCgdb_build_test_${{ job.target }}
|
||||
condition:
|
||||
and(succeeded(),
|
||||
and(
|
||||
eq(variables['ENABLE_${{ upper(job.target) }}_TESTS'], 'true'),
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName'])),
|
||||
eq(${{ parameters.aggregatePipeline }}, False)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
@@ -128,7 +69,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-autotools.yml
|
||||
parameters:
|
||||
configureFlags: >-
|
||||
@@ -152,6 +92,8 @@ jobs:
|
||||
--with-rocm-dbgapi=$(Agent.BuildDirectory)/rocm
|
||||
LDFLAGS="-Wl,--enable-new-dtags,-rpath=$(Agent.BuildDirectory)/rocm/lib"
|
||||
makeCallPrefix: LD_RUN_PATH='${ORIGIN}/../lib'
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/manifest.yml
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml
|
||||
- task: Bash@3
|
||||
displayName: Setup test environment
|
||||
inputs:
|
||||
@@ -160,6 +102,7 @@ jobs:
|
||||
# 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
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/gpu-diagnostics.yml
|
||||
- task: Bash@3
|
||||
displayName: check-gdb
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -27,7 +22,6 @@ parameters:
|
||||
type: object
|
||||
default:
|
||||
- amdsmi
|
||||
- aomp
|
||||
- clr
|
||||
- hipBLAS-common
|
||||
- hipBLASLt
|
||||
@@ -44,7 +38,6 @@ parameters:
|
||||
type: object
|
||||
default:
|
||||
- amdsmi
|
||||
- aomp
|
||||
- clr
|
||||
- hipBLAS-common
|
||||
- hipBLASLt
|
||||
@@ -103,14 +96,12 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
-DROCM_PATH=$(Agent.BuildDirectory)/rocm
|
||||
-DCMAKE_CXX_COMPILER=$(Agent.BuildDirectory)/rocm/llvm/bin/clang++
|
||||
-DCMAKE_PREFIX_PATH=$(Agent.BuildDirectory)/rocm
|
||||
-DCMAKE_CXX_FLAGS=-I$(Agent.BuildDirectory)/rocm/llvm/include
|
||||
-DCPACK_PACKAGING_INSTALL_PREFIX=$(Build.BinariesDirectory)
|
||||
-GNinja
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/manifest.yml
|
||||
@@ -135,8 +126,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -51,7 +46,7 @@ jobs:
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
- name: ROCM_PATH
|
||||
value: $(Agent.BuildDirectory)/rocm
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
@@ -68,7 +63,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/manifest.yml
|
||||
- task: Bash@3
|
||||
displayName: Create wheel file
|
||||
@@ -110,8 +104,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -72,7 +67,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -98,8 +92,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -63,8 +58,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -28,7 +23,7 @@ jobs:
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
@@ -44,7 +39,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
componentName: aomp-extras
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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
|
||||
# reference:
|
||||
# https://github.com/ROCm/aomp/blob/aomp-dev/docs/SOURCEINSTALL_PREREQUISITE.md
|
||||
- name: aptPackages
|
||||
@@ -113,7 +108,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
componentName: extras
|
||||
@@ -182,8 +176,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -76,7 +71,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- script: |
|
||||
mkdir -p $(CCACHE_DIR)
|
||||
echo "##vso[task.prependpath]/usr/lib/ccache"
|
||||
@@ -123,8 +117,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -26,11 +26,9 @@ jobs:
|
||||
parameters:
|
||||
componentName: HIP
|
||||
pipelineId: $(HIP_PIPELINE_ID)
|
||||
- task: Bash@3
|
||||
displayName: Copy HIP artifacts
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: cp -a $(Agent.BuildDirectory)/rocm/* $(Build.BinariesDirectory)/
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-prepare-package.yml
|
||||
parameters:
|
||||
sourceDir: $(Agent.BuildDirectory)/rocm
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/manifest.yml
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-links.yml
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -30,7 +25,7 @@ jobs:
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
@@ -46,7 +41,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -80,7 +75,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
# compile hip-tests
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
@@ -115,8 +109,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -34,7 +29,7 @@ jobs:
|
||||
- name: ROCM_PATH
|
||||
value: $(Agent.BuildDirectory)/rocm
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
@@ -50,7 +45,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -94,7 +89,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -127,12 +121,13 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
- name: AMD_COMGR_CACHE
|
||||
value: 0
|
||||
pool: ${{ job.target }}_test_pool
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -27,7 +22,7 @@ parameters:
|
||||
type: object
|
||||
default:
|
||||
- joblib
|
||||
- "packaging>=22.0"
|
||||
- packaging>=22.0
|
||||
- --upgrade
|
||||
- name: rocmDependencies
|
||||
type: object
|
||||
@@ -103,7 +98,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- task: Bash@3
|
||||
displayName: Add ROCm binaries to PATH
|
||||
inputs:
|
||||
@@ -185,14 +179,15 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
- name: ROCM_PATH
|
||||
value: $(Agent.BuildDirectory)/rocm
|
||||
- name: AMD_COMGR_CACHE
|
||||
value: 0
|
||||
pool: ${{ job.target }}_test_pool
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -72,7 +67,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -100,8 +94,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -84,7 +79,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -118,8 +112,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -75,7 +70,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -107,8 +101,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -87,7 +82,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
# build external gtest and lapack
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
@@ -128,12 +122,13 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
- name: AMD_COMGR_CACHE
|
||||
value: 0
|
||||
pool: ${{ job.target }}_test_pool
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -82,7 +77,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -122,12 +116,13 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
- name: AMD_COMGR_CACHE
|
||||
value: 0
|
||||
pool: ${{ job.target }}_test_pool
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -96,7 +91,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
# Build and install gtest and lapack
|
||||
# $(Pipeline.Workspace)/deps is a temporary folder for the build process
|
||||
# $(Pipeline.Workspace)/s/deps is part of the hipSPARSELt repo
|
||||
@@ -156,8 +150,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -71,7 +66,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -101,12 +95,13 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
- name: AMD_COMGR_CACHE
|
||||
value: 0
|
||||
pool: ${{ job.target }}_test_pool
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -81,7 +76,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -117,8 +111,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -50,7 +45,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
skipLlvmSymlink: true
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
componentName: rocm-llvm
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -77,7 +72,7 @@ jobs:
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
- name: HIP_ROCCLR_HOME
|
||||
value: $(Build.BinariesDirectory)/rocm
|
||||
pool: ${{ variables.HIGH_BUILD_POOL }}
|
||||
pool: ${{ variables.MEDIUM_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
@@ -95,7 +90,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -130,8 +124,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -94,7 +89,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
# Build grpc
|
||||
- task: Bash@3
|
||||
displayName: 'git clone grpc'
|
||||
@@ -141,8 +135,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -156,7 +151,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -188,8 +182,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -90,7 +85,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -123,8 +117,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -106,7 +101,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -151,12 +145,13 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
- name: AMD_COMGR_CACHE
|
||||
value: 0
|
||||
pool: ${{ job.target }}_test_pool
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -78,7 +73,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -98,8 +92,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -84,7 +79,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -119,8 +113,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -80,7 +75,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -89,8 +83,6 @@ jobs:
|
||||
-GNinja
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/manifest.yml
|
||||
- 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:
|
||||
@@ -104,8 +96,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
@@ -124,8 +115,6 @@ jobs:
|
||||
registerROCmPackages: true
|
||||
- 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:
|
||||
@@ -151,3 +140,4 @@ jobs:
|
||||
environment: test
|
||||
gpuTarget: ${{ job.target }}
|
||||
registerROCmPackages: true
|
||||
optSymLink: true
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -67,7 +62,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -93,8 +87,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -71,7 +66,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -99,8 +93,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -82,7 +77,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- task: Bash@3
|
||||
displayName: 'Save Python Package Paths'
|
||||
inputs:
|
||||
@@ -158,8 +152,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -75,7 +70,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -104,8 +98,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -93,7 +88,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
componentName: lapack
|
||||
@@ -137,12 +131,13 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
- name: AMD_COMGR_CACHE
|
||||
value: 0
|
||||
pool: ${{ job.target }}_test_pool
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -34,7 +29,6 @@ parameters:
|
||||
- rocminfo
|
||||
- rocPRIM
|
||||
- rocprofiler-register
|
||||
- roctracer
|
||||
- name: rocmTestDependencies
|
||||
type: object
|
||||
default:
|
||||
@@ -86,7 +80,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -133,12 +126,13 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
- name: AMD_COMGR_CACHE
|
||||
value: 0
|
||||
pool: ${{ job.target }}_test_pool
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -76,7 +71,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -104,8 +98,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -70,7 +65,7 @@ jobs:
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
pool: ${{ variables.HIGH_BUILD_POOL }}
|
||||
pool: ${{ variables.MEDIUM_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
@@ -86,7 +81,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -119,12 +113,13 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
- name: AMD_COMGR_CACHE
|
||||
value: 0
|
||||
pool: ${{ job.target }}_test_pool
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -31,7 +26,7 @@ jobs:
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -22,7 +17,7 @@ jobs:
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -105,7 +100,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
# https://github.com/ROCm/HIP/issues/2203
|
||||
@@ -142,8 +136,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
@@ -183,7 +176,6 @@ jobs:
|
||||
parameters:
|
||||
componentName: rocm-examples
|
||||
testDir: $(Build.SourcesDirectory)/build
|
||||
testParameters: '--output-on-failure --force-new-ctest-process --output-junit test_output.xml --exclude-regex "rocfft_callback"'
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/docker-container.yml
|
||||
parameters:
|
||||
aptPackages: ${{ parameters.aptPackages }}
|
||||
|
||||
@@ -5,12 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -55,7 +49,7 @@ jobs:
|
||||
value: $(Agent.BuildDirectory)/rocm
|
||||
- name: ROCR_LIB_DIR
|
||||
value: $(Agent.BuildDirectory)/rocm
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
@@ -72,7 +66,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -97,8 +90,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -33,7 +28,7 @@ jobs:
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
@@ -64,8 +59,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -43,7 +38,7 @@ jobs:
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
@@ -60,7 +55,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
skipLlvmSymlink: true
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
@@ -78,8 +72,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,17 +5,10 @@ parameters:
|
||||
- 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:
|
||||
- cmake
|
||||
- libdw-dev
|
||||
- libtbb-dev
|
||||
- locales
|
||||
- ninja-build
|
||||
- python3-pip
|
||||
@@ -24,10 +17,10 @@ parameters:
|
||||
default:
|
||||
- astunparse==1.6.2
|
||||
- colorlover
|
||||
- "dash>=1.12.0"
|
||||
- dash>=1.12.0
|
||||
- matplotlib
|
||||
- "numpy>=1.17.5"
|
||||
- "pandas>=1.4.3"
|
||||
- numpy>=1.17.5
|
||||
- pandas>=1.4.3
|
||||
- pymongo
|
||||
- pyyaml
|
||||
- tabulate
|
||||
@@ -121,7 +114,6 @@ jobs:
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
dependencySource: ${{ job.dependencySource }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -148,8 +140,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
@@ -191,9 +182,12 @@ jobs:
|
||||
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"
|
||||
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"
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -212,6 +206,18 @@ jobs:
|
||||
componentName: rocprofiler-compute
|
||||
testDir: $(Build.BinariesDirectory)/libexec/rocprofiler-compute
|
||||
testExecutable: ROCM_PATH=$(Agent.BuildDirectory)/rocm ctest
|
||||
- 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/docker-container.yml
|
||||
parameters:
|
||||
aptPackages: ${{ parameters.aptPackages }}
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -22,7 +17,7 @@ jobs:
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
@@ -38,13 +33,19 @@ jobs:
|
||||
parameters:
|
||||
componentName: rocprofiler-register
|
||||
extraBuildFlags: >-
|
||||
-DCMAKE_PREFIX_PATH=$(Build.BinariesDirectory)
|
||||
-DROCPROFILER_REGISTER_BUILD_TESTS=ON
|
||||
-DROCPROFILER_REGISTER_BUILD_SAMPLES=ON
|
||||
-GNinja
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
componentName: rocprofiler-register-tests
|
||||
extraBuildFlags: >-
|
||||
-DCMAKE_PREFIX_PATH=$(Build.BinariesDirectory)
|
||||
-GNinja
|
||||
cmakeBuildDir: 'tests/build'
|
||||
installEnabled: false
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/test.yml
|
||||
parameters:
|
||||
componentName: rocprofiler-register
|
||||
testDir: 'tests/build'
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/manifest.yml
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-upload.yml
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/artifact-links.yml
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -36,7 +31,7 @@ parameters:
|
||||
- pandas
|
||||
- perfetto
|
||||
- pycobertura
|
||||
- "pytest>=6.2.5"
|
||||
- pytest>=6.2.5
|
||||
- pyyaml
|
||||
- name: rocmDependencies
|
||||
type: object
|
||||
@@ -94,7 +89,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- task: Bash@3
|
||||
displayName: Add Python site-packages binaries to path
|
||||
inputs:
|
||||
@@ -131,8 +125,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -6,11 +6,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -21,7 +16,6 @@ parameters:
|
||||
- bzip2
|
||||
- clang
|
||||
- cmake
|
||||
- chrpath
|
||||
- environment-modules
|
||||
- ffmpeg
|
||||
- g++-12
|
||||
@@ -67,7 +61,6 @@ parameters:
|
||||
- rocprofiler-register
|
||||
- rocprofiler-sdk
|
||||
- ROCR-Runtime
|
||||
- roctracer
|
||||
|
||||
- name: jobMatrix
|
||||
type: object
|
||||
@@ -110,7 +103,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- task: Bash@3
|
||||
displayName: Add ROCm binaries to PATH
|
||||
inputs:
|
||||
@@ -132,7 +124,6 @@ jobs:
|
||||
-DDYNINST_BUILD_BOOST=ON
|
||||
-DROCPROFSYS_USE_PAPI=ON
|
||||
-DROCPROFSYS_USE_MPI=ON
|
||||
-DCMAKE_CXX_FLAGS=-I$(Agent.BuildDirectory)/rocm/include/rocjpeg
|
||||
-DGPU_TARGETS=${{ job.target }}
|
||||
-GNinja
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/manifest.yml
|
||||
@@ -156,8 +147,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
timeoutInMinutes: 180
|
||||
variables:
|
||||
@@ -207,7 +197,6 @@ jobs:
|
||||
-DDYNINST_BUILD_BOOST=ON
|
||||
-DROCPROFSYS_USE_PAPI=ON
|
||||
-DROCPROFSYS_USE_MPI=ON
|
||||
-DCMAKE_CXX_FLAGS=-I$(Agent.BuildDirectory)/rocm/include/rocjpeg
|
||||
-DGPU_TARGETS=${{ job.target }}
|
||||
-GNinja
|
||||
- task: Bash@3
|
||||
|
||||
@@ -5,12 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -89,7 +83,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -122,8 +115,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -54,7 +49,7 @@ jobs:
|
||||
variables:
|
||||
- group: common
|
||||
- template: /.azuredevops/variables-global.yml
|
||||
pool:
|
||||
pool:
|
||||
vmImage: ${{ variables.BASE_BUILD_POOL }}
|
||||
workspace:
|
||||
clean: all
|
||||
@@ -70,7 +65,6 @@ jobs:
|
||||
parameters:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -92,8 +86,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -82,7 +77,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -113,8 +107,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -5,11 +5,6 @@ parameters:
|
||||
- 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:
|
||||
@@ -89,7 +84,6 @@ jobs:
|
||||
checkoutRef: ${{ parameters.checkoutRef }}
|
||||
dependencyList: ${{ parameters.rocmDependencies }}
|
||||
gpuTarget: ${{ job.target }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml
|
||||
parameters:
|
||||
extraBuildFlags: >-
|
||||
@@ -119,8 +113,7 @@ jobs:
|
||||
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)
|
||||
not(containsValue(split(variables['DISABLED_${{ upper(job.target) }}_TESTS'], ','), variables['Build.DefinitionName']))
|
||||
)
|
||||
variables:
|
||||
- group: common
|
||||
|
||||
@@ -68,7 +68,7 @@ parameters:
|
||||
default:
|
||||
- cmake
|
||||
- astunparse
|
||||
- "expecttest>=0.2.1"
|
||||
- expecttest>=0.2.1
|
||||
- hypothesis
|
||||
- numpy
|
||||
- psutil
|
||||
@@ -76,8 +76,8 @@ parameters:
|
||||
- requests
|
||||
- setuptools==75.8.0
|
||||
- types-dataclasses
|
||||
- "typing-extensions>=4.8.0"
|
||||
- "sympy>=1.13.0"
|
||||
- typing-extensions>=4.8.0
|
||||
- sympy>=1.13.0
|
||||
- filelock
|
||||
- networkx
|
||||
- jinja2
|
||||
@@ -85,8 +85,8 @@ parameters:
|
||||
- lintrunner
|
||||
- ninja
|
||||
- packaging
|
||||
- "optree>=0.13.0"
|
||||
- "click>=8.0.3"
|
||||
- optree>=0.13.0
|
||||
- click>=8.0.3
|
||||
# list for vision
|
||||
- auditwheel
|
||||
- future
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import json
|
||||
import requests
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
|
||||
def get_builds(entries, gpu_target, output):
|
||||
already_downloaded = {}
|
||||
for entry in entries:
|
||||
already_downloaded = _get_builds(entry, gpu_target, already_downloaded, output)
|
||||
|
||||
def _get_builds(entry, gpu_target, already_downloaded, output):
|
||||
print()
|
||||
print(f"{entry['buildNumber']} - {entry['buildId']} - {entry['repoName']}")
|
||||
if already_downloaded.get(entry['buildId']):
|
||||
print('Skipping, already downloaded from build ' + entry['buildId'])
|
||||
return already_downloaded
|
||||
|
||||
artifacts_url = f"https://dev.azure.com/ROCm-CI/ROCm-CI/_apis/build/builds/{entry['buildId']}/artifacts?api-version=7.1"
|
||||
artifacts = requests.get(artifacts_url).json()
|
||||
for artifact in artifacts['value']:
|
||||
if 'gfx' in artifact['name'] and gpu_target not in artifact['name']:
|
||||
continue
|
||||
|
||||
print('Artifact name: ' + artifact['name'])
|
||||
print('File size: ~' +
|
||||
str(round(int(artifact['resource']['properties']['artifactsize'])/1000000, 2)) + ' MB')
|
||||
download_url = f"{artifact['resource']['downloadUrl']}"
|
||||
download = requests.get(download_url)
|
||||
|
||||
zip_file = Path(output) / f"{artifact['name']}.zip"
|
||||
with open(zip_file, 'wb') as f:
|
||||
f.write(download.content)
|
||||
already_downloaded[entry['buildId']] = True
|
||||
|
||||
return already_downloaded
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Command line tool for downloading external ci artifacts")
|
||||
parser.add_argument('--target', type=str, dest="target", choices=["gfx90a", "gfx942"], help="Target gfx")
|
||||
parser.add_argument('--manifest', type=str, dest="manifest", help='JSON manifest url or path to local manifest')
|
||||
parser.add_argument('--output_dir', type=str, dest="output", help='Path to download directory')
|
||||
args = parser.parse_args()
|
||||
|
||||
manifest = args.manifest
|
||||
gpu_target = args.target
|
||||
|
||||
if not gpu_target:
|
||||
print("Enter the GPU target (gfx942, gfx90a)")
|
||||
gpu_target = input()
|
||||
|
||||
if not manifest:
|
||||
print("Enter the manifest file (URL or local path)")
|
||||
manifest = input()
|
||||
|
||||
if 'http' in manifest:
|
||||
data = requests.get(manifest).json()
|
||||
else:
|
||||
with open(manifest, 'r') as f:
|
||||
data = json.load(f)
|
||||
|
||||
entries = [e for e in data['current']]
|
||||
entries.extend([e for e in data['dependencies']])
|
||||
get_builds(entries, gpu_target, args.output)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -1 +0,0 @@
|
||||
requests
|
||||
@@ -12,11 +12,6 @@ parameters:
|
||||
- name: fileFilter
|
||||
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
|
||||
|
||||
steps:
|
||||
- task: Bash@3
|
||||
@@ -32,23 +27,17 @@ steps:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download ${{ parameters.componentName }}
|
||||
inputs:
|
||||
${{ if eq(parameters.aggregatePipeline, false) }}:
|
||||
buildType: 'specific'
|
||||
project: ROCm-CI
|
||||
definition: ${{ parameters.pipelineId }}
|
||||
specificBuildWithTriggering: true
|
||||
itemPattern: '**/*${{ parameters.fileFilter }}*'
|
||||
# aomp is a special case, since the trigger file is under ROCm/ROCm instead of the component repo
|
||||
${{ if notIn(parameters.componentName, 'aomp') }}:
|
||||
buildVersionToDownload: latestFromBranch # default is 'latest'
|
||||
branchName: refs/heads/${{ parameters.branchName }}
|
||||
allowPartiallySucceededBuilds: $(allowPartiallySucceededBuilds)
|
||||
targetPath: '$(Pipeline.Workspace)/d'
|
||||
${{ else }}:
|
||||
buildType: 'current'
|
||||
itemPattern: '**/${{ parameters.componentName }}*${{ parameters.fileFilter }}*'
|
||||
allowPartiallySucceededBuilds: $(allowPartiallySucceededBuilds)
|
||||
targetPath: '$(Pipeline.Workspace)/d'
|
||||
buildType: 'specific'
|
||||
project: ROCm-CI
|
||||
definition: ${{ parameters.pipelineId }}
|
||||
specificBuildWithTriggering: true
|
||||
itemPattern: '**/*${{ parameters.fileFilter }}*'
|
||||
# aomp is a special case, since the trigger file is under ROCm/ROCm instead of the component repo
|
||||
${{ if notIn(parameters.componentName, 'aomp') }}:
|
||||
buildVersionToDownload: latestFromBranch # default is 'latest'
|
||||
branchName: refs/heads/${{ parameters.branchName }}
|
||||
allowPartiallySucceededBuilds: $(allowPartiallySucceededBuilds)
|
||||
targetPath: '$(Pipeline.Workspace)/d'
|
||||
- task: ExtractFiles@1
|
||||
displayName: Extract ${{ parameters.componentName }}
|
||||
inputs:
|
||||
|
||||
@@ -31,11 +31,6 @@ parameters:
|
||||
- name: setupHIPLibrarySymlinks
|
||||
type: boolean
|
||||
default: false
|
||||
# set to true if doing full build of ROCm stack
|
||||
# and dependencies are pulled from same pipeline
|
||||
- name: aggregatePipeline
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
- name: componentVarList
|
||||
type: object
|
||||
@@ -359,7 +354,6 @@ steps:
|
||||
parameters:
|
||||
componentName: ${{ split(dependency, ':')[0] }}
|
||||
pipelineId: ${{ parameters.componentVarList[split(dependency, ':')[0]].pipelineId }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
${{ if parameters.componentVarList[split(dependency, ':')[0]].hasGpuTarget }}:
|
||||
fileFilter: "${{ split(dependency, ':')[1] }}*${{ parameters.gpuTarget }}"
|
||||
# dependencySource = staging
|
||||
@@ -389,7 +383,6 @@ steps:
|
||||
parameters:
|
||||
componentName: ${{ dependency }}
|
||||
pipelineId: ${{ parameters.componentVarList[dependency].pipelineId }}
|
||||
aggregatePipeline: ${{ parameters.aggregatePipeline }}
|
||||
${{ if parameters.componentVarList[dependency].hasGpuTarget }}:
|
||||
fileFilter: ${{ parameters.gpuTarget }}
|
||||
# dependencySource = staging
|
||||
@@ -463,7 +456,7 @@ steps:
|
||||
displayName: 'List downloaded ROCm files'
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: ls -la1R $(Agent.BuildDirectory)/rocm
|
||||
script: ls -1R $(Agent.BuildDirectory)/rocm
|
||||
- ${{ if eq(parameters.skipLibraryLinking, false) }}:
|
||||
- task: Bash@3
|
||||
displayName: 'Link ROCm shared libraries'
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
# This template creates and uploads a Docker image from the current environment
|
||||
# It uses `docker commit` to do so, which can provide more accurate images than the standard template
|
||||
# It requires the following conditions:
|
||||
# - Job must be run inside a Docker container
|
||||
# - The container's external name must be the same as the container's internal hostname
|
||||
# - Docker must be installed inside said container and given sufficient permissions
|
||||
# Currently, it is only usable for test jobs run on our self-managed systems
|
||||
# Jobs run on Azure VMs will not be able to use this template (most if not all build jobs)
|
||||
|
||||
parameters:
|
||||
- name: gpuTarget
|
||||
type: string
|
||||
default: ''
|
||||
- name: environment
|
||||
type: string
|
||||
default: build
|
||||
values:
|
||||
- build
|
||||
- test
|
||||
- combined
|
||||
- amd
|
||||
- nvidia
|
||||
- name: extraPaths
|
||||
type: string
|
||||
default: ''
|
||||
- name: extraEnvVars
|
||||
type: object
|
||||
default: []
|
||||
- name: forceDockerCreation
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
steps:
|
||||
- task: Bash@3
|
||||
displayName: Commit container and initialize Dockerfile
|
||||
condition: or(and(failed(), not(contains(variables['DOCKER_SKIP_GFX'], variables['JOB_GPU_TARGET']))), ${{ eq(parameters.forceDockerCreation, true) }})
|
||||
inputs:
|
||||
workingDirectory: $(Pipeline.Workspace)
|
||||
targetType: inline
|
||||
script: |
|
||||
docker commit $(hostname) az-ci-temp-image:latest
|
||||
echo "FROM az-ci-temp-image:latest" > Dockerfile
|
||||
echo "RUN sudo groupmod -g $(getent group render | awk -F: '{print $3}') render" >> Dockerfile
|
||||
echo "RUN sudo groupmod -g $(getent group docker | awk -F: '{print $3}') docker" >> Dockerfile
|
||||
echo "ENV PATH='$PATH:${{ parameters.extraPaths }}'" >> Dockerfile
|
||||
echo "ENTRYPOINT [\"/bin/bash\"]" >> Dockerfile
|
||||
- ${{ each extraEnvVar in parameters.extraEnvVars }}:
|
||||
- task: Bash@3
|
||||
displayName: Add extra environment variables
|
||||
condition: or(and(failed(), not(contains(variables['DOCKER_SKIP_GFX'], variables['JOB_GPU_TARGET']))), ${{ eq(parameters.forceDockerCreation, true) }})
|
||||
inputs:
|
||||
workingDirectory: $(Pipeline.Workspace)
|
||||
targetType: inline
|
||||
script: echo "ENV ${{ split(extraEnvVar, ':::')[0] }}='${{ split(extraEnvVar, ':::')[1] }}'" >> Dockerfile
|
||||
- task: Bash@3
|
||||
displayName: Print Dockerfile
|
||||
condition: or(and(failed(), not(contains(variables['DOCKER_SKIP_GFX'], variables['JOB_GPU_TARGET']))), ${{ eq(parameters.forceDockerCreation, true) }})
|
||||
inputs:
|
||||
workingDirectory: $(Pipeline.Workspace)
|
||||
targetType: inline
|
||||
script: cat Dockerfile
|
||||
- task: Docker@2
|
||||
displayName: Build and upload Docker image
|
||||
condition: or(and(failed(), not(contains(variables['DOCKER_SKIP_GFX'], variables['JOB_GPU_TARGET']))), ${{ eq(parameters.forceDockerCreation, true) }})
|
||||
inputs:
|
||||
containerRegistry: 'ContainerService3'
|
||||
${{ if ne(parameters.gpuTarget, '') }}:
|
||||
repository: '$(Build.DefinitionName)-${{ parameters.environment }}-${{ parameters.gpuTarget }}'
|
||||
${{ else }}:
|
||||
repository: '$(Build.DefinitionName)-${{ parameters.environment }}'
|
||||
Dockerfile: '$(Pipeline.Workspace)/Dockerfile'
|
||||
buildContext: '$(Pipeline.Workspace)'
|
||||
- task: Bash@3
|
||||
condition: or(and(failed(), not(contains(variables['DOCKER_SKIP_GFX'], variables['JOB_GPU_TARGET']))), ${{ eq(parameters.forceDockerCreation, true) }})
|
||||
displayName: "!! Docker Image URL !!"
|
||||
inputs:
|
||||
workingDirectory: $(Pipeline.Workspace)
|
||||
targetType: inline
|
||||
${{ if ne(parameters.gpuTarget, '') }}:
|
||||
script: echo "rocmexternalcicd.azurecr.io/$(Build.DefinitionName)-${{ parameters.environment }}-${{ parameters.gpuTarget }}:$(Build.BuildId)" | tr '[:upper:]' '[:lower:]'
|
||||
${{ else }}:
|
||||
script: echo "rocmexternalcicd.azurecr.io/$(Build.DefinitionName)-${{ parameters.environment }}:$(Build.BuildId)" | tr '[:upper:]' '[:lower:]'
|
||||
@@ -334,7 +334,7 @@ steps:
|
||||
- task: Docker@2
|
||||
condition: or(and(failed(), ${{ not(containsValue(parameters.dockerSkipGfx, parameters.gpuTarget)) }}), ${{ eq(parameters.forceDockerCreation, true) }})
|
||||
inputs:
|
||||
containerRegistry: 'ContainerService3'
|
||||
containerRegistry: 'ContainerService'
|
||||
${{ if ne(parameters.gpuTarget, '') }}:
|
||||
repository: '$(Build.DefinitionName)-${{ parameters.environment }}-${{ parameters.gpuTarget }}'
|
||||
${{ else }}:
|
||||
@@ -348,6 +348,6 @@ steps:
|
||||
workingDirectory: $(Pipeline.Workspace)
|
||||
targetType: inline
|
||||
${{ if ne(parameters.gpuTarget, '') }}:
|
||||
script: echo "rocmexternalcicd.azurecr.io/$(Build.DefinitionName)-${{ parameters.environment }}-${{ parameters.gpuTarget }}:$(Build.BuildId)" | tr '[:upper:]' '[:lower:]'
|
||||
script: echo "rocmexternalcicd.azurecr.io/$(Build.DefinitionName)-${{ parameters.environment }}-${{ parameters.gpuTarget }}:$(Build.BuildId)"
|
||||
${{ else }}:
|
||||
script: echo "rocmexternalcicd.azurecr.io/$(Build.DefinitionName)-${{ parameters.environment }}:$(Build.BuildId)" | tr '[:upper:]' '[:lower:]'
|
||||
script: echo "rocmexternalcicd.azurecr.io/$(Build.DefinitionName)-${{ parameters.environment }}:$(Build.BuildId)"
|
||||
|
||||
@@ -54,7 +54,7 @@ steps:
|
||||
fi
|
||||
|
||||
echo "Downloading CK artifact from $ARTIFACT_URL"
|
||||
wget --tries=5 --waitretry=10 --retry-connrefused -nv $ARTIFACT_URL -O $(System.ArtifactsDirectory)/ck.zip
|
||||
wget -nv $ARTIFACT_URL -O $(System.ArtifactsDirectory)/ck.zip
|
||||
unzip $(System.ArtifactsDirectory)/ck.zip -d $(System.ArtifactsDirectory)
|
||||
mkdir -p $(Agent.BuildDirectory)/rocm
|
||||
tar -zxvf $(System.ArtifactsDirectory)/$ARTIFACT_NAME/*.tar.gz -C $(Agent.BuildDirectory)/rocm
|
||||
|
||||
@@ -30,13 +30,13 @@ variables:
|
||||
- name: GFX90A_TEST_POOL
|
||||
value: gfx90a_test_pool
|
||||
- name: LATEST_RELEASE_VERSION
|
||||
value: 6.4.0
|
||||
value: 6.3.4
|
||||
- name: REPO_RADEON_VERSION
|
||||
value: 6.4
|
||||
value: 6.3.4
|
||||
- name: NEXT_RELEASE_VERSION
|
||||
value: 6.5.0
|
||||
value: 6.4.0
|
||||
- name: LATEST_RELEASE_TAG
|
||||
value: rocm-6.4.0
|
||||
value: rocm-6.3.4
|
||||
- name: DOCKER_SKIP_GFX
|
||||
value: gfx90a
|
||||
- name: AMDMIGRAPHX_GFX942_TEST_PIPELINE_ID
|
||||
|
||||
@@ -125,7 +125,8 @@ Some workaround options are as follows:
|
||||
- The `pasid` field in struct `amdsmi_process_info_t` will be deprecated in a future ROCm release.
|
||||
|
||||
```{note}
|
||||
See the full [AMD SMI changelog](https://github.com/ROCm/amdsmi/blob/release/rocm-rel-6.4/CHANGELOG.md) for details, examples, and in-depth descriptions.
|
||||
See the full [AMD SMI changelog](https://github.com/ROCm/amdsmi/blob/release/rocm-rel-6.4/CHANGELOG.md) for details, examples,
|
||||
and in-depth descriptions.
|
||||
```
|
||||
|
||||
### **AMDMIGraphX** (2.12.0)
|
||||
@@ -735,7 +736,8 @@ The following lists the backward incompatible changes planned for upcoming major
|
||||
- Fixed `rsmi_dev_target_graphics_version_get`, `rocm-smi --showhw`, and `rocm-smi --showprod` not displaying graphics version correctly for Instinct MI200 series, MI100 series, and RDNA3-based GPUs.
|
||||
|
||||
```{note}
|
||||
See the full [ROCm SMI changelog](https://github.com/ROCm/rocm_smi_lib/blob/release/rocm-rel-6.4/CHANGELOG.md) for details, examples, and in-depth descriptions.
|
||||
See the full [ROCm SMI changelog](https://github.com/ROCm/rocm_smi_lib/blob/release/rocm-rel-6.4/CHANGELOG.md) for details, examples,
|
||||
and in-depth descriptions.
|
||||
```
|
||||
|
||||
### **ROCm Systems Profiler** (1.0.0)
|
||||
|
||||
14
RELEASE.md
14
RELEASE.md
@@ -634,7 +634,8 @@ Some workaround options are as follows:
|
||||
- The `pasid` field in struct `amdsmi_process_info_t` will be deprecated in a future ROCm release.
|
||||
|
||||
```{note}
|
||||
See the full [AMD SMI changelog](https://github.com/ROCm/amdsmi/blob/release/rocm-rel-6.4/CHANGELOG.md) for details, examples, and in-depth descriptions.
|
||||
See the full [AMD SMI changelog](https://github.com/ROCm/amdsmi/blob/release/rocm-rel-6.4/CHANGELOG.md) for details, examples,
|
||||
and in-depth descriptions.
|
||||
```
|
||||
|
||||
### **AMDMIGraphX** (2.12.0)
|
||||
@@ -766,10 +767,10 @@ See the full [AMD SMI changelog](https://github.com/ROCm/amdsmi/blob/release/roc
|
||||
|
||||
#### Changed
|
||||
|
||||
* `roc-obj` tools is deprecated and will be removed in an upcoming release.
|
||||
* The `roc-obj` tools have been deprecated and will be removed in a future release.
|
||||
|
||||
- Perl package installation is not required, and users will need to install this themselves if they want to.
|
||||
- Support for ROCm Object tooling has moved into `llvm-objdump` provided by package `rocm-llvm`.
|
||||
- `llvm-objdump`, `llvm-objcopy`, and `llvm-readobj` will be enhanced to provide similar functionality as that provided by the `roc-obj` tools . The LLVM tools are available in the `rocm-llvm` pkg.
|
||||
- While not related to the deprecation, also note that the `roc-obj` tools’ package dependency on Perl has been changed to recommended. It is the user’s responsibility to install Perl to use these tools.
|
||||
|
||||
* SDMA retainer logic is removed for engine selection in operation of runtime buffer copy.
|
||||
|
||||
@@ -1244,7 +1245,8 @@ The following lists the backward incompatible changes planned for upcoming major
|
||||
- Fixed `rsmi_dev_target_graphics_version_get`, `rocm-smi --showhw`, and `rocm-smi --showprod` not displaying graphics version correctly for Instinct MI200 series, MI100 series, and RDNA3-based GPUs.
|
||||
|
||||
```{note}
|
||||
See the full [ROCm SMI changelog](https://github.com/ROCm/rocm_smi_lib/blob/release/rocm-rel-6.4/CHANGELOG.md) for details, examples, and in-depth descriptions.
|
||||
See the full [ROCm SMI changelog](https://github.com/ROCm/rocm_smi_lib/blob/release/rocm-rel-6.4/CHANGELOG.md) for details, examples,
|
||||
and in-depth descriptions.
|
||||
```
|
||||
|
||||
### **ROCm Systems Profiler** (1.0.0)
|
||||
@@ -1723,7 +1725,7 @@ and will be disabled in a future release.
|
||||
|
||||
* The `__AMDGCN_WAVEFRONT_SIZE__` macro and `__AMDGCN_WAVEFRONT_SIZE` alias will be removed in an upcoming release.
|
||||
It is recommended to remove any use of this macro. For more information, see
|
||||
[AMDGPU support](https://rocm.docs.amd.com/projects/llvm-project/en/docs-6.3.2/LLVM/clang/html/AMDGPUSupport.html).
|
||||
[AMDGPU support](https://rocm.docs.amd.com/projects/llvm-project/en/docs-6.4.0/LLVM/clang/html/AMDGPUSupport.html).
|
||||
* `warpSize` will only be available as a non-`constexpr` variable. Where required,
|
||||
the wavefront size should be queried via the `warpSize` variable in device code,
|
||||
or via `hipGetDeviceProperties` in host code. Neither of these will result in a compile-time constant.
|
||||
|
||||
@@ -496,7 +496,7 @@ Modules for JAX extensions.
|
||||
- 5.5.0
|
||||
|
||||
Unsupported JAX features
|
||||
--------------------------------------------------------------------------------
|
||||
===============================================================================
|
||||
|
||||
The following GPU-accelerated JAX features are not supported by ROCm for
|
||||
the listed supported JAX versions.
|
||||
@@ -506,12 +506,14 @@ the listed supported JAX versions.
|
||||
|
||||
* - Feature
|
||||
- Description
|
||||
|
||||
* - Mixed Precision with TF32
|
||||
- Mixed precision with TF32 is used for matrix multiplications,
|
||||
convolutions, and other linear algebra operations, particularly in
|
||||
deep learning workloads like CNNs and transformers.
|
||||
|
||||
* - XLA int4 support
|
||||
- 4-bit integer (int4) precision in the XLA compiler.
|
||||
|
||||
* - MOSAIC (GPU)
|
||||
- Mosaic is a library of kernel-building abstractions for JAX's Pallas system
|
||||
- Not Supported
|
||||
|
||||
@@ -12,14 +12,14 @@ subtrees:
|
||||
- file: compatibility/compatibility-matrix.rst
|
||||
title: Compatibility matrix
|
||||
entries:
|
||||
- url: https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html
|
||||
- url: https://rocm.docs.amd.com/projects/install-on-linux/en/${branch}/reference/system-requirements.html
|
||||
title: Linux system requirements
|
||||
- url: https://rocm.docs.amd.com/projects/install-on-windows/en/${branch}/reference/system-requirements.html
|
||||
title: Windows system requirements
|
||||
|
||||
- caption: Install
|
||||
entries:
|
||||
- url: https://rocm.docs.amd.com/projects/install-on-linux/en/latest/
|
||||
- url: https://rocm.docs.amd.com/projects/install-on-linux/en/${branch}/
|
||||
title: ROCm on Linux
|
||||
- url: https://rocm.docs.amd.com/projects/install-on-windows/en/${branch}/
|
||||
title: HIP SDK on Windows
|
||||
|
||||
@@ -2,54 +2,55 @@
|
||||
# This file is autogenerated by pip-compile with Python 3.10
|
||||
# by the following command:
|
||||
#
|
||||
# pip-compile docs/sphinx/requirements.in
|
||||
# pip-compile requirements.in
|
||||
#
|
||||
accessible-pygments==0.0.5
|
||||
# via pydata-sphinx-theme
|
||||
alabaster==1.0.0
|
||||
# via sphinx
|
||||
appnope==0.1.4
|
||||
# via ipykernel
|
||||
asttokens==3.0.0
|
||||
# via stack-data
|
||||
attrs==25.1.0
|
||||
attrs==25.3.0
|
||||
# via
|
||||
# jsonschema
|
||||
# jupyter-cache
|
||||
# referencing
|
||||
babel==2.16.0
|
||||
babel==2.17.0
|
||||
# via
|
||||
# pydata-sphinx-theme
|
||||
# sphinx
|
||||
beautifulsoup4==4.12.3
|
||||
beautifulsoup4==4.13.3
|
||||
# via pydata-sphinx-theme
|
||||
breathe==4.35.0
|
||||
breathe==4.36.0
|
||||
# via rocm-docs-core
|
||||
certifi==2024.8.30
|
||||
certifi==2025.1.31
|
||||
# via requests
|
||||
cffi==1.17.1
|
||||
# via
|
||||
# cryptography
|
||||
# pynacl
|
||||
charset-normalizer==3.4.0
|
||||
charset-normalizer==3.4.1
|
||||
# via requests
|
||||
click==8.1.7
|
||||
click==8.1.8
|
||||
# via
|
||||
# jupyter-cache
|
||||
# sphinx-external-toc
|
||||
comm==0.2.2
|
||||
# via ipykernel
|
||||
cryptography==44.0.1
|
||||
cryptography==44.0.2
|
||||
# via pyjwt
|
||||
debugpy==1.8.12
|
||||
debugpy==1.8.14
|
||||
# via ipykernel
|
||||
decorator==5.1.1
|
||||
decorator==5.2.1
|
||||
# via ipython
|
||||
defusedxml==0.7.1
|
||||
# via sphinxcontrib-datatemplates
|
||||
deprecated==1.2.15
|
||||
deprecated==1.2.18
|
||||
# via pygithub
|
||||
docutils==0.21.2
|
||||
# via
|
||||
# breathe
|
||||
# myst-parser
|
||||
# pydata-sphinx-theme
|
||||
# sphinx
|
||||
@@ -57,16 +58,14 @@ exceptiongroup==1.2.2
|
||||
# via ipython
|
||||
executing==2.2.0
|
||||
# via stack-data
|
||||
fastjsonschema==2.20.0
|
||||
fastjsonschema==2.21.1
|
||||
# via
|
||||
# nbformat
|
||||
# rocm-docs-core
|
||||
gitdb==4.0.11
|
||||
gitdb==4.0.12
|
||||
# via gitpython
|
||||
gitpython==3.1.43
|
||||
gitpython==3.1.44
|
||||
# via rocm-docs-core
|
||||
greenlet==3.1.1
|
||||
# via sqlalchemy
|
||||
idna==3.10
|
||||
# via requests
|
||||
imagesize==1.4.1
|
||||
@@ -77,7 +76,7 @@ importlib-metadata==8.6.1
|
||||
# myst-nb
|
||||
ipykernel==6.29.5
|
||||
# via myst-nb
|
||||
ipython==8.31.0
|
||||
ipython==8.35.0
|
||||
# via
|
||||
# ipykernel
|
||||
# myst-nb
|
||||
@@ -117,9 +116,9 @@ mdit-py-plugins==0.4.2
|
||||
# via myst-parser
|
||||
mdurl==0.1.2
|
||||
# via markdown-it-py
|
||||
myst-nb==1.1.2
|
||||
myst-nb==1.2.0
|
||||
# via rocm-docs-core
|
||||
myst-parser==4.0.0
|
||||
myst-parser==4.0.1
|
||||
# via myst-nb
|
||||
nbclient==0.10.2
|
||||
# via
|
||||
@@ -135,16 +134,17 @@ nest-asyncio==1.6.0
|
||||
packaging==24.2
|
||||
# via
|
||||
# ipykernel
|
||||
# pydata-sphinx-theme
|
||||
# sphinx
|
||||
parso==0.8.4
|
||||
# via jedi
|
||||
pexpect==4.9.0
|
||||
# via ipython
|
||||
platformdirs==4.3.6
|
||||
platformdirs==4.3.7
|
||||
# via jupyter-core
|
||||
prompt-toolkit==3.0.50
|
||||
# via ipython
|
||||
psutil==6.1.1
|
||||
psutil==7.0.0
|
||||
# via ipykernel
|
||||
ptyprocess==0.7.0
|
||||
# via pexpect
|
||||
@@ -152,19 +152,19 @@ pure-eval==0.2.3
|
||||
# via stack-data
|
||||
pycparser==2.22
|
||||
# via cffi
|
||||
pydata-sphinx-theme==0.16.0
|
||||
pydata-sphinx-theme==0.15.4
|
||||
# via
|
||||
# rocm-docs-core
|
||||
# sphinx-book-theme
|
||||
pygithub==2.5.0
|
||||
pygithub==2.6.1
|
||||
# via rocm-docs-core
|
||||
pygments==2.18.0
|
||||
pygments==2.19.1
|
||||
# via
|
||||
# accessible-pygments
|
||||
# ipython
|
||||
# pydata-sphinx-theme
|
||||
# sphinx
|
||||
pyjwt[crypto]==2.10.0
|
||||
pyjwt[crypto]==2.10.1
|
||||
# via pygithub
|
||||
pynacl==1.5.0
|
||||
# via pygithub
|
||||
@@ -178,7 +178,7 @@ pyyaml==6.0.2
|
||||
# rocm-docs-core
|
||||
# sphinx-external-toc
|
||||
# sphinxcontrib-datatemplates
|
||||
pyzmq==26.2.0
|
||||
pyzmq==26.4.0
|
||||
# via
|
||||
# ipykernel
|
||||
# jupyter-client
|
||||
@@ -192,13 +192,13 @@ requests==2.32.3
|
||||
# sphinx
|
||||
rocm-docs-core==1.18.2
|
||||
# via -r requirements.in
|
||||
rpds-py==0.22.3
|
||||
rpds-py==0.24.0
|
||||
# via
|
||||
# jsonschema
|
||||
# referencing
|
||||
six==1.17.0
|
||||
# via python-dateutil
|
||||
smmap==5.0.1
|
||||
smmap==5.0.2
|
||||
# via gitdb
|
||||
snowballstemmer==2.2.0
|
||||
# via sphinx
|
||||
@@ -220,7 +220,7 @@ sphinx==8.1.3
|
||||
# sphinx-sitemap
|
||||
# sphinxcontrib-datatemplates
|
||||
# sphinxcontrib-runcmd
|
||||
sphinx-book-theme==1.1.3
|
||||
sphinx-book-theme==1.1.4
|
||||
# via rocm-docs-core
|
||||
sphinx-copybutton==0.5.2
|
||||
# via rocm-docs-core
|
||||
@@ -228,7 +228,7 @@ sphinx-design==0.6.1
|
||||
# via rocm-docs-core
|
||||
sphinx-external-toc==1.0.1
|
||||
# via rocm-docs-core
|
||||
sphinx-notfound-page==1.0.4
|
||||
sphinx-notfound-page==1.1.0
|
||||
# via rocm-docs-core
|
||||
sphinx-reredirects==0.1.6
|
||||
# via -r requirements.in
|
||||
@@ -250,13 +250,13 @@ sphinxcontrib-runcmd==0.2.0
|
||||
# via sphinxcontrib-datatemplates
|
||||
sphinxcontrib-serializinghtml==2.0.0
|
||||
# via sphinx
|
||||
sqlalchemy==2.0.37
|
||||
sqlalchemy==2.0.40
|
||||
# via jupyter-cache
|
||||
stack-data==0.6.3
|
||||
# via ipython
|
||||
tabulate==0.9.0
|
||||
# via jupyter-cache
|
||||
tomli==2.1.0
|
||||
tomli==2.2.1
|
||||
# via sphinx
|
||||
tornado==6.4.2
|
||||
# via
|
||||
@@ -272,21 +272,22 @@ traitlets==5.14.3
|
||||
# matplotlib-inline
|
||||
# nbclient
|
||||
# nbformat
|
||||
typing-extensions==4.12.2
|
||||
typing-extensions==4.13.2
|
||||
# via
|
||||
# beautifulsoup4
|
||||
# ipython
|
||||
# myst-nb
|
||||
# pydata-sphinx-theme
|
||||
# pygithub
|
||||
# referencing
|
||||
# sqlalchemy
|
||||
urllib3==2.2.3
|
||||
urllib3==2.4.0
|
||||
# via
|
||||
# pygithub
|
||||
# requests
|
||||
wcwidth==0.2.13
|
||||
# via prompt-toolkit
|
||||
wrapt==1.17.0
|
||||
wrapt==1.17.2
|
||||
# via deprecated
|
||||
zipp==3.21.0
|
||||
# via importlib-metadata
|
||||
|
||||
@@ -12,36 +12,17 @@ RELEASE_FLAG?=-r
|
||||
ASAN_DEP:=
|
||||
ifeq (${ENABLE_ADDRESS_SANITIZER},true)
|
||||
ASAN_DEP=lightning
|
||||
SANITIZER_FLAG=--address_sanitizer
|
||||
endif
|
||||
|
||||
# Set STATIC_FLAG for static builds
|
||||
ifeq (${ENABLE_STATIC_BUILDS},true)
|
||||
STATIC_FLAG=-s
|
||||
SANITIZER_FLAG=-a
|
||||
endif
|
||||
|
||||
export INFRA_REPO:=ROCm/tools/rocm-build
|
||||
|
||||
# # commannds to be run at makefile read time
|
||||
# # should only output $$OUT_DIR to stdout
|
||||
# # In an ideal world this would be another target
|
||||
# define INITBUILD
|
||||
# source ${INFRA_REPO}/envsetup.sh >/dev/null 2>&1;
|
||||
# [ -w "$${ROCM_INSTALL_PATH}" ] || sudo mkdir -p -m 775 "$${ROCM_INSTALL_PATH}" ;
|
||||
# sudo chown "$$(id -u):$$(id -g)" "$${ROCM_INSTALL_PATH}" "/home/$$(id -un)" ;
|
||||
# mkdir -p ${HOME}/.ccache ;
|
||||
# echo $${OUT_DIR} ;
|
||||
# endef
|
||||
|
||||
OUT_DIR:=$(shell . ${INFRA_REPO}/envsetup.sh >/dev/null 2>&1 ; echo $${OUT_DIR})
|
||||
ROCM_INSTALL_PATH:=$(shell . ${INFRA_REPO}/envsetup.sh >/dev/null 2>&1 ; echo $${ROCM_INSTALL_PATH})
|
||||
|
||||
$(info OUT_DIR=${OUT_DIR})
|
||||
$(info ROCM_INSTALL_PATH=${ROCM_INSTALL_PATH})
|
||||
|
||||
# define SILENT to be empty to see the runner invocation
|
||||
SILENT?= @
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Internal stuff. Could be put in a different file to hide it.
|
||||
# Internal macros, they need to be defined before being used.
|
||||
@@ -66,8 +47,7 @@ endif
|
||||
# It should not be needed.
|
||||
define adddep =
|
||||
$(strip $(call peval,components+= $(1) $(2))
|
||||
$(call peval,$(1)_DEPS += $(2))
|
||||
$(foreach comp,$(strip $2),$(call peval,${OUT_DIR}/logs/${1}.txt: ${OUT_DIR}/logs/${comp}.txt))
|
||||
$(foreach comp,$(strip $2),$(call peval,${OUT_DIR}/logs/${1}: ${OUT_DIR}/logs/${comp}))
|
||||
)
|
||||
endef
|
||||
# End of internal stuff that is needed at the start of the file
|
||||
@@ -87,7 +67,6 @@ endef
|
||||
|
||||
$(call adddep,amd_smi_lib,${ASAN_DEP})
|
||||
$(call adddep,aqlprofile,${ASAN_DEP} rocr)
|
||||
$(call adddep,aqlprofiletest,lightning rocminfo aqlprofile opencl_on_rocclr hip_on_rocclr)
|
||||
$(call adddep,comgr,lightning devicelibs)
|
||||
$(call adddep,dbgapi,rocr comgr)
|
||||
$(call adddep,devicelibs,lightning)
|
||||
@@ -104,29 +83,27 @@ $(call adddep,rocm-core,${ASAN_DEP})
|
||||
$(call adddep,rocm-gdb,dbgapi)
|
||||
$(call adddep,rocminfo,${ASAN_DEP} rocr)
|
||||
$(call adddep,rocprofiler-register,${ASAN_DEP})
|
||||
$(call adddep,rocprofiler-sdk,${ASAN_DEP} rocr aqlprofile opencl_on_rocclr hip_on_rocclr comgr rccl rocdecode)
|
||||
$(call adddep,rocprofiler-sdk,${ASAN_DEP} rocr aqlprofile opencl_on_rocclr hip_on_rocclr comgr)
|
||||
$(call adddep,rocprofiler-systems,${ASAN_DEP} hipcc rocr hip_on_rocclr rocm_smi_lib rocprofiler roctracer rocprofiler-sdk)
|
||||
$(call adddep,rocprofiler,${ASAN_DEP} rocr roctracer aqlprofile opencl_on_rocclr hip_on_rocclr comgr)
|
||||
$(call adddep,rocprofiler-compute,${ASAN_DEP})
|
||||
$(call adddep,rocr,${ASAN_DEP} lightning rocm_smi_lib devicelibs rocprofiler-register)
|
||||
$(call adddep,rocr_debug_agent,${ASAN_DEP} hip_on_rocclr rocr dbgapi)
|
||||
$(call adddep,rocrsamples,lightning devicelibs rocr )
|
||||
$(call adddep,roctracer,${ASAN_DEP} rocr hip_on_rocclr)
|
||||
|
||||
|
||||
# rocm-dev points to all possible last finish components of Stage1 build.
|
||||
rocm-dev-components :=amd_smi_lib aqlprofile aqlprofiletest comgr dbgapi devicelibs hip_on_rocclr hipcc hipify_clang \
|
||||
rocm-dev-components :=amd_smi_lib aqlprofile comgr dbgapi devicelibs hip_on_rocclr hipcc hipify_clang \
|
||||
lightning rocprofiler-compute opencl_on_rocclr openmp_extras rocm_bandwidth_test rocm_smi_lib \
|
||||
rocm-cmake rocm-core rocm-gdb rocminfo rocprofiler-register rocprofiler-sdk rocprofiler-systems \
|
||||
rocprofiler rocr rocr_debug_agent rocrsamples roctracer
|
||||
$(call adddep,rocm-dev,$(filter-out ${NOBUILD},${rocm-dev-components}))
|
||||
rocprofiler rocr rocr_debug_agent roctracer
|
||||
$(call adddep,rocm-dev,$(filter-out ${NOBUILD} kernel_ubuntu,${rocm-dev-components}))
|
||||
|
||||
$(call adddep,amdmigraphx,hip_on_rocclr half rocblas miopen-hip lightning hipcc hiptensor)
|
||||
$(call adddep,composable_kernel,lightning hipcc hip_on_rocclr rocm-cmake)
|
||||
$(call adddep,half,rocm-cmake)
|
||||
$(call adddep,hipblas-common,lightning)
|
||||
$(call adddep,hipblas,hip_on_rocclr rocblas rocsolver lightning hipcc)
|
||||
$(call adddep,hipblaslt,hip_on_rocclr openmp_extras lightning hipcc hipblas-common roctracer)
|
||||
$(call adddep,hipblaslt,hip_on_rocclr openmp_extras lightning hipcc hipblas-common rocm-dev)
|
||||
$(call adddep,hipcub,hip_on_rocclr rocprim lightning hipcc)
|
||||
$(call adddep,hipfft,hip_on_rocclr openmp_extras rocfft rocrand hiprand lightning hipcc)
|
||||
$(call adddep,hipfort,rocblas hipblas rocsparse hipsparse rocfft hipfft rocrand hiprand rocsolver hipsolver lightning hipcc)
|
||||
@@ -136,34 +113,26 @@ $(call adddep,hipsparse,hip_on_rocclr rocsparse lightning hipcc)
|
||||
$(call adddep,hipsparselt,hip_on_rocclr hipsparse lightning hipcc openmp_extras)
|
||||
$(call adddep,hiptensor,hip_on_rocclr composable_kernel lightning hipcc)
|
||||
$(call adddep,miopen-deps,lightning hipcc)
|
||||
$(call adddep,miopen-hip,rocm-core composable_kernel half hip_on_rocclr miopen-deps hipblas hipblaslt rocrand roctracer lightning hipcc)
|
||||
$(call adddep,miopen-hip,composable_kernel half hip_on_rocclr miopen-deps hipblas hipblaslt rocrand roctracer lightning hipcc)
|
||||
$(call adddep,mivisionx,amdmigraphx miopen-hip rpp lightning hipcc)
|
||||
$(call adddep,rccl,rocm-core hip_on_rocclr rocr lightning hipcc rocm_smi_lib hipify_clang)
|
||||
$(call adddep,rdc,amd_smi_lib rocprofiler-sdk rocm_smi_lib rocprofiler rocmvalidationsuite)
|
||||
$(call adddep,rdc,rocm_smi_lib rocprofiler rocmvalidationsuite)
|
||||
$(call adddep,rocalution,rocblas rocsparse rocrand lightning hipcc)
|
||||
$(call adddep,rocblas,rocminfo hip_on_rocclr openmp_extras lightning hipcc hipblaslt)
|
||||
$(call adddep,rocblas,hip_on_rocclr openmp_extras lightning hipcc hipblaslt)
|
||||
$(call adddep,rocal,mivisionx)
|
||||
$(call adddep,rocdecode,hip_on_rocclr lightning hipcc)
|
||||
$(call adddep,rocdecode,hip_on_rocclr lightning hipcc amdmigraphx)
|
||||
$(call adddep,rocfft,hip_on_rocclr rocrand hiprand lightning hipcc openmp_extras)
|
||||
$(call adddep,rocjpeg,hip_on_rocclr lightning hipcc)
|
||||
$(call adddep,rocjpeg,hip_on_rocclr lightning hipcc rocm-dev)
|
||||
$(call adddep,rocmvalidationsuite,hip_on_rocclr rocr hipblas hiprand hipblaslt rocm-core lightning hipcc rocm_smi_lib)
|
||||
$(call adddep,rocprim,hip_on_rocclr lightning hipcc)
|
||||
$(call adddep,rocrand,hip_on_rocclr lightning hipcc)
|
||||
$(call adddep,rocshmem,rccl )
|
||||
$(call adddep,rocsolver,hip_on_rocclr rocblas rocsparse rocprim lightning hipcc)
|
||||
$(call adddep,rocsparse,hip_on_rocclr rocprim lightning hipcc)
|
||||
$(call adddep,rocthrust,hip_on_rocclr rocprim lightning hipcc)
|
||||
$(call adddep,rocwmma,hip_on_rocclr rocblas lightning hipcc rocm-cmake rocm_smi_lib)
|
||||
$(call adddep,rpp,half lightning hipcc openmp_extras)
|
||||
$(call adddep,transferbench,hip_on_rocclr lightning hipcc)
|
||||
ifneq ($(filter rocm-dev upload-rocm-dev, ${MAKECMDGOALS}),)
|
||||
components = $(rocm-dev-components)
|
||||
endif
|
||||
$(call adddep,rocm,$(filter-out ${NOBUILD} rocm,${components}))
|
||||
|
||||
ifeq ($(DISTRO_NAME),rhel)
|
||||
WHL_GEN :=
|
||||
endif
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# The rest of the file is internal
|
||||
@@ -196,7 +165,7 @@ ifeq (${toplevel},)
|
||||
define toplevel =
|
||||
|
||||
# The "target" make, this builds the package if it is out of date
|
||||
T_$1: ${OUT_DIR}/logs/$1.txt FRC
|
||||
T_$1: ${OUT_DIR}/logs/$1 FRC
|
||||
: $1 built
|
||||
|
||||
# The "upload" for $1, it uploads the packages for $1 to the central storage
|
||||
@@ -207,26 +176,25 @@ U_$1: T_$1 FRC
|
||||
# The "clean" for $1, it just marks the target as not existing so it will be built
|
||||
# in the future.
|
||||
C_$1: FRC
|
||||
rm -f ${OUT_DIR}/logs/$1.txt ${OUT_DIR}/logs/$1.repackaged
|
||||
rm -f ${OUT_DIR}/logs/$1 ${OUT_DIR}/logs/$1.repackaged
|
||||
|
||||
# parallel build
|
||||
${OUT_DIR}/logs/$1.txt: | ${OUT_DIR}/logs
|
||||
ifneq ($(wildcard ${OUT_DIR}/logs/$1.repackaged),) # {
|
||||
# parallel build {
|
||||
${OUT_DIR}/logs/$1: | ${OUT_DIR}/logs
|
||||
ifneq ($(wildcard ${OUT_DIR}/logs/$1.repackaged),)
|
||||
@echo Skipping build of $1 as it has already been repackaged
|
||||
cat $${@:.txt=.repackaged} > $$@
|
||||
rm -f $${@:.txt=.repackaged}
|
||||
cat $$@.repackaged > $$@
|
||||
rm -f $$@.repackaged
|
||||
else # } {
|
||||
@echo $1 started due to $$? | sed "s:${OUT_DIR}/logs/::g"
|
||||
# Build in a subshell so we get the time output
|
||||
# Pass in jobserver info using the RMAKE variable
|
||||
# Allow project specific flags e..g. ROCMBUILD_lightning.
|
||||
${RMAKE}${SILENT}( if set -x && source $${INFRA_REPO}/envsetup.sh && \
|
||||
rm -f $${@:$1.txt=1.Errors.$1.txt} $$@ $${@:.txt=.repackaged} && \
|
||||
$${INFRA_REPO}/runner $1 $${RELEASE_FLAG} $${SANITIZER_FLAG} $${STATIC_FLAG} ${ROCMBUILD_$1}; \
|
||||
then mv $${@:$1.txt=2.Inprogress.$1.txt} $$@ ; \
|
||||
else mv $${@:$1.txt=2.Inprogress.$1.txt} $${@:$1.txt=1.Errors.$1.txt} ;\
|
||||
echo Error in $1 >&2 ; exit 1 ;\
|
||||
fi ) > $${@:$1.txt=2.Inprogress.$1.txt} 2>&1
|
||||
${RMAKE}@( if set -x && source $${INFRA_REPO}/envsetup.sh && \
|
||||
rm -f $$@.errors $$@ $$@.repackaged && \
|
||||
$${INFRA_REPO}/build_$1.sh -c && \
|
||||
time bash -x $${INFRA_REPO}/build_$1.sh $${RELEASE_FLAG} $${SANITIZER_FLAG} && $${INFRA_REPO}/post_inst_pkg.sh "$1" ; \
|
||||
then mv $$@.inprogress $$@ ; \
|
||||
else mv $$@.inprogress $$@.errors ; echo Error in $1 >&2 ; exit 1 ;\
|
||||
fi ) > $$@.inprogress 2>&1
|
||||
endif # }
|
||||
|
||||
# end of toplevel macro
|
||||
@@ -259,45 +227,22 @@ upload-rocm-dev: $(addprefix U_,$(filter-out ${NOBUILD},${components}))
|
||||
rocm-dev: $(addprefix T_,$(filter-out ${NOBUILD},${components}))
|
||||
@echo rocm-dev built
|
||||
|
||||
ifeq ($(DISTRO_NAME),almalinux)
|
||||
@sudo chmod -R 777 "/home/builder"
|
||||
endif
|
||||
|
||||
# This code is broken. It stops us exiting a container and
|
||||
# starting a new one and continueing the build. The attempt
|
||||
# is to have run-once code.
|
||||
${OUT_DIR}/logs:
|
||||
sudo mkdir -p -m 775 "${ROCM_INSTALL_PATH}" && \
|
||||
sudo chown -R "$(shell id -u):$(shell id -g)" "/opt"
|
||||
sudo chown "$(shell id -u):$(shell id -g)" "/home/$(shell id -un)"
|
||||
sudo chown -R "$(shell id -u):$(shell id -g)" "/home/$(shell id -un)"
|
||||
mkdir -p "${@}"
|
||||
mkdir -p ${HOME}/.ccache
|
||||
|
||||
##help clean: remove the output directory and recreate it
|
||||
clean:
|
||||
[ -n "${OUT_DIR}" ] && rm -rf "${OUT_DIR}"
|
||||
# mkdir -p ${OUT_DIR}/logs
|
||||
mkdir -p ${OUT_DIR}/logs
|
||||
|
||||
.SECONDARY: ${components:%=${OUT_DIR}/logs/%}
|
||||
|
||||
.PHONY: all clean repack help list_components
|
||||
|
||||
# get_all_deps: Recursively get all dependencies for a given component.
|
||||
# Usage: $(call get_all_deps,component_name,)
|
||||
# - component_name: The name of the component to get dependencies for.
|
||||
# - The second parameter is an internal parameter used to track already
|
||||
# processed components to avoid circular dependencies.
|
||||
define get_all_deps
|
||||
$(if $(filter $(1),$(2)),,\
|
||||
$(sort $(1) $(foreach d,$($(1)_DEPS),$(call get_all_deps,$d,$(1) $(2))))
|
||||
)
|
||||
endef
|
||||
|
||||
##help deps_<component>: output the dependencies for <component>
|
||||
deps_%:
|
||||
@echo "=== Dependencies for [$*] ==="
|
||||
@echo "$(filter-out $*,$(call get_all_deps,$*,))"
|
||||
|
||||
##help list_components: output the list of components
|
||||
##help : Hint make list_components | paste - - - | column -t
|
||||
list_components:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname "${BASH_SOURCE}")/compute_utils.sh"
|
||||
|
||||
@@ -9,9 +10,7 @@ printUsage() {
|
||||
echo " -c, --clean Removes all amd_smi build artifacts"
|
||||
echo " -r, --release Build non-debug version amd_smi (default is debug)"
|
||||
echo " -a, --address_sanitizer Enable address sanitizer"
|
||||
echo " -s, --static Component/Build does not support static builds just accepting this param & ignore. No effect of the param on this build"
|
||||
echo " -w, --wheel Creates python wheel package of amd-smi.
|
||||
It needs to be used along with -r option"
|
||||
echo " -s, --static Build static lib (.a). build instead of dynamic/shared(.so) "
|
||||
echo " -o, --outdir <pkg_type> Print path of output directory containing packages of type referred to by pkg_type"
|
||||
echo " -p, --package <type> Specify packaging format"
|
||||
echo " -h, --help Prints this help"
|
||||
@@ -26,6 +25,7 @@ printUsage() {
|
||||
PROJ_NAME="amdsmi"
|
||||
PACKAGE_ROOT="$(getPackageRoot)"
|
||||
TARGET="build"
|
||||
|
||||
PACKAGE_LIB=$(getLibPath)
|
||||
PACKAGE_INCLUDE="$(getIncludePath)"
|
||||
AMDSMI_BUILD_DIR=$(getBuildPath $PROJ_NAME)
|
||||
@@ -42,7 +42,7 @@ SHARED_LIBS="ON"
|
||||
CLEAN_OR_OUT=0;
|
||||
PKGTYPE="deb"
|
||||
|
||||
VALID_STR=`getopt -o hcraswo:p: --long help,clean,release,static,wheel,address_sanitizer,outdir:,package: -- "$@"`
|
||||
VALID_STR=`getopt -o hcraso:p: --long help,clean,release,static,address_sanitizer,outdir:,package: -- "$@"`
|
||||
eval set -- "$VALID_STR"
|
||||
|
||||
while true ;
|
||||
@@ -60,8 +60,6 @@ do
|
||||
ADDRESS_SANITIZER=true ; shift ;;
|
||||
(-s | --static)
|
||||
ack_and_skip_static ;;
|
||||
(-w | --wheel)
|
||||
WHEEL_PACKAGE=true ; shift ;;
|
||||
(-o | --outdir)
|
||||
TARGET="outdir"; PKGTYPE=$2 ; OUT_DIR_SPECIFIED=1 ; ((CLEAN_OR_OUT|=2)) ; shift 2 ;;
|
||||
(-p | --package)
|
||||
@@ -137,7 +135,7 @@ verifyEnvSetup
|
||||
|
||||
case $TARGET in
|
||||
(clean) clean_amdsmi ;;
|
||||
(build) build_amdsmi; build_wheel "$AMDSMI_BUILD_DIR" "$PROJ_NAME" ;;
|
||||
(build) build_amdsmi ;;
|
||||
(outdir) print_output_directory ;;
|
||||
(*) die "Invalid target $TARGET" ;;
|
||||
esac
|
||||
|
||||
@@ -1,42 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
set_component_src AMDMIGraphX
|
||||
|
||||
build_amdmigraphx() {
|
||||
echo "Start build"
|
||||
|
||||
if [ "${ENABLE_STATIC_BUILDS}" == "true" ]; then
|
||||
ack_and_skip_static
|
||||
fi
|
||||
|
||||
cd $COMPONENT_SRC
|
||||
|
||||
if ! command -v rbuild &> /dev/null; then
|
||||
pip3 install https://github.com/RadeonOpenCompute/rbuild/archive/master.tar.gz
|
||||
fi
|
||||
|
||||
# Remove CK
|
||||
xargs -d '\n' -a ${OUT_DIR}/ck.files rm -- || true
|
||||
|
||||
if [ "${ENABLE_ADDRESS_SANITIZER}" == "true" ]; then
|
||||
set_asan_env_vars
|
||||
set_address_sanitizer_on
|
||||
fi
|
||||
|
||||
if [ -n "$GPU_ARCHS" ]; then
|
||||
GPU_TARGETS="$GPU_ARCHS"
|
||||
else
|
||||
GPU_TARGETS="gfx900;gfx906;gfx908;gfx90a;gfx1030;gfx1100;gfx1101;gfx1102;gfx942;gfx1200;gfx1201"
|
||||
fi
|
||||
init_rocm_common_cmake_params
|
||||
|
||||
mkdir -p ${BUILD_DIR} && rm -rf ${BUILD_DIR}/* && mkdir -p ${HOME}/amdmigraphx && rm -rf ${HOME}/amdmigraphx/*
|
||||
rbuild package -d "${HOME}/amdmigraphx" -B "${BUILD_DIR}" \
|
||||
--cxx="$(set_build_variables __CLANG++__)" \
|
||||
--cc="$(set_build_variables __CLANG__)" \
|
||||
--cxx="${ROCM_PATH}/llvm/bin/clang++" \
|
||||
--cc="${ROCM_PATH}/llvm/bin/clang" \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--enable-new-dtags,--build-id=sha1,--rpath,$ROCM_LIB_RPATH" \
|
||||
-DGPU_TARGETS="${GPU_TARGETS}" \
|
||||
-DCMAKE_INSTALL_RPATH=""
|
||||
|
||||
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
||||
mkdir -p $PACKAGE_DIR && cp ${BUILD_DIR}/*.${PKGTYPE} $PACKAGE_DIR
|
||||
cd $BUILD_DIR && cmake --build . -- install -j${PROC}
|
||||
|
||||
show_build_cache_stats
|
||||
@@ -51,7 +50,7 @@ clean_amdmigraphx() {
|
||||
stage2_command_args "$@"
|
||||
|
||||
case $TARGET in
|
||||
build) build_amdmigraphx; build_wheel ;;
|
||||
build) build_amdmigraphx ;;
|
||||
outdir) print_output_directory ;;
|
||||
clean) clean_amdmigraphx ;;
|
||||
*) die "Invalid target $TARGET" ;;
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname "${BASH_SOURCE}")/compute_utils.sh"
|
||||
|
||||
printUsage() {
|
||||
echo
|
||||
echo "Usage: $(basename "${BASH_SOURCE}") [-c|-r|-h] [makeopts]"
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " -c, --clean Removes all clang-ocl build artifacts"
|
||||
echo " -r, --release Build non-debug version clang-ocl (default is debug)"
|
||||
echo " -a, --address_sanitizer Enable address sanitizer"
|
||||
echo " -o, --outdir <pkg_type> Print path of output directory containing packages of
|
||||
type referred to by pkg_type"
|
||||
echo " -h, --help Prints this help"
|
||||
echo " -s, --static Supports static CI by accepting this param & not bailing out. No effect of the param though"
|
||||
echo
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
TARGET="build"
|
||||
CLANG_OCL_DEST="$(getBinPath)"
|
||||
CLANG_OCL_SRC_ROOT="$CLANG_OCL_ROOT"
|
||||
CLANG_OCL_BUILD_DIR="$(getBuildPath clang-ocl)"
|
||||
|
||||
MAKEARG="$DASH_JAY"
|
||||
PACKAGE_ROOT="$(getPackageRoot)"
|
||||
PACKAGE_UTILS="$(getUtilsPath)"
|
||||
CLANG_OCL_PACKAGE_DEB="$PACKAGE_ROOT/deb/clang-ocl"
|
||||
CLANG_OCL_PACKAGE_RPM="$PACKAGE_ROOT/rpm/clang-ocl"
|
||||
BUILD_TYPE="Debug"
|
||||
SHARED_LIBS="ON"
|
||||
CLEAN_OR_OUT=0;
|
||||
MAKETARGET="deb"
|
||||
PKGTYPE="deb"
|
||||
|
||||
|
||||
VALID_STR=`getopt -o hcraso:g: --long help,clean,release,clean,static,address_sanitizer,outdir:,gpu_list: -- "$@"`
|
||||
eval set -- "$VALID_STR"
|
||||
|
||||
while true ;
|
||||
do
|
||||
case "$1" in
|
||||
(-h | --help)
|
||||
printUsage ; exit 0;;
|
||||
(-c | --clean)
|
||||
TARGET="clean" ; ((CLEAN_OR_OUT|=1)) ; shift ;;
|
||||
(-r | --release)
|
||||
MAKEARG="$MAKEARG BUILD_TYPE=rel" ; BUILD_TYPE="Release" ; shift ;;
|
||||
(-a | --address_sanitizer)
|
||||
set_asan_env_vars
|
||||
set_address_sanitizer_on ; shift ;;
|
||||
(-s | --static)
|
||||
SHARED_LIBS="OFF" ; shift ;;
|
||||
(-o | --outdir)
|
||||
TARGET="outdir"; PKGTYPE=$2 ; OUT_DIR_SPECIFIED=1 ; ((CLEAN_OR_OUT|=2)) ; shift 2 ;;
|
||||
(-g | --gpu_list )
|
||||
GPU_LIST=$2; shift 2 ;;
|
||||
--) shift; break;;
|
||||
(*)
|
||||
echo " This should never come but just incase : UNEXPECTED ERROR Parm : [$1] ">&2 ; exit 20;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
RET_CONFLICT=1
|
||||
check_conflicting_options $CLEAN_OR_OUT $PKGTYPE $MAKETARGET
|
||||
if [ $RET_CONFLICT -ge 30 ]; then
|
||||
print_vars $API_NAME $TARGET $BUILD_TYPE $SHARED_LIBS $CLEAN_OR_OUT $PKGTYPE $MAKETARGET
|
||||
exit $RET_CONFLICT
|
||||
fi
|
||||
|
||||
clean_clang-ocl() {
|
||||
echo "Removing clang-ocl"
|
||||
rm -rf $CLANG_OCL_DEST/clang-ocl
|
||||
rm -rf $CLANG_OCL_BUILD_DIR
|
||||
rm -rf $CLANG_OCL_PACKAGE_DEB
|
||||
rm -rf $CLANG_OCL_PACKAGE_RPM
|
||||
}
|
||||
|
||||
build_clang-ocl() {
|
||||
if [ ! -d "$CLANG_OCL_BUILD_DIR" ]; then
|
||||
mkdir -p $CLANG_OCL_BUILD_DIR
|
||||
pushd $CLANG_OCL_BUILD_DIR
|
||||
|
||||
if [ -e $PACKAGE_ROOT/lib/bitcode/opencl.amdgcn.bc ]; then
|
||||
BC_DIR="$ROCM_INSTALL_PATH/lib"
|
||||
else
|
||||
BC_DIR="$ROCM_INSTALL_PATH/amdgcn/bitcode"
|
||||
fi
|
||||
|
||||
cmake \
|
||||
$(rocm_cmake_params) \
|
||||
-DDISABLE_CHECKS="ON" \
|
||||
-DCLANG_BIN="$ROCM_INSTALL_PATH/llvm/bin" \
|
||||
-DBITCODE_DIR="$BC_DIR" \
|
||||
$(rocm_common_cmake_params) \
|
||||
-DCPACK_SET_DESTDIR="OFF" \
|
||||
$CLANG_OCL_SRC_ROOT
|
||||
|
||||
echo "Making clang-ocl:"
|
||||
cmake --build . -- $MAKEARG
|
||||
cmake --build . -- $MAKEARG install
|
||||
cmake --build . -- $MAKEARG package
|
||||
popd
|
||||
fi
|
||||
|
||||
copy_if DEB "${CPACKGEN:-"DEB;RPM"}" "$CLANG_OCL_PACKAGE_DEB" $CLANG_OCL_BUILD_DIR/rocm-clang-ocl*.deb
|
||||
copy_if RPM "${CPACKGEN:-"DEB;RPM"}" "$CLANG_OCL_PACKAGE_RPM" $CLANG_OCL_BUILD_DIR/rocm-clang-ocl*.rpm
|
||||
}
|
||||
|
||||
|
||||
print_output_directory() {
|
||||
case ${PKGTYPE} in
|
||||
("deb")
|
||||
echo ${CLANG_OCL_PACKAGE_DEB};;
|
||||
("rpm")
|
||||
echo ${CLANG_OCL_PACKAGE_RPM};;
|
||||
(*)
|
||||
echo "Invalid package type \"${PKGTYPE}\" provided for -o" >&2; exit 1;;
|
||||
esac
|
||||
exit
|
||||
}
|
||||
|
||||
case $TARGET in
|
||||
(clean) clean_clang-ocl ;;
|
||||
(build) build_clang-ocl ;;
|
||||
(outdir) print_output_directory ;;
|
||||
(*) die "Invalid target $TARGET" ;;
|
||||
esac
|
||||
|
||||
echo "Operation complete"
|
||||
exit 0
|
||||
|
||||
@@ -14,7 +14,6 @@ printUsage() {
|
||||
type referred to by pkg_type"
|
||||
echo " -h, --help Prints this help"
|
||||
echo " -s, --static Build static lib (.a). build instead of dynamic/shared(.so) "
|
||||
echo " -w, --wheel Creates python wheel package of comgr. It needs to be used along with -r option"
|
||||
echo " -l, --link_llvm_static Link to LLVM statically. Default is to dynamically link to LLVM; requires that LLVM dylibs are created."
|
||||
echo
|
||||
echo "Possible values for <type>:"
|
||||
@@ -25,7 +24,6 @@ printUsage() {
|
||||
return 0
|
||||
}
|
||||
|
||||
## Build environment variables
|
||||
API_NAME=amd_comgr
|
||||
PROJ_NAME=$API_NAME
|
||||
LIB_NAME=lib${API_NAME}
|
||||
@@ -35,8 +33,8 @@ PACKAGE_ROOT=$(getPackageRoot)
|
||||
PACKAGE_LIB=$(getLibPath)
|
||||
PACKAGE_INCLUDE=$(getIncludePath)
|
||||
BUILD_DIR=$(getBuildPath $API_NAME)
|
||||
PACKAGE_DEB=$PACKAGE_ROOT/deb/$PROJ_NAME
|
||||
PACKAGE_RPM=$PACKAGE_ROOT/rpm/$PROJ_NAME
|
||||
PACKAGE_DEB=$(getPackageRoot)/deb/$API_NAME
|
||||
PACKAGE_RPM=$(getPackageRoot)/rpm/$API_NAME
|
||||
PACKAGE_PREFIX=$ROCM_INSTALL_PATH
|
||||
BUILD_TYPE=Debug
|
||||
MAKE_OPTS="$DASH_JAY CTEST_OUTPUT_ON_FAILURE=1 -C $BUILD_DIR"
|
||||
@@ -46,17 +44,13 @@ CLEAN_OR_OUT=0;
|
||||
PKGTYPE="deb"
|
||||
MAKETARGET="deb"
|
||||
|
||||
# link to LLVM dynamicaly. Default is to link to llvm dynamically.
|
||||
# temporarily set this default to OFF until we resolve Issues
|
||||
LINK_LLVM_DYLIB="OFF"
|
||||
|
||||
#parse the arguments
|
||||
VALID_STR=`getopt -o hcraswlo:p: --long help,clean,release,address_sanitizer,static,wheel,link_llvm_static,outdir:,package: -- "$@"`
|
||||
VALID_STR=`getopt -o hcraslo:p: --long help,clean,release,address_sanitizer,static,link_llvm_static,outdir:,package: -- "$@"`
|
||||
eval set -- "$VALID_STR"
|
||||
|
||||
while true ;
|
||||
do
|
||||
#echo "parocessing $1"
|
||||
case "$1" in
|
||||
(-h | --help)
|
||||
printUsage ; exit 0;;
|
||||
@@ -69,8 +63,6 @@ do
|
||||
set_address_sanitizer_on ; shift ;;
|
||||
(-s | --static)
|
||||
SHARED_LIBS="OFF" ; shift ;;
|
||||
(-w | --wheel)
|
||||
WHEEL_PACKAGE=true ; shift ;;
|
||||
(-l | --link_llvm_static)
|
||||
LINK_LLVM_DYLIB="OFF"; shift ;;
|
||||
(-o | --outdir)
|
||||
@@ -113,7 +105,6 @@ build() {
|
||||
echo " Building Shared Object "
|
||||
fi
|
||||
|
||||
# Remove CTEST var once SWDEV-381396 is fixed
|
||||
cmake \
|
||||
$(rocm_cmake_params) \
|
||||
-DBUILD_SHARED_LIBS=$SHARED_LIBS \
|
||||
@@ -152,7 +143,7 @@ verifyEnvSetup
|
||||
|
||||
case $TARGET in
|
||||
(clean) clean ;;
|
||||
(build) build; build_wheel "$BUILD_DIR" "$PROJ_NAME" ;;
|
||||
(build) build ;;
|
||||
(outdir) print_output_directory ;;
|
||||
(*) die "Invalid target $TARGET" ;;
|
||||
esac
|
||||
|
||||
@@ -2,14 +2,10 @@
|
||||
|
||||
set -ex
|
||||
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
|
||||
# Temporarily disable Address Sanitizer
|
||||
ENABLE_ADDRESS_SANITIZER=false
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
set_component_src composable_kernel
|
||||
disable_debug_package_generation
|
||||
# Set the GPU_ARCH_LIST to the supported GPUs needed after https://github.com/ROCm/composable_kernel/pull/1536/
|
||||
|
||||
GPU_ARCH_LIST="gfx908;gfx90a;gfx942;gfx1030;gfx1100;gfx1101;gfx1102;gfx1200;gfx1201"
|
||||
|
||||
build_miopen_ck() {
|
||||
@@ -27,17 +23,10 @@ build_miopen_ck() {
|
||||
GPU_ARCH_LIST="gfx942"
|
||||
ack_and_skip_static
|
||||
fi
|
||||
# if ENABLE_GPU_ARCH is set in env by Job parameter ENABLE_GPU_ARCH, then set GPU_ARCH_LIST to that value
|
||||
# This needs to be removed when CK aligns with other component and uses -DAMDGPU_TARGET or _DGPO_TARGET
|
||||
# then we can use set_gpu_arch from compure_helper.sh and get rid of all if clauses
|
||||
if [ -n "$ENABLE_GPU_ARCH" ]; then
|
||||
GPU_ARCH_LIST="$ENABLE_GPU_ARCH"
|
||||
fi
|
||||
# Latest CK requiring Python 3.8 as the minimum.
|
||||
# Point CMake to that explicit location and adjust LD_LIBRARY_PATH.
|
||||
|
||||
PYTHON_VERSION_WORKAROUND=''
|
||||
echo "DISTRO_ID: ${DISTRO_ID}"
|
||||
if [ "$DISTRO_ID" = "rhel-8.8" ] || [ "$DISTRO_NAME" == "sles" ] || [ "$DISTRO_ID" = "debian-10" ]; then
|
||||
if [ "$DISTRO_ID" = "rhel-8.8" ] || [ "$DISTRO_ID" = "sles-15.5" ] ; then
|
||||
EXTRA_PYTHON_PATH=/opt/Python-3.8.13
|
||||
PYTHON_VERSION_WORKAROUND="-DCK_USE_ALTERNATIVE_PYTHON=${EXTRA_PYTHON_PATH}/bin/python3.8"
|
||||
# For the python interpreter we need to export LD_LIBRARY_PATH.
|
||||
@@ -53,20 +42,19 @@ build_miopen_ck() {
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
${PYTHON_VERSION_WORKAROUND} \
|
||||
-DCPACK_GENERATOR="${PKGTYPE^^}" \
|
||||
-DCMAKE_CXX_COMPILER=$(set_build_variables __CLANG++__) \
|
||||
-DCMAKE_C_COMPILER=$(set_build_variables __CLANG__) \
|
||||
-DCMAKE_CXX_COMPILER="${ROCM_PATH}/llvm/bin/clang++" \
|
||||
-DCMAKE_C_COMPILER="${ROCM_PATH}/llvm/bin/clang" \
|
||||
${LAUNCHER_FLAGS} \
|
||||
-DGPU_ARCHS="${GPU_ARCH_LIST}" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CXX_FLAGS=" -O3 " \
|
||||
"$COMPONENT_SRC"
|
||||
|
||||
cmake --build . -- -j${PROC} package
|
||||
cmake --build "$BUILD_DIR" -- install
|
||||
|
||||
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
||||
mkdir -p $PACKAGE_DIR && cp ./*.${PKGTYPE} $PACKAGE_DIR
|
||||
}
|
||||
|
||||
# Use the function to unset the LDFLAGS and CXXFLAGS
|
||||
# specifically set for ASAN
|
||||
unset_asan_env_vars() {
|
||||
ASAN_CMAKE_PARAMS="false"
|
||||
export ADDRESS_SANITIZER="OFF"
|
||||
@@ -80,6 +68,85 @@ set_address_sanitizer_off() {
|
||||
export LDFLAGS=""
|
||||
}
|
||||
|
||||
build_miopen_ckProf() {
|
||||
ENABLE_ADDRESS_SANITIZER=false
|
||||
echo "Start Building Composable Kernel Profiler"
|
||||
if [ "${ENABLE_ADDRESS_SANITIZER}" == "true" ]; then
|
||||
set_asan_env_vars
|
||||
set_address_sanitizer_on
|
||||
else
|
||||
unset_asan_env_vars
|
||||
set_address_sanitizer_off
|
||||
fi
|
||||
|
||||
cd $COMPONENT_SRC
|
||||
cd "$BUILD_DIR"
|
||||
rm -rf *
|
||||
|
||||
architectures='gfx10 gfx11 gfx90 gfx94'
|
||||
if [ -n "$GPU_ARCHS" ]; then
|
||||
architectures=$(echo ${GPU_ARCHS} | awk -F';' '{for(i=1;i<=NF;i++) a[substr($i,1,5)]} END{for(i in a) printf i" "}')
|
||||
fi
|
||||
|
||||
for arch in ${architectures}
|
||||
do
|
||||
if [ "${ASAN_CMAKE_PARAMS}" == "true" ] ; then
|
||||
cmake -DBUILD_DEV=OFF \
|
||||
-DCMAKE_PREFIX_PATH="${ROCM_PATH%-*}/lib/cmake;${ROCM_PATH%-*}/$ASAN_LIBDIR;${ROCM_PATH%-*}/llvm;${ROCM_PATH%-*}" \
|
||||
-DCMAKE_BUILD_TYPE=${BUILD_TYPE:-'RelWithDebInfo'} \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-Wl,--enable-new-dtags,--rpath,$ROCM_ASAN_LIB_RPATH" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS_INIT="-Wl,--enable-new-dtags,--rpath,$ROCM_ASAN_EXE_RPATH" \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=1 \
|
||||
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE \
|
||||
-DCMAKE_INSTALL_PREFIX="${ROCM_PATH}" \
|
||||
-DCMAKE_PACKAGING_INSTALL_PREFIX="${ROCM_PATH}" \
|
||||
-DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \
|
||||
-DROCM_SYMLINK_LIBS=OFF \
|
||||
-DCPACK_PACKAGING_INSTALL_PREFIX="${ROCM_PATH}" \
|
||||
-DROCM_DISABLE_LDCONFIG=ON \
|
||||
-DROCM_PATH="${ROCM_PATH}" \
|
||||
-DCPACK_GENERATOR="${PKGTYPE^^}" \
|
||||
-DCMAKE_CXX_COMPILER="${ROCM_PATH}/llvm/bin/clang++" \
|
||||
-DCMAKE_C_COMPILER="${ROCM_PATH}/llvm/bin/clang" \
|
||||
${LAUNCHER_FLAGS} \
|
||||
-DPROFILER_ONLY=ON \
|
||||
-DENABLE_ASAN_PACKAGING=true \
|
||||
-DGPU_ARCH="${arch}" \
|
||||
"$COMPONENT_SRC"
|
||||
else
|
||||
cmake -DBUILD_DEV=OFF \
|
||||
-DCMAKE_PREFIX_PATH="${ROCM_PATH%-*}" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS_INIT='-Wl,--enable-new-dtags,--rpath,$ORIGIN' \
|
||||
-DCMAKE_EXE_LINKER_FLAGS_INIT='-Wl,--enable-new-dtags,--rpath,$ORIGIN/../lib' \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=1 \
|
||||
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE \
|
||||
-DCMAKE_INSTALL_PREFIX="${ROCM_PATH}" \
|
||||
-DCMAKE_PACKAGING_INSTALL_PREFIX="${ROCM_PATH}" \
|
||||
-DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \
|
||||
-DROCM_SYMLINK_LIBS=OFF \
|
||||
-DCPACK_PACKAGING_INSTALL_PREFIX="${ROCM_PATH}" \
|
||||
-DROCM_DISABLE_LDCONFIG=ON \
|
||||
-DROCM_PATH="${ROCM_PATH}" \
|
||||
-DCPACK_GENERATOR="${PKGTYPE^^}" \
|
||||
-DCMAKE_CXX_COMPILER="${ROCM_PATH}/llvm/bin/clang++" \
|
||||
-DCMAKE_C_COMPILER="${ROCM_PATH}/llvm/bin/clang" \
|
||||
${LAUNCHER_FLAGS} \
|
||||
-DPROFILER_ONLY=ON \
|
||||
-DGPU_ARCH="${arch}" \
|
||||
"$COMPONENT_SRC"
|
||||
fi
|
||||
|
||||
cmake --build . -- -j${PROC} package
|
||||
cp ./*ckprofiler*.${PKGTYPE} $PACKAGE_DIR
|
||||
rm -rf *
|
||||
done
|
||||
rm -rf _CPack_Packages/ && find -name '*.o' -delete
|
||||
|
||||
echo "Finished building Composable Kernel"
|
||||
show_build_cache_stats
|
||||
}
|
||||
|
||||
clean_miopen_ck() {
|
||||
echo "Cleaning MIOpen-CK build directory: ${BUILD_DIR} ${PACKAGE_DIR}"
|
||||
rm -rf "$BUILD_DIR" "$PACKAGE_DIR"
|
||||
@@ -89,7 +156,7 @@ clean_miopen_ck() {
|
||||
stage2_command_args "$@"
|
||||
|
||||
case $TARGET in
|
||||
build) build_miopen_ck; build_wheel ;;
|
||||
build) build_miopen_ck ;;
|
||||
outdir) print_output_directory ;;
|
||||
clean) clean_miopen_ck ;;
|
||||
*) die "Invalid target $TARGET" ;;
|
||||
|
||||
@@ -11,8 +11,6 @@ printUsage() {
|
||||
echo " -r, --release Make a release build instead of a debug build"
|
||||
echo " --enable-assertions Enable assertions"
|
||||
echo " -a, --address_sanitizer Enable address sanitizer"
|
||||
echo " -w, --wheel Creates python wheel package of dbgapi.
|
||||
It needs to be used along with -r option"
|
||||
echo " -o, --outdir <pkg_type> Print path of output directory containing packages of
|
||||
type referred to by pkg_type"
|
||||
echo " -h, --help Prints this help"
|
||||
@@ -27,7 +25,6 @@ printUsage() {
|
||||
return 0
|
||||
}
|
||||
|
||||
## Build environment variables
|
||||
API_NAME=rocm-dbgapi
|
||||
AMD_DBGAPI_NAME=amd-dbgapi
|
||||
MAKEINSTALL_MANIFEST=makeinstall_manifest.txt
|
||||
@@ -39,24 +36,21 @@ PACKAGE_ROOT=$(getPackageRoot)
|
||||
PACKAGE_LIB=$(getLibPath)
|
||||
PACKAGE_INCLUDE=$(getIncludePath)
|
||||
BUILD_DIR=$(getBuildPath $API_NAME)
|
||||
PACKAGE_DEB=$(getPackageRoot)/deb/$PROJ_NAME
|
||||
PACKAGE_RPM=$(getPackageRoot)/rpm/$PROJ_NAME
|
||||
#PACKAGE_PREFIX=$ROCM_INSTALL_PATH
|
||||
PACKAGE_DEB=$(getPackageRoot)/deb/$API_NAME
|
||||
PACKAGE_RPM=$(getPackageRoot)/rpm/$API_NAME
|
||||
BUILD_TYPE=Debug
|
||||
MAKE_OPTS=($DASH_JAY -C "$BUILD_DIR") # Note that DASH_JAY might have a space after the -j
|
||||
MAKE_OPTS=($DASH_JAY -C "$BUILD_DIR")
|
||||
SHARED_LIBS="ON"
|
||||
CLEAN_OR_OUT=0;
|
||||
MAKETARGET="deb"
|
||||
PKGTYPE="deb"
|
||||
DODOCSBUILD=true
|
||||
|
||||
#parse the arguments
|
||||
VALID_STR=$(getopt -o hcraswo:p:M --long help,clean,release,enable-assertions,static,wheel,address_sanitizer,outdir:,package:skip_man_pages -- "$@")
|
||||
VALID_STR=$(getopt -o hcraso:p:M --long help,clean,release,enable-assertions,static,address_sanitizer,outdir:,package:skip_man_pages -- "$@")
|
||||
eval set -- "$VALID_STR"
|
||||
|
||||
while true ;
|
||||
do
|
||||
#echo "parocessing $1"
|
||||
case "$1" in
|
||||
(-h | --help)
|
||||
printUsage ; exit 0;;
|
||||
@@ -72,14 +66,12 @@ do
|
||||
set_address_sanitizer_on ;;
|
||||
(-s | --static)
|
||||
ack_and_skip_static ;;
|
||||
(-w | --wheel)
|
||||
WHEEL_PACKAGE=true ;;
|
||||
(-o | --outdir)
|
||||
TARGET="outdir"; PKGTYPE=$2 ; ((CLEAN_OR_OUT|=2)) ; shift 1 ;;
|
||||
(-M | --skip_man_pages) DODOCSBUILD=false;;
|
||||
(-p | --package)
|
||||
MAKETARGET="$2" ; shift 1;;
|
||||
--) shift; break;; # end delimiter
|
||||
--) shift; break;;
|
||||
(*)
|
||||
echo " This should never come but just incase : UNEXPECTED ERROR Parm : [$1] ">&2 ; exit 20;;
|
||||
esac
|
||||
@@ -112,7 +104,7 @@ build() {
|
||||
then
|
||||
echo " No $ROCM_DBGAPI_ROOT/CMakeLists.txt file, skipping rocm-dbgapi" >&2
|
||||
echo " No $ROCM_DBGAPI_ROOT/CMakeLists.txt file, skipping rocm-dbgapi"
|
||||
exit 0 # THis is not an error
|
||||
exit 0
|
||||
fi
|
||||
echo "Building $PROJ_NAME"
|
||||
|
||||
@@ -129,14 +121,11 @@ build() {
|
||||
cmake --build "$BUILD_DIR" -- "${MAKE_OPTS[@]}"
|
||||
"$DODOCSBUILD" && cmake --build "$BUILD_DIR" -- "${MAKE_OPTS[@]}" doc
|
||||
cmake --build "$BUILD_DIR" -- "${MAKE_OPTS[@]}" install
|
||||
#install_manifest.txt is created by make install and make package with same name unless
|
||||
#component packaging is enabled. To avoid overwriting by make package,move the manifest file
|
||||
#to a different name and can be used for build clean up
|
||||
|
||||
mv "$BUILD_DIR/install_manifest.txt" "$BUILD_DIR/$MAKEINSTALL_MANIFEST"
|
||||
cmake --build "$BUILD_DIR" -- "${MAKE_OPTS[@]}" package
|
||||
|
||||
mkdir -p "$PACKAGE_LIB"
|
||||
# handle the library being in more than one place to avoid breaking the build.
|
||||
(
|
||||
shopt -s nullglob
|
||||
cp -R "$BUILD_DIR/lib/${LIB_NAME}"* "$BUILD_DIR/${LIB_NAME}"* "$PACKAGE_LIB"
|
||||
@@ -162,7 +151,7 @@ verifyEnvSetup
|
||||
|
||||
case $TARGET in
|
||||
(clean) clean ;;
|
||||
(build) build; build_wheel "$BUILD_DIR" "$PROJ_NAME";;
|
||||
(build) build ;;
|
||||
(outdir) print_output_directory ;;
|
||||
(*) die "Invalid target $TARGET" ;;
|
||||
esac
|
||||
|
||||
@@ -10,9 +10,7 @@ printUsage() {
|
||||
echo " -c, --clean Clean output and delete all intermediate work"
|
||||
echo " -r, --release Build a release version of the package"
|
||||
echo " -a, --address_sanitizer Enable address sanitizer"
|
||||
echo " -s, --static Build static lib (.a). build instead of dynamic/shared(.so) "
|
||||
echo " -w, --wheel Creates python wheel package of devicelibs.
|
||||
It needs to be used along with -r option"
|
||||
echo " -s, --static Supports static CI by accepting this param & not bailing out. No effect of the param though"
|
||||
echo " -o, --outdir <pkg_type> Print path of output directory containing packages of
|
||||
type referred to by pkg_type"
|
||||
echo " -h, --help Prints this help"
|
||||
@@ -21,11 +19,10 @@ printUsage() {
|
||||
|
||||
return 0
|
||||
}
|
||||
PROJ_NAME="devicelibs"
|
||||
PACKAGE_ROOT="$(getPackageRoot)"
|
||||
PACKAGE_BIN="$(getBinPath)"
|
||||
PACKAGE_LIB="$(getLibPath)"
|
||||
BUILD_PATH="$(getBuildPath $PROJ_NAME)"
|
||||
BUILD_PATH="$(getBuildPath devicelibs)"
|
||||
INSTALL_PATH="$(getPackageRoot)"
|
||||
LIGHTNING_BUILD_PATH="$(getBuildPath lightning)"
|
||||
DEB_PATH="$(getDebPath devicelibs)"
|
||||
@@ -39,13 +36,11 @@ CLEAN_OR_OUT=0;
|
||||
PKGTYPE="deb"
|
||||
MAKETARGET="deb"
|
||||
|
||||
#parse the arguments
|
||||
VALID_STR=`getopt -o hcraswo: --long help,clean,release,static,wheel,address_sanitizer,outdir: -- "$@"`
|
||||
VALID_STR=`getopt -o hcraso: --long help,clean,release,static,address_sanitizer,outdir: -- "$@"`
|
||||
eval set -- "$VALID_STR"
|
||||
|
||||
while true ;
|
||||
do
|
||||
#echo "parocessing $1"
|
||||
case "$1" in
|
||||
(-h | --help)
|
||||
printUsage ; exit 0;;
|
||||
@@ -58,8 +53,6 @@ do
|
||||
ack_and_ignore_asan ; shift ;;
|
||||
(-s | --static)
|
||||
SHARED_LIBS="OFF" ; shift ;;
|
||||
(-w | --wheel)
|
||||
WHEEL_PACKAGE=true ; shift ;;
|
||||
(-o | --outdir)
|
||||
TARGET="outdir"; PKGTYPE=$2 ; OUT_DIR_SPECIFIED=1 ; ((CLEAN_OR_OUT|=2)) ; shift 2 ;;
|
||||
--) shift; break;; # end delimiter
|
||||
@@ -78,9 +71,7 @@ fi
|
||||
|
||||
|
||||
clean_devicelibs() {
|
||||
# Delete cmake output directory
|
||||
rm -rf "$BUILD_PATH"
|
||||
# Delete the *.bc files from the PACKAGE_LIB directory
|
||||
rm -f $PACKAGE_LIB/hc*.bc
|
||||
rm -f $PACKAGE_LIB/irif*.bc
|
||||
rm -f $PACKAGE_LIB/ockl*.bc
|
||||
@@ -89,7 +80,6 @@ clean_devicelibs() {
|
||||
rm -f $PACKAGE_LIB/opencl*.bc
|
||||
rm -f $PACKAGE_LIB/openmp*.bc
|
||||
rm -rf $PACKAGE_ROOT/amdgcn
|
||||
# Delete any packages generated
|
||||
rm -rf "$DEB_PATH"
|
||||
rm -rf "$RPM_PATH"
|
||||
}
|
||||
@@ -106,7 +96,6 @@ build_devicelibs() {
|
||||
if [ ! -e Makefile ]; then
|
||||
cmake $(rocm_cmake_params) \
|
||||
$(rocm_common_cmake_params) \
|
||||
${GEN_NINJA} \
|
||||
-DBUILD_SHARED_LIBS=$SHARED_LIBS \
|
||||
-DROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW="$bitcodeInstallLoc/amdgcn" \
|
||||
-DROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_OLD="amdgcn" \
|
||||
@@ -144,7 +133,7 @@ print_output_directory() {
|
||||
}
|
||||
case $TARGET in
|
||||
(clean) clean_devicelibs ;;
|
||||
(build) build_devicelibs; package_devicelibs; build_wheel "$BUILD_PATH" "$PROJ_NAME" ;;
|
||||
(build) build_devicelibs; package_devicelibs ;;
|
||||
(outdir) print_output_directory ;;
|
||||
(*) die "Invalid target $TARGET" ;;
|
||||
esac
|
||||
|
||||
@@ -1,31 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
set_component_src half
|
||||
|
||||
build_half() {
|
||||
echo "Start build"
|
||||
|
||||
if [ "${ENABLE_STATIC_BUILDS}" == "true" ]; then
|
||||
ack_and_skip_static
|
||||
fi
|
||||
|
||||
if [ "${ENABLE_ADDRESS_SANITIZER}" == "true" ]; then
|
||||
set_asan_env_vars
|
||||
set_address_sanitizer_on
|
||||
# ASAN packaging is not required for HALF, since its header only package
|
||||
# Setting the asan_cmake_params to false will disable ASAN packaging
|
||||
ASAN_CMAKE_PARAMS="false"
|
||||
fi
|
||||
mkdir -p "$BUILD_DIR" && cd "$BUILD_DIR"
|
||||
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX="$ROCM_PATH" \
|
||||
-DCPACK_PACKAGING_INSTALL_PREFIX=${ROCM_PATH}\
|
||||
-DCPACK_SET_DESTDIR="OFF" \
|
||||
-DCPACK_RPM_PACKAGE_RELOCATABLE="ON" \
|
||||
-DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \
|
||||
"$COMPONENT_SRC"
|
||||
|
||||
@@ -34,7 +25,7 @@ build_half() {
|
||||
cmake --build "$BUILD_DIR" -- install
|
||||
|
||||
rm -rf _CPack_Packages/ && find -name '*.o' -delete
|
||||
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
||||
mkdir -p $PACKAGE_DIR && cp ${BUILD_DIR}/*.${PKGTYPE} $PACKAGE_DIR
|
||||
|
||||
show_build_cache_stats
|
||||
}
|
||||
@@ -48,7 +39,7 @@ clean_half() {
|
||||
stage2_command_args "$@"
|
||||
|
||||
case $TARGET in
|
||||
build) build_half; build_wheel ;;
|
||||
build) build_half ;;
|
||||
outdir) print_output_directory ;;
|
||||
clean) clean_half ;;
|
||||
*) die "Invalid target $TARGET" ;;
|
||||
|
||||
@@ -10,8 +10,6 @@ printUsage() {
|
||||
echo " -r, --release Make a release build instead of a debug build"
|
||||
echo " -a, --address_sanitizer Enable address sanitizer"
|
||||
echo " -s, --static Build static lib (.a). build instead of dynamic/shared(.so) "
|
||||
echo " -w, --wheel Creates python wheel package of hip-on-rocclr.
|
||||
It needs to be used along with -r option"
|
||||
echo " -o, --outdir <pkg_type> Print path of output directory containing packages of type referred to by pkg_type"
|
||||
echo " -t, --offload-arch=<arch> Specify arch for catch tests ex: --offload-arch=gfx1030 --offload-arch=gfx1100"
|
||||
echo " -p, --package <type> Specify packaging format"
|
||||
@@ -27,6 +25,7 @@ printUsage() {
|
||||
source "$(dirname "${BASH_SOURCE}")/compute_utils.sh"
|
||||
MAKEOPTS="$DASH_JAY"
|
||||
PROJ_NAME="hip-on-rocclr"
|
||||
|
||||
BUILD_PATH="$(getBuildPath $PROJ_NAME)"
|
||||
|
||||
TARGET="build"
|
||||
@@ -54,10 +53,9 @@ MAKETARGET="deb"
|
||||
PKGTYPE="deb"
|
||||
OFFLOAD_ARCH=()
|
||||
|
||||
DEFAULT_OFFLOAD_ARCH=(gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1031 gfx1033 gfx1034 gfx1035 gfx1100 gfx1101 gfx1102 gfx1103 gfx1150 gfx1151 gfx1200 gfx1201)
|
||||
DEFAULT_OFFLOAD_ARCH=(gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1031 gfx1033 gfx1034 gfx1035 gfx1100 gfx1101 gfx1102 gfx1200 gfx1201)
|
||||
|
||||
#parse the arguments
|
||||
VALID_STR=`getopt -o hcraswt:o: --long help,clean,release,address_sanitizer,static,wheel,offload-arch=:,outdir: -- "$@"`
|
||||
VALID_STR=`getopt -o hcrast:o: --long help,clean,release,address_sanitizer,static,offload-arch=:,outdir: -- "$@"`
|
||||
eval set -- "$VALID_STR"
|
||||
|
||||
while true ;
|
||||
@@ -74,13 +72,11 @@ do
|
||||
set_address_sanitizer_on ; shift ;;
|
||||
(-s | --static)
|
||||
SHARED_LIBS="OFF" ; shift ;;
|
||||
(-w | --wheel)
|
||||
WHEEL_PACKAGE=true ; shift ;;
|
||||
(-t | --offload-arch=)
|
||||
OFFLOAD_ARCH+=( "$2" ); ((CLEAN_OR_OUT|=2)); shift 2 ;;
|
||||
(-o | --outdir)
|
||||
TARGET="outdir"; PKGTYPE=$2 ; OUT_DIR_SPECIFIED=1 ; ((CLEAN_OR_OUT|=2)) ; shift 2 ;;
|
||||
--) shift; break;; # end delimiter
|
||||
--) shift; break;;
|
||||
|
||||
(*)
|
||||
echo " This should never come but just incase : UNEXPECTED ERROR Parm : [$1] ">&2 ; exit 20;;
|
||||
@@ -102,10 +98,7 @@ if [ $RET_CONFLICT -ge 30 ]; then
|
||||
exit $RET_CONFLICT
|
||||
fi
|
||||
|
||||
|
||||
|
||||
clean_hip_on_rocclr() {
|
||||
# Delete cmake output directory
|
||||
rm -rf "$BUILD_PATH"
|
||||
rm -rf "$PACKAGE_DEB"
|
||||
rm -rf "$PACKAGE_RPM"
|
||||
@@ -113,23 +106,17 @@ clean_hip_on_rocclr() {
|
||||
}
|
||||
|
||||
build_hip_on_rocclr() {
|
||||
# TODO This if condition is a temporary workaround so that mainline builds dont error out
|
||||
# until build migrated from hipamd to clr repo
|
||||
if [ -e "$CLR_ROOT/CMakeLists.txt" ]; then
|
||||
# We are in a branch that has migrated to clr repo
|
||||
_HIP_CMAKELIST_DIR="$CLR_ROOT"
|
||||
_HIP_CMAKELIST_OPT="-DCLR_BUILD_HIP=ON -DCLR_BUILD_OCL=OFF"
|
||||
if [ -e "$HIPOTHER_ROOT/hipnv" ]; then
|
||||
# We are in a branch that has hipnv headers migrated
|
||||
_HIP_CMAKELIST_OPT="$_HIP_CMAKELIST_OPT -DHIPNV_DIR=$HIPOTHER_ROOT/hipnv"
|
||||
fi
|
||||
elif [ ! -e "$HIPAMD_ROOT/CMakeLists.txt" ]; then
|
||||
# We seem to have hit a branch in which both the old and the new repo don't exist
|
||||
echo "No $HIPAMD_ROOT/CMakeLists.txt file, skipping hip on rocclr" >&2
|
||||
echo "No $HIPAMD_ROOT/CMakeLists.txt file, skipping hip on rocclr"
|
||||
exit 0 # This is not an error
|
||||
exit 0
|
||||
else
|
||||
# We are in a branch that has not yet migrated to clr repo yet
|
||||
_HIP_CMAKELIST_DIR="$HIPAMD_ROOT"
|
||||
_HIP_CMAKELIST_OPT=""
|
||||
fi
|
||||
@@ -138,7 +125,6 @@ build_hip_on_rocclr() {
|
||||
mkdir -p "$BUILD_PATH"
|
||||
pushd "$BUILD_PATH"
|
||||
|
||||
# FIXME: Remove -DROCclr_DIR/LIBROCclr_STATIC_DIR
|
||||
if [ ! -e Makefile ]; then
|
||||
echo "Building HIP-On-ROCclr CMake environment"
|
||||
print_lib_type $SHARED_LIBS
|
||||
@@ -179,13 +165,8 @@ build_catch_tests() {
|
||||
rm -rf "$CATCH_BUILD_DIR"
|
||||
mkdir -p "$CATCH_BUILD_DIR"
|
||||
pushd "$CATCH_BUILD_DIR"
|
||||
# use the newly built hip as HIP for catch
|
||||
export HIP_PATH="$ROCM_INSTALL_PATH"
|
||||
export ROCM_PATH="$ROCM_INSTALL_PATH"
|
||||
# Note: The rocm_common_cmake_params will provide CMAKE_EXE_LINKER_FLAGS_INIT
|
||||
# for binaries located in /opt/rocm/bin
|
||||
# hip-catch binaries are located in each test folder under /opt/rocm/share/hip/catch_test/
|
||||
# Append the EXE LINKER flags with ROCm library path
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
||||
-DBUILD_SHARED_LIBS=$SHARED_LIBS \
|
||||
@@ -196,7 +177,6 @@ build_catch_tests() {
|
||||
$(rocm_common_cmake_params) \
|
||||
-DCPACK_RPM_DEBUGINFO_PACKAGE=FALSE \
|
||||
-DCPACK_DEBIAN_DEBUGINFO_PACKAGE=FALSE \
|
||||
-DCMAKE_EXE_LINKER_FLAGS_INIT=-Wl,--enable-new-dtags,--build-id=sha1,--rpath,$ROCM_EXE_RPATH:$ROCM_INSTALL_PATH/lib:/opt/rocm/lib \
|
||||
-DCPACK_INSTALL_PREFIX="$ROCM_INSTALL_PATH" \
|
||||
"$CATCH_SRC"
|
||||
|
||||
@@ -210,7 +190,6 @@ build_catch_tests() {
|
||||
}
|
||||
|
||||
package_samples() {
|
||||
# TODO: To be removed once the issue related to ASAN builds are fixed
|
||||
if [ "$ASAN_CMAKE_PARAMS" == "true" ] ; then
|
||||
echo "Disable the packaging of HIP samples" >&2
|
||||
return
|
||||
@@ -219,17 +198,13 @@ package_samples() {
|
||||
if [ ! -e "$SAMPLES_SRC/CMakeLists.txt" ]; then
|
||||
echo "HIP samples source not found at: $SAMPLES_SRC" >&2
|
||||
echo "Using samples package from hip project: $BUILD_PATH" >&2
|
||||
# TODO: change to return failure after hip-tests samples change is available in mainline
|
||||
return
|
||||
fi
|
||||
# package samples
|
||||
|
||||
rm -rf "$SAMPLES_BUILD_DIR"
|
||||
mkdir -p "$SAMPLES_BUILD_DIR"
|
||||
pushd "$SAMPLES_BUILD_DIR"
|
||||
# The cmake path is different for asan and non-asan builds.
|
||||
# Fetch after getting build type. Default will be non-asan build
|
||||
local CMAKE_PATH="$(getCmakePath)"
|
||||
# use the newly built hip as HIP for samples
|
||||
export HIP_PATH="$ROCM_INSTALL_PATH"
|
||||
export ROCM_PATH="$ROCM_INSTALL_PATH"
|
||||
cmake \
|
||||
@@ -316,24 +291,10 @@ print_output_directory() {
|
||||
}
|
||||
|
||||
case $TARGET in
|
||||
(clean)
|
||||
clean_hip_on_rocclr
|
||||
clean_hip_tests
|
||||
;;
|
||||
(build)
|
||||
build_hip_on_rocclr
|
||||
build_catch_tests
|
||||
package_hip_on_rocclr
|
||||
package_samples
|
||||
build_wheel "$BUILD_PATH" "$PROJ_NAME"
|
||||
copy_hip_tests
|
||||
;;
|
||||
(outdir)
|
||||
print_output_directory
|
||||
;;
|
||||
(*)
|
||||
die "Invalid target $TARGET"
|
||||
;;
|
||||
(clean) clean_hip_on_rocclr; clean_hip_tests ;;
|
||||
(build) build_hip_on_rocclr; build_catch_tests; package_hip_on_rocclr; package_samples; copy_hip_tests;;
|
||||
(outdir) print_output_directory ;;
|
||||
(*) die "Invalid target $TARGET" ;;
|
||||
esac
|
||||
|
||||
echo "Operation complete"
|
||||
|
||||
@@ -2,19 +2,16 @@
|
||||
|
||||
set -ex
|
||||
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
set_component_src hipBLAS-common
|
||||
|
||||
build_hipblas-common() {
|
||||
echo "Start build"
|
||||
|
||||
CXX=$(set_build_variables __C_++__)
|
||||
cd $COMPONENT_SRC
|
||||
mkdir -p "$BUILD_DIR" && cd "$BUILD_DIR"
|
||||
|
||||
echo "C compiler: $CC"
|
||||
echo "CXX compiler: $CXX"
|
||||
init_rocm_common_cmake_params
|
||||
cmake \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
@@ -23,7 +20,8 @@ build_hipblas-common() {
|
||||
cmake --build "$BUILD_DIR" -- package
|
||||
|
||||
rm -rf _CPack_Packages/ && find -name '*.o' -delete
|
||||
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
||||
mkdir -p $PACKAGE_DIR && cp ${BUILD_DIR}/*.${PKGTYPE} $PACKAGE_DIR
|
||||
|
||||
show_build_cache_stats
|
||||
}
|
||||
|
||||
@@ -36,7 +34,7 @@ clean_hipblas-common() {
|
||||
stage2_command_args "$@"
|
||||
|
||||
case $TARGET in
|
||||
build) build_hipblas-common; build_wheel ;;
|
||||
build) build_hipblas-common ;;
|
||||
outdir) print_output_directory ;;
|
||||
clean) clean_hipblas-common ;;
|
||||
*) die "Invalid target $TARGET" ;;
|
||||
|
||||
@@ -2,32 +2,28 @@
|
||||
|
||||
set -ex
|
||||
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
set_component_src hipBLAS
|
||||
|
||||
build_hipblas() {
|
||||
echo "Start build"
|
||||
|
||||
CXX=$(set_build_variables __G_++__)
|
||||
CXX="g++"
|
||||
CXX_FLAG=
|
||||
if [ "${ENABLE_STATIC_BUILDS}" == "true" ]; then
|
||||
CXX=$(set_build_variables __AMD_CLANG_++__)
|
||||
CXX_FLAG=$(set_build_variables __CMAKE_CXX_PARAMS__)
|
||||
CXX="amdclang++"
|
||||
CXX_FLAG="-DCMAKE_CXX_COMPILER=${ROCM_PATH}/llvm/bin/clang++"
|
||||
fi
|
||||
|
||||
CLIENTS_SAMPLES="ON"
|
||||
if [ "${ENABLE_ADDRESS_SANITIZER}" == "true" ]; then
|
||||
set_asan_env_vars
|
||||
set_address_sanitizer_on
|
||||
# fixme: remove CLIENTS_SAMPLES=OFF once SWDEV-417076 is fixed
|
||||
CLIENTS_SAMPLES="OFF"
|
||||
fi
|
||||
|
||||
SHARED_LIBS="ON"
|
||||
if [ "${ENABLE_STATIC_BUILDS}" == "true" ]; then
|
||||
SHARED_LIBS="OFF"
|
||||
fi
|
||||
|
||||
echo "C compiler: $CC"
|
||||
echo "CXX compiler: $CXX"
|
||||
@@ -43,10 +39,10 @@ build_hipblas() {
|
||||
init_rocm_common_cmake_params
|
||||
cmake \
|
||||
${LAUNCHER_FLAGS} \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
-DUSE_CUDA=OFF \
|
||||
-DBUILD_SHARED_LIBS=$SHARED_LIBS \
|
||||
-DBUILD_CLIENTS_TESTS=ON \
|
||||
-DBUILD_CLIENTS_TESTS=ON \
|
||||
-DBUILD_CLIENTS_BENCHMARKS=ON \
|
||||
-DBUILD_CLIENTS_SAMPLES="${CLIENTS_SAMPLES}" \
|
||||
-DBUILD_ADDRESS_SANITIZER="${ADDRESS_SANITIZER}" \
|
||||
@@ -58,7 +54,7 @@ build_hipblas() {
|
||||
cmake --build "$BUILD_DIR" -- package
|
||||
|
||||
rm -rf _CPack_Packages/ && find -name '*.o' -delete
|
||||
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
||||
mkdir -p $PACKAGE_DIR && cp ${BUILD_DIR}/*.${PKGTYPE} $PACKAGE_DIR
|
||||
|
||||
show_build_cache_stats
|
||||
}
|
||||
@@ -72,7 +68,7 @@ clean_hipblas() {
|
||||
stage2_command_args "$@"
|
||||
|
||||
case $TARGET in
|
||||
build) build_hipblas; build_wheel ;;
|
||||
build) build_hipblas ;;
|
||||
outdir) print_output_directory ;;
|
||||
clean) clean_hipblas ;;
|
||||
*) die "Invalid target $TARGET" ;;
|
||||
|
||||
@@ -1,20 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
set_component_src hipBLASLt
|
||||
|
||||
#not enabling the debug files by defalut
|
||||
disable_debug_package_generation
|
||||
# if ENABLE_GPU_ARCH is set in env by Job parameter ENABLE_GPU_ARCH, then set GFX_ARCH to that value
|
||||
if [ -n "$ENABLE_GPU_ARCH" ]; then
|
||||
set_gpu_arch "$ENABLE_GPU_ARCH"
|
||||
else
|
||||
# gfx90a:xnack+;gfx90a:xnack-;gfx940;gfx941;gfx942
|
||||
set_gpu_arch "all"
|
||||
fi
|
||||
|
||||
build_hipblaslt() {
|
||||
echo "Start build"
|
||||
|
||||
@@ -30,31 +20,31 @@ build_hipblaslt() {
|
||||
cd $COMPONENT_SRC
|
||||
mkdir -p "$BUILD_DIR" && cd "$BUILD_DIR"
|
||||
|
||||
# hipblaslt requiring Python 3.12.
|
||||
# Point CMake to that explicit location and adjust LD_LIBRARY_PATH.
|
||||
if [ "$DISTRO_ID" = "rhel-8.8" ] || [ "$DISTRO_NAME" == "sles" ] || \
|
||||
[ "$DISTRO_ID" = "rhel-9.1" ] || [ "$DISTRO_ID" = "almalinux-8.10" ] || \
|
||||
[ "$DISTRO_ID" = "debian-10" ]; then
|
||||
EXTRA_PYTHON_PATH=/opt/Python-3.12.7
|
||||
EXTRA_CMAKE_OPTIONS="-DPython_ROOT=/opt/Python-3.12.7"
|
||||
export LD_LIBRARY_PATH=${EXTRA_PYTHON_PATH}/lib
|
||||
if [ "${ENABLE_ADDRESS_SANITIZER}" == "true" ]; then
|
||||
rebuild_lapack
|
||||
fi
|
||||
|
||||
if [ -n "$GPU_ARCHS" ]; then
|
||||
GPU_TARGETS="$GPU_ARCHS"
|
||||
else
|
||||
# gfx90a:xnack+;gfx90a:xnack-;gfx940;gfx941;gfx942
|
||||
GPU_TARGETS=all
|
||||
fi
|
||||
|
||||
init_rocm_common_cmake_params
|
||||
CXX=$(set_build_variables __CXX__)\
|
||||
CXX=$(set_build_variables CXX)\
|
||||
cmake \
|
||||
-DAMDGPU_TARGETS=${GPU_TARGETS} \
|
||||
${LAUNCHER_FLAGS} \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
-DTensile_LOGIC= \
|
||||
-DTensile_CODE_OBJECT_VERSION=default \
|
||||
-DTensile_CPU_THREADS=$((PROC / 4)) \
|
||||
-DTensile_CPU_THREADS= \
|
||||
-DTensile_LIBRARY_FORMAT=msgpack \
|
||||
-DBUILD_CLIENTS_SAMPLES=ON \
|
||||
-DBUILD_CLIENTS_TESTS=ON \
|
||||
-DLINK_BLIS=ON \
|
||||
-DBUILD_CLIENTS_BENCHMARKS=ON \
|
||||
-DBUILD_ADDRESS_SANITIZER="${ADDRESS_SANITIZER}" \
|
||||
${EXTRA_CMAKE_OPTIONS} \
|
||||
"$COMPONENT_SRC"
|
||||
|
||||
cmake --build "$BUILD_DIR" -- -j${PROC}
|
||||
@@ -62,7 +52,8 @@ build_hipblaslt() {
|
||||
cmake --build "$BUILD_DIR" -- package
|
||||
|
||||
rm -rf _CPack_Packages/ && find -name '*.o' -delete
|
||||
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
||||
mkdir -p $PACKAGE_DIR && cp ${BUILD_DIR}/*.${PKGTYPE} $PACKAGE_DIR
|
||||
|
||||
show_build_cache_stats
|
||||
}
|
||||
|
||||
@@ -75,7 +66,7 @@ clean_hipblaslt() {
|
||||
stage2_command_args "$@"
|
||||
|
||||
case $TARGET in
|
||||
build) build_hipblaslt; build_wheel ;;
|
||||
build) build_hipblaslt ;;
|
||||
outdir) print_output_directory ;;
|
||||
clean) clean_hipblaslt ;;
|
||||
*) die "Invalid target $TARGET" ;;
|
||||
|
||||
@@ -9,8 +9,6 @@ printUsage() {
|
||||
echo "Options:"
|
||||
echo " -a, --address_sanitizer Enable address sanitizer"
|
||||
echo " -c, --clean Clean output and delete all intermediate work"
|
||||
echo " -w, --wheel Creates python wheel package of hipcc.
|
||||
It needs to be used along with -r option"
|
||||
echo " -o, --outdir <pkg_type> Print path of output directory containing packages of
|
||||
type referred to by pkg_type"
|
||||
echo " -r, --release Makes a release build"
|
||||
@@ -23,7 +21,6 @@ printUsage() {
|
||||
}
|
||||
|
||||
|
||||
## Build environment variables
|
||||
API_NAME=hipcc
|
||||
PROJ_NAME=$API_NAME
|
||||
|
||||
@@ -32,11 +29,10 @@ MAKEOPTS="$DASH_JAY"
|
||||
BUILD_TYPE="Debug"
|
||||
SHARED_LIBS="ON"
|
||||
BUILD_DIR=$(getBuildPath $API_NAME)
|
||||
PACKAGE_DEB=$(getPackageRoot)/deb/$PROJ_NAME
|
||||
PACKAGE_RPM=$(getPackageRoot)/rpm/$PROJ_NAME
|
||||
PACKAGE_DEB=$(getPackageRoot)/deb/$API_NAME
|
||||
PACKAGE_RPM=$(getPackageRoot)/rpm/$API_NAME
|
||||
PACKAGE_SRC="$(getSrcPath)"
|
||||
|
||||
#parse the arguments
|
||||
VALID_STR=`getopt -o hcraswo:p: --long help,clean,release,address_sanitizer,static,outdir,wheel:,package: -- "$@"`
|
||||
eval set -- "$VALID_STR"
|
||||
|
||||
@@ -49,15 +45,13 @@ do
|
||||
TARGET="clean" ;;
|
||||
(-o | --outdir)
|
||||
TARGET="outdir"; PKGTYPE=$2 ; OUT_DIR_SPECIFIED=1 ; ((CLEAN_OR_OUT|=2)) ; shift 1 ;;
|
||||
(-w | --wheel)
|
||||
WHEEL_PACKAGE=true ;;
|
||||
(-r | --release)
|
||||
BUILD_TYPE="RelWithDebInfo" ;;
|
||||
(-s | --static)
|
||||
SHARED_LIBS="OFF" ;;
|
||||
(-h | --help)
|
||||
printUsage ; exit 0 ;;
|
||||
--) shift; break;; # end delimiter
|
||||
--) shift; break;;
|
||||
(*)
|
||||
echo "Invalid option [$1]" >&2; printUsage; exit 1 ;;
|
||||
esac
|
||||
@@ -97,7 +91,7 @@ build() {
|
||||
$(rocm_cmake_params) \
|
||||
$(rocm_common_cmake_params) \
|
||||
-DHIPCC_BACKWARD_COMPATIBILITY=OFF \
|
||||
-DCMAKE_INSTALL_PREFIX="$ROCM_PATH" \
|
||||
-DCMAKE_INSTALL_PREFIX="$OUT_DIR" \
|
||||
$HIPCC_ROOT
|
||||
popd
|
||||
|
||||
@@ -124,20 +118,10 @@ print_output_directory() {
|
||||
}
|
||||
|
||||
case $TARGET in
|
||||
(clean)
|
||||
clean
|
||||
;;
|
||||
(build)
|
||||
build
|
||||
build_wheel "$BUILD_DIR" "$PROJ_NAME"
|
||||
copy_hipcc_sources
|
||||
;;
|
||||
(outdir)
|
||||
print_output_directory
|
||||
;;
|
||||
(*)
|
||||
die "Invalid target $TARGET"
|
||||
;;
|
||||
(clean) clean ;;
|
||||
(build) build ; copy_hipcc_sources ;;
|
||||
(outdir) print_output_directory ;;
|
||||
(*) die "Invalid target $TARGET" ;;
|
||||
esac
|
||||
|
||||
echo "Operation complete"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -ex
|
||||
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
set_component_src hipCUB
|
||||
|
||||
@@ -17,21 +17,26 @@ build_hipcub() {
|
||||
if [ "${ENABLE_ADDRESS_SANITIZER}" == "true" ]; then
|
||||
set_asan_env_vars
|
||||
set_address_sanitizer_on
|
||||
# ASAN packaging is not required for HIPCUB, since its header only package
|
||||
# Setting the asan_cmake_params to false will disable ASAN packaging
|
||||
ASAN_CMAKE_PARAMS="false"
|
||||
fi
|
||||
|
||||
mkdir -p "$BUILD_DIR" && cd "$BUILD_DIR"
|
||||
init_rocm_common_cmake_params
|
||||
|
||||
CXX=$(set_build_variables __CXX__)\
|
||||
if [ -n "$GPU_ARCHS" ]; then
|
||||
GPU_TARGETS="$GPU_ARCHS"
|
||||
else
|
||||
GPU_TARGETS="gfx908:xnack-;gfx90a:xnack-;gfx90a:xnack+;gfx940;gfx941;gfx942;gfx1030;gfx1100;gfx1101;gfx1102;gfx1200;gfx1201"
|
||||
fi
|
||||
|
||||
CXX=$(set_build_variables CXX)\
|
||||
cmake \
|
||||
${LAUNCHER_FLAGS} \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
-DCMAKE_MODULE_PATH="${ROCM_PATH}/lib/cmake/hip;${ROCM_PATH}/hip/cmake" \
|
||||
-Drocprim_DIR="${ROCM_PATH}/rocprim" \
|
||||
-DBUILD_TEST=ON \
|
||||
-DAMDGPU_TARGETS=${GPU_TARGETS} \
|
||||
"$COMPONENT_SRC"
|
||||
|
||||
cmake --build "$BUILD_DIR" -- -j${PROC}
|
||||
@@ -39,7 +44,7 @@ build_hipcub() {
|
||||
cmake --build "$BUILD_DIR" -- package
|
||||
|
||||
rm -rf _CPack_Packages/ && find -name '*.o' -delete
|
||||
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
||||
mkdir -p $PACKAGE_DIR && cp ${BUILD_DIR}/*.${PKGTYPE} $PACKAGE_DIR
|
||||
|
||||
show_build_cache_stats
|
||||
}
|
||||
@@ -53,7 +58,7 @@ clean_hipcub() {
|
||||
stage2_command_args "$@"
|
||||
|
||||
case $TARGET in
|
||||
build) build_hipcub; build_wheel ;;
|
||||
build) build_hipcub ;;
|
||||
outdir) print_output_directory ;;
|
||||
clean) clean_hipcub ;;
|
||||
*) die "Invalid target $TARGET" ;;
|
||||
|
||||
@@ -2,17 +2,13 @@
|
||||
|
||||
set -ex
|
||||
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
set_component_src hipFFT
|
||||
|
||||
build_hipfft() {
|
||||
echo "Start build"
|
||||
|
||||
if [ "${ENABLE_STATIC_BUILDS}" == "true" ]; then
|
||||
ack_and_skip_static
|
||||
fi
|
||||
|
||||
if [ "${ENABLE_ADDRESS_SANITIZER}" == "true" ]; then
|
||||
set_asan_env_vars
|
||||
set_address_sanitizer_on
|
||||
@@ -22,10 +18,17 @@ build_hipfft() {
|
||||
mkdir -p "$BUILD_DIR" && cd "$BUILD_DIR"
|
||||
init_rocm_common_cmake_params
|
||||
|
||||
if [ -n "$GPU_ARCHS" ]; then
|
||||
GPU_TARGETS="$GPU_ARCHS"
|
||||
else
|
||||
GPU_TARGETS="gfx908;gfx90a;gfx940;gfx941;gfx942;gfx1030;gfx1100;gfx1101;gfx1102;gfx1200;gfx1201"
|
||||
fi
|
||||
|
||||
cmake \
|
||||
"$(set_build_variables __CMAKE_CXX_PARAMS__)" \
|
||||
-DCMAKE_CXX_COMPILER=$(set_build_variables CXX) \
|
||||
${LAUNCHER_FLAGS} \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
-DAMDGPU_TARGETS=${GPU_TARGETS} \
|
||||
-DCMAKE_MODULE_PATH="${ROCM_PATH}/lib/cmake/hip" \
|
||||
-DCMAKE_SKIP_BUILD_RPATH=TRUE \
|
||||
-DBUILD_ADDRESS_SANITIZER="${ADDRESS_SANITIZER}" \
|
||||
@@ -38,7 +41,7 @@ build_hipfft() {
|
||||
cmake --build "$BUILD_DIR" -- package
|
||||
|
||||
rm -rf _CPack_Packages/ && find -name '*.o' -delete
|
||||
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
||||
mkdir -p $PACKAGE_DIR && cp ${BUILD_DIR}/*.${PKGTYPE} $PACKAGE_DIR
|
||||
|
||||
show_build_cache_stats
|
||||
}
|
||||
@@ -52,7 +55,7 @@ clean_hipfft() {
|
||||
stage2_command_args "$@"
|
||||
|
||||
case $TARGET in
|
||||
build) build_hipfft; build_wheel ;;
|
||||
build) build_hipfft ;;
|
||||
outdir) print_output_directory ;;
|
||||
clean) clean_hipfft ;;
|
||||
*) die "Invalid target $TARGET" ;;
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
set_component_src hipfort
|
||||
|
||||
build_hipfort() {
|
||||
echo "Start build"
|
||||
|
||||
if [ "${ENABLE_ADDRESS_SANITIZER}" == "true" ]; then
|
||||
set_asan_env_vars
|
||||
set_address_sanitizer_on
|
||||
fi
|
||||
|
||||
if [ "${ENABLE_STATIC_BUILDS}" == "true" ]; then
|
||||
ack_and_skip_static
|
||||
fi
|
||||
@@ -31,7 +26,7 @@ build_hipfort() {
|
||||
-DCMAKE_Fortran_FLAGS_DEBUG="" \
|
||||
${LAUNCHER_FLAGS} \
|
||||
-DROCM_SYMLINK_LIBS=OFF \
|
||||
-DCMAKE_INSTALL_PREFIX=${ROCM_PATH} \
|
||||
-DCMAKE_INSTALL_PREFIX=${ROCM_PATH} \
|
||||
-DHIPFORT_AR="${ROCM_PATH}/${ROCM_LLVMDIR}/bin/llvm-ar" \
|
||||
-DHIPFORT_RANLIB="${ROCM_PATH}/${ROCM_LLVMDIR}/bin/llvm-ranlib" \
|
||||
"$COMPONENT_SRC"
|
||||
@@ -41,7 +36,7 @@ build_hipfort() {
|
||||
cmake --build "$BUILD_DIR" -- package
|
||||
|
||||
rm -rf _CPack_Packages/ && find -name '*.o' -delete
|
||||
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
||||
mkdir -p $PACKAGE_DIR && cp ${BUILD_DIR}/*.${PKGTYPE} $PACKAGE_DIR
|
||||
|
||||
show_build_cache_stats
|
||||
}
|
||||
@@ -55,7 +50,7 @@ clean_hipfort() {
|
||||
stage2_command_args "$@"
|
||||
|
||||
case $TARGET in
|
||||
build) build_hipfort; build_wheel ;;
|
||||
build) build_hipfort ;;
|
||||
outdir) print_output_directory ;;
|
||||
clean) clean_hipfort ;;
|
||||
*) die "Invalid target $TARGET" ;;
|
||||
|
||||
@@ -10,21 +10,15 @@ printUsage() {
|
||||
echo " -c, --clean Clean output and delete all intermediate work"
|
||||
echo " -o, --outdir <pkg_type> Print path of output directory containing packages of
|
||||
type referred to by pkg_type"
|
||||
echo " -r, --release Make a release build"
|
||||
echo " -n, --skip_hipify_tests Skip hipify-clang testing"
|
||||
echo " -h, --help Prints this help"
|
||||
echo " -r, --release Make a release build"
|
||||
echo " -a, --address_sanitizer Enable address sanitizer"
|
||||
echo " -s, --static Component/Build does not support static builds just accepting this param & ignore. No effect of the param on this build"
|
||||
echo " -i, --clang_headers Install clang headers"
|
||||
echo " -w, --wheel Creates python wheel package of hipify-clang.
|
||||
It needs to be used along with -r option"
|
||||
echo " -h, --help Prints this help"
|
||||
echo " -s, --static Supports static CI by accepting this param & not bailing out. No effect of the param though"
|
||||
echo
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
# Build Environmental Variables
|
||||
PROJ_NAME="hipify"
|
||||
TARGET="build"
|
||||
MAKEOPTS="$DASH_JAY"
|
||||
HIPIFY_CLANG_BUILD_DIR="$(getBuildPath $HIPIFY_ROOT)"
|
||||
@@ -32,11 +26,6 @@ BUILD_TYPE="Debug"
|
||||
PACKAGE_ROOT="$(getPackageRoot)"
|
||||
HIPIFY_CLANG_HASH=""
|
||||
LIGHTNING_PATH="$ROCM_INSTALL_PATH/llvm"
|
||||
LIGHTNING_BUILD_PATH="$PACKAGE_ROOT/build/lightning"
|
||||
RUN_HIPIFY_TESTS=false
|
||||
CUDA_DEFAULT_VERSION="12.3.2"
|
||||
CUDNN_DEFAULT_VERSION="9.2.0"
|
||||
GCC_MIN_VERSION="9.2"
|
||||
ADDRESS_SANITIZER=false
|
||||
INSTALL_CLANG_HEADERS="OFF"
|
||||
DEB_PATH="$(getDebPath hipify)"
|
||||
@@ -47,8 +36,7 @@ MAKETARGET="deb"
|
||||
PKGTYPE="deb"
|
||||
|
||||
|
||||
#parse the arguments
|
||||
VALID_STR=`getopt -o hcrnawsio: --long help,clean,release,skip_hipify_tests,wheel,static,address_sanitizer,clang_headers,outdir: -- "$@"`
|
||||
VALID_STR=`getopt -o hcraso: --long help,clean,release,static,address_sanitizer,outdir: -- "$@"`
|
||||
eval set -- "$VALID_STR"
|
||||
|
||||
while true ;
|
||||
@@ -60,21 +48,15 @@ do
|
||||
TARGET="clean" ; ((CLEAN_OR_OUT|=1)) ; shift ;;
|
||||
(-r | --release)
|
||||
BUILD_TYPE="RelWithDebInfo" ; shift ;;
|
||||
(-n | --skip_hipify_tests)
|
||||
RUN_HIPIFY_TESTS=false; shift ;;
|
||||
(-a | --address_sanitizer)
|
||||
set_asan_env_vars
|
||||
set_address_sanitizer_on
|
||||
ADDRESS_SANITIZER=true ; shift ;;
|
||||
(-s | --static)
|
||||
ack_and_skip_static ;;
|
||||
(-w | --wheel)
|
||||
WHEEL_PACKAGE=true ; shift ;;
|
||||
(-i | --clang_headers)
|
||||
INSTALL_CLANG_HEADERS="ON" ; shift ;;
|
||||
(-o | --outdir)
|
||||
TARGET="outdir"; PKGTYPE=$2 ; OUT_DIR_SPECIFIED=1 ; ((CLEAN_OR_OUT|=2)) ; shift 2 ;;
|
||||
--) shift; break;; # end delimiter
|
||||
--) shift; break;;
|
||||
(*)
|
||||
echo " This should never come but just incase : UNEXPECTED ERROR Parm : [$1] ">&2 ; exit 20;;
|
||||
esac
|
||||
@@ -97,7 +79,6 @@ clean_hipify() {
|
||||
}
|
||||
|
||||
package_hipify() {
|
||||
# set-up dirs
|
||||
if [ "$PACKAGEEXT" = "deb" ]; then
|
||||
rm -rf "$DEB_PATH"
|
||||
mkdir -p "$DEB_PATH"
|
||||
@@ -108,7 +89,6 @@ package_hipify() {
|
||||
mkdir -p "$RPM_PATH"
|
||||
fi
|
||||
|
||||
# make the pkg
|
||||
pushd "$HIPIFY_CLANG_BUILD_DIR"
|
||||
make $MAKEOPTS package_hipify-clang
|
||||
popd
|
||||
@@ -122,37 +102,7 @@ build_hipify() {
|
||||
mkdir -p "$HIPIFY_CLANG_BUILD_DIR"
|
||||
|
||||
pushd "$HIPIFY_CLANG_BUILD_DIR"
|
||||
|
||||
# Check the installed GCC version
|
||||
INSTALLED_GCC_VERSION=$(gcc --version | head -n 1 | sed -E 's/[^0-9]*([0-9]+\.[0-9]+).*/\1/')
|
||||
if echo "$INSTALLED_GCC_VERSION $GCC_MIN_VERSION" | awk '{exit !($1 < $2)}'; then
|
||||
RUN_HIPIFY_TESTS=false
|
||||
echo "Minimum required GCC version: $GCC_MIN_VERSION"
|
||||
echo "Installed GCC version $INSTALLED_GCC_VERSION does not meet the minimum GCC version requirement."
|
||||
echo "Skipping hipify tests"
|
||||
fi
|
||||
|
||||
if $ADDRESS_SANITIZER ; then
|
||||
echo "Skipping hipify tests becasue of Address Sanitizer"
|
||||
RUN_HIPIFY_TESTS=false
|
||||
fi
|
||||
|
||||
if $RUN_HIPIFY_TESTS ; then
|
||||
# TODO: Add option for user defined cuda version?
|
||||
CUDA_VERSION="${CUDA_DEFAULT_VERSION}"
|
||||
CUDNN_VERSION="${CUDNN_DEFAULT_VERSION}"
|
||||
|
||||
if [[ "$DISTRO_ID" == "rhel-8"* || "$DISTRO_NAME" == "sles" || "$DISTRO_ID" == "debian-10" ]]; then
|
||||
EXTRA_PYTHON_PATH=/opt/Python-3.8.13
|
||||
export LD_LIBRARY_PATH=${EXTRA_PYTHON_PATH}/lib:$LD_LIBRARY_PATH
|
||||
fi
|
||||
|
||||
echo "Copy FileCheck into ROCM_INSTALL_PATH"
|
||||
cp "$LIGHTNING_BUILD_PATH/bin/FileCheck" "$LIGHTNING_PATH/bin/FileCheck"
|
||||
fi
|
||||
|
||||
cmake \
|
||||
-DHIPIFY_CLANG_TESTS="$RUN_HIPIFY_TESTS" \
|
||||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
||||
$(rocm_common_cmake_params) \
|
||||
-DCMAKE_INSTALL_PREFIX="$ROCM_INSTALL_PATH" \
|
||||
@@ -160,20 +110,10 @@ build_hipify() {
|
||||
-DCMAKE_PREFIX_PATH="$LIGHTNING_PATH" \
|
||||
-DADDRESS_SANITIZER="$ADDRESS_SANITIZER" \
|
||||
-DHIPIFY_INSTALL_CLANG_HEADERS="$INSTALL_CLANG_HEADERS" \
|
||||
-DCUDA_TOOLKIT_ROOT_DIR="/usr/local/cuda-${CUDA_DEFAULT_VERSION}" \
|
||||
-DCUDA_DNN_ROOT_DIR="/usr/local/cuDNN/${CUDNN_DEFAULT_VERSION}" \
|
||||
-DCUDA_CUB_ROOT_DIR="/usr/local/cuda-${CUDA_DEFAULT_VERSION}" \
|
||||
-DLLVM_EXTERNAL_LIT="${LIGHTNING_BUILD_PATH}/bin/llvm-lit" \
|
||||
$HIPIFY_ROOT
|
||||
|
||||
if $RUN_HIPIFY_TESTS ; then
|
||||
echo "Running hipify tests"
|
||||
cmake --build . -- $MAKEOPTS test-hipify
|
||||
fi
|
||||
|
||||
cmake --build . -- $MAKEOPTS install
|
||||
popd
|
||||
|
||||
pushd "$HIPIFY_ROOT"
|
||||
HIPIFY_CLANG_HASH=`git describe --dirty --long --match [0-9]* --always`
|
||||
popd
|
||||
@@ -192,20 +132,10 @@ print_output_directory() {
|
||||
}
|
||||
|
||||
case $TARGET in
|
||||
(clean)
|
||||
clean_hipify
|
||||
;;
|
||||
(build)
|
||||
build_hipify
|
||||
package_hipify
|
||||
build_wheel "$HIPIFY_CLANG_BUILD_DIR" "$PROJ_NAME"
|
||||
;;
|
||||
(outdir)
|
||||
print_output_directory
|
||||
;;
|
||||
(*)
|
||||
die "Invalid target $TARGET"
|
||||
;;
|
||||
(clean) clean_hipify ;;
|
||||
(build) build_hipify; package_hipify ;;
|
||||
(outdir) print_output_directory ;;
|
||||
(*) die "Invalid target $TARGET" ;;
|
||||
esac
|
||||
|
||||
echo "Operation complete"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
set_component_src hipRAND
|
||||
|
||||
@@ -41,10 +41,17 @@ build_hiprand() {
|
||||
|
||||
init_rocm_common_cmake_params
|
||||
|
||||
CXX=$(set_build_variables __CXX__)\
|
||||
if [ -n "$GPU_ARCHS" ]; then
|
||||
GPU_TARGETS="$GPU_ARCHS"
|
||||
else
|
||||
GPU_TARGETS="gfx908:xnack-;gfx90a:xnack-;gfx90a:xnack+;gfx940;gfx941;gfx942;gfx1030;gfx1100;gfx1101;gfx1102;gfx1200;gfx1201"
|
||||
fi
|
||||
|
||||
CXX=$(set_build_variables CXX)\
|
||||
cmake \
|
||||
${LAUNCHER_FLAGS} \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
-DAMDGPU_TARGETS=${GPU_TARGETS} \
|
||||
-DBUILD_SHARED_LIBS=$SHARED_LIBS \
|
||||
-DBUILD_TEST=ON \
|
||||
-DBUILD_BENCHMARK=ON \
|
||||
@@ -60,7 +67,7 @@ build_hiprand() {
|
||||
cmake --build "$BUILD_DIR" -- package
|
||||
|
||||
rm -rf _CPack_Packages/ && find -name '*.o' -delete
|
||||
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
||||
mkdir -p $PACKAGE_DIR && cp ${BUILD_DIR}/*.${PKGTYPE} $PACKAGE_DIR
|
||||
}
|
||||
|
||||
clean_hiprand() {
|
||||
@@ -82,7 +89,7 @@ print_output_directory() {
|
||||
}
|
||||
|
||||
case $TARGET in
|
||||
build) build_hiprand; build_wheel ;;
|
||||
build) build_hiprand ;;
|
||||
outdir) print_output_directory ;;
|
||||
clean) clean_hiprand ;;
|
||||
*) die "Invalid target $TARGET" ;;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -ex
|
||||
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
set_component_src hipSOLVER
|
||||
|
||||
@@ -10,12 +10,12 @@ build_hipsolver() {
|
||||
echo "Start build"
|
||||
|
||||
if [ "${ENABLE_STATIC_BUILDS}" == "true" ]; then
|
||||
CXX_FLAG=$(set_build_variables __CMAKE_CXX_PARAMS__)
|
||||
CXX_FLAG="-DCMAKE_CXX_COMPILER=${ROCM_PATH}/llvm/bin/clang++"
|
||||
fi
|
||||
|
||||
cd $COMPONENT_SRC
|
||||
|
||||
CXX=$(set_build_variables __AMD_CLANG_++__)
|
||||
CXX="amdclang++"
|
||||
if [ "${ENABLE_ADDRESS_SANITIZER}" == "true" ]; then
|
||||
set_asan_env_vars
|
||||
set_address_sanitizer_on
|
||||
@@ -39,7 +39,7 @@ build_hipsolver() {
|
||||
init_rocm_common_cmake_params
|
||||
cmake \
|
||||
-DUSE_CUDA=OFF \
|
||||
-DCMAKE_CXX_COMPILER=${CXX} \
|
||||
-DCMAKE_CXX_COMPILER=${CXX} \
|
||||
${LAUNCHER_FLAGS} \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
-DBUILD_SHARED_LIBS=$SHARED_LIBS \
|
||||
@@ -55,7 +55,7 @@ build_hipsolver() {
|
||||
cmake --build "$BUILD_DIR" -- package
|
||||
|
||||
rm -rf _CPack_Packages/ && find -name '*.o' -delete
|
||||
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
||||
mkdir -p $PACKAGE_DIR && cp ${BUILD_DIR}/*.${PKGTYPE} $PACKAGE_DIR
|
||||
|
||||
show_build_cache_stats
|
||||
}
|
||||
@@ -69,7 +69,7 @@ clean_hipsolver() {
|
||||
stage2_command_args "$@"
|
||||
|
||||
case $TARGET in
|
||||
build) build_hipsolver; build_wheel ;;
|
||||
build) build_hipsolver ;;
|
||||
outdir) print_output_directory ;;
|
||||
clean) clean_hipsolver ;;
|
||||
*) die "Invalid target $TARGET" ;;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -ex
|
||||
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
PATH=${ROCM_PATH}/bin:$PATH
|
||||
set_component_src hipSPARSE
|
||||
@@ -10,12 +10,12 @@ set_component_src hipSPARSE
|
||||
build_hipsparse() {
|
||||
echo "Start build"
|
||||
|
||||
CXX=$(set_build_variables __G_++__)
|
||||
CXX="g++"
|
||||
CXX_FLAG=
|
||||
|
||||
if [ "${ENABLE_STATIC_BUILDS}" == "true" ]; then
|
||||
CXX=$(set_build_variables __CXX__)
|
||||
CXX_FLAG=$(set_build_variables __CMAKE_CXX_PARAMS__)
|
||||
CXX="${ROCM_PATH}/llvm/bin/clang++"
|
||||
CXX_FLAG="-DCMAKE_CXX_COMPILER=${ROCM_PATH}/llvm/bin/clang++"
|
||||
fi
|
||||
|
||||
cd $COMPONENT_SRC
|
||||
@@ -54,7 +54,7 @@ build_hipsparse() {
|
||||
cmake --build "$BUILD_DIR" -- package
|
||||
|
||||
rm -rf _CPack_Packages/ && find -name '*.o' -delete
|
||||
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
||||
mkdir -p $PACKAGE_DIR && cp ${BUILD_DIR}/*.${PKGTYPE} $PACKAGE_DIR
|
||||
|
||||
show_build_cache_stats
|
||||
}
|
||||
@@ -68,7 +68,7 @@ clean_hipsparse() {
|
||||
stage2_command_args "$@"
|
||||
|
||||
case $TARGET in
|
||||
build) build_hipsparse; build_wheel ;;
|
||||
build) build_hipsparse ;;
|
||||
outdir) print_output_directory ;;
|
||||
clean) clean_hipsparse ;;
|
||||
*) die "Invalid target $TARGET" ;;
|
||||
|
||||
@@ -1,18 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
set_component_src hipSPARSELt
|
||||
|
||||
disable_debug_package_generation
|
||||
# if ENABLE_GPU_ARCH is set in env by Job parameter ENABLE_GPU_ARCH, then set GFX_ARCH to that value
|
||||
if [ -n "$ENABLE_GPU_ARCH" ]; then
|
||||
set_gpu_arch "$ENABLE_GPU_ARCH"
|
||||
else
|
||||
# gfx90a:xnack+;gfx90a:xnack-;gfx940;gfx941;gfx942
|
||||
set_gpu_arch "all"
|
||||
fi
|
||||
while [ "$1" != "" ];
|
||||
do
|
||||
case $1 in
|
||||
@@ -26,28 +18,6 @@ do
|
||||
shift 1
|
||||
done
|
||||
|
||||
create_blis_link()
|
||||
{
|
||||
#find the pre-installed blis library and create the link under $BUILD_DIR/deps/blis
|
||||
BLIS_REF_ROOT="$BUILD_DIR/deps/blis"
|
||||
mkdir -p "$BLIS_REF_ROOT"/include
|
||||
if [[ -e "/opt/AMD/aocl/aocl-linux-gcc-4.2.0/gcc/lib_ILP64/libblis-mt.a" ]]; then
|
||||
ln -sf /opt/AMD/aocl/aocl-linux-gcc-4.2.0/gcc/include_ILP64 ${BLIS_REF_ROOT}/include/blis
|
||||
ln -sf /opt/AMD/aocl/aocl-linux-gcc-4.2.0/gcc/lib_ILP64 ${BLIS_REF_ROOT}/lib
|
||||
elif [[ -e "/opt/AMD/aocl/aocl-linux-gcc-4.1.0/gcc/lib_ILP64/libblis-mt.a" ]]; then
|
||||
ln -sf /opt/AMD/aocl/aocl-linux-gcc-4.1.0/gcc/include_ILP64 ${BLIS_REF_ROOT}/include/blis
|
||||
ln -sf /opt/AMD/aocl/aocl-linux-gcc-4.1.0/gcc/lib_ILP64 ${BLIS_REF_ROOT}/lib
|
||||
elif [[ -e "/opt/AMD/aocl/aocl-linux-gcc-4.0.0/gcc/lib_ILP64/libblis-mt.a" ]]; then
|
||||
ln -sf /opt/AMD/aocl/aocl-linux-gcc-4.0.0/gcc/include_ILP64 ${BLIS_REF_ROOT}/include/blis
|
||||
ln -sf /opt/AMD/aocl/aocl-linux-gcc-4.0.0/gcc/lib_ILP64 ${BLIS_REF_ROOT}/lib
|
||||
elif [[ -e "/usr/local/lib/libblis.a" ]]; then
|
||||
ln -sf /usr/local/include/blis ${BLIS_REF_ROOT}/include/blis
|
||||
ln -sf /usr/local/lib ${BLIS_REF_ROOT}/lib
|
||||
else
|
||||
echo "error: BLIS lib not found."
|
||||
fi
|
||||
}
|
||||
|
||||
build_hipsparselt() {
|
||||
echo "Start build"
|
||||
|
||||
@@ -62,17 +32,21 @@ build_hipsparselt() {
|
||||
|
||||
cd $COMPONENT_SRC
|
||||
mkdir -p "$BUILD_DIR" && cd "$BUILD_DIR"
|
||||
if [ "${ENABLE_ADDRESS_SANITIZER}" == "true" ]; then
|
||||
create_blis_link
|
||||
EXTRA_CMAKE_OPTIONS="-DLINK_BLIS=ON -DBUILD_DIR=${BUILD_DIR}"
|
||||
fi
|
||||
|
||||
init_rocm_common_cmake_params
|
||||
|
||||
CXX=$(set_build_variables __CXX__) \
|
||||
if [ -n "$GPU_ARCHS" ]; then
|
||||
GPU_TARGETS="$GPU_ARCHS"
|
||||
else
|
||||
# gfx940;gfx941;gfx942
|
||||
GPU_TARGETS=all
|
||||
fi
|
||||
|
||||
FC=gfortran \
|
||||
CXX="${ROCM_PATH}/bin/hipcc" \
|
||||
cmake \
|
||||
-DAMDGPU_TARGETS=${GPU_TARGETS} \
|
||||
${LAUNCHER_FLAGS} \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
-DTensile_LOGIC= \
|
||||
-DTensile_CODE_OBJECT_VERSION=default \
|
||||
-DTensile_CPU_THREADS= \
|
||||
@@ -82,14 +56,13 @@ build_hipsparselt() {
|
||||
-DBUILD_CLIENTS_BENCHMARKS=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${ROCM_PATH} \
|
||||
-DBUILD_ADDRESS_SANITIZER="${ADDRESS_SANITIZER}" \
|
||||
${EXTRA_CMAKE_OPTIONS} \
|
||||
"$COMPONENT_SRC"
|
||||
|
||||
cmake --build "$BUILD_DIR" -- -j${PROC}
|
||||
cmake --build "$BUILD_DIR" -- install
|
||||
cmake --build "$BUILD_DIR" -- package
|
||||
|
||||
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
||||
mkdir -p $PACKAGE_DIR && cp ${BUILD_DIR}/*.${PKGTYPE} $PACKAGE_DIR
|
||||
|
||||
$SCCACHE_BIN -s || echo "Unable to display sccache stats"
|
||||
}
|
||||
@@ -113,7 +86,7 @@ print_output_directory() {
|
||||
}
|
||||
|
||||
case $TARGET in
|
||||
build) build_hipsparselt; build_wheel ;;
|
||||
build) build_hipsparselt ;;
|
||||
outdir) print_output_directory ;;
|
||||
clean) clean_hipsparselt ;;
|
||||
*) die "Invalid target $TARGET" ;;
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
|
||||
set -ex
|
||||
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
set_component_src hipTensor
|
||||
disable_debug_package_generation
|
||||
|
||||
build_hiptensor() {
|
||||
echo "Start build hipTensor"
|
||||
@@ -23,11 +22,17 @@ build_hiptensor() {
|
||||
mkdir -p "$BUILD_DIR" && cd "$BUILD_DIR"
|
||||
init_rocm_common_cmake_params
|
||||
|
||||
if [ -n "$GPU_ARCHS" ]; then
|
||||
GPU_TARGETS="$GPU_ARCHS"
|
||||
else
|
||||
GPU_TARGETS="gfx908:xnack-;gfx90a:xnack-;gfx90a:xnack+;gfx940;gfx941;gfx942"
|
||||
fi
|
||||
|
||||
cmake \
|
||||
-B "${BUILD_DIR}" \
|
||||
"${rocm_math_common_cmake_params[@]}" \
|
||||
"$(set_build_variables __CMAKE_CC_PARAMS__)" \
|
||||
"$(set_build_variables __CMAKE_CXX_PARAMS__)" \
|
||||
$(set_build_variables CMAKE_C_CXX) \
|
||||
-DAMDGPU_TARGETS=${GPU_TARGETS} \
|
||||
${LAUNCHER_FLAGS} \
|
||||
"$COMPONENT_SRC"
|
||||
|
||||
@@ -36,7 +41,7 @@ build_hiptensor() {
|
||||
cmake --build "$BUILD_DIR" -- package
|
||||
|
||||
rm -rf _CPack_Packages/ && find -name '*.o' -delete
|
||||
copy_if "${PKGTYPE}" "${CPACKGEN:-"DEB;RPM"}" "${PACKAGE_DIR}" "${BUILD_DIR}"/*."${PKGTYPE}"
|
||||
mkdir -p "$PACKAGE_DIR" && cp ${BUILD_DIR}/*.${PKGTYPE} "$PACKAGE_DIR"
|
||||
|
||||
show_build_cache_stats
|
||||
}
|
||||
@@ -50,7 +55,7 @@ clean_hiptensor() {
|
||||
stage2_command_args "$@"
|
||||
|
||||
case $TARGET in
|
||||
build) build_hiptensor; build_wheel ;;
|
||||
build) build_hiptensor ;;
|
||||
outdir) print_output_directory ;;
|
||||
clean) clean_hiptensor ;;
|
||||
*) die "Invalid target $TARGET" ;;
|
||||
|
||||
@@ -1,151 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "$(dirname "${BASH_SOURCE}")/compute_utils.sh"
|
||||
|
||||
printUsage() {
|
||||
echo
|
||||
echo "Usage: $(basename "${BASH_SOURCE}") [options ...] [make options]"
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " -c, --clean Clean output and delete all intermediate work"
|
||||
echo " -r, --release Make a release build instead of a debug build"
|
||||
echo " -a, --address_sanitizer Enable address sanitizer"
|
||||
echo " -o, --outdir <pkg_type> Print path of output directory containing packages of type referred to by pkg_type"
|
||||
echo " -s, --static Build static lib (.a). build instead of dynamic/shared(.so) "
|
||||
echo " -w, --wheel Creates python wheel package of hsa. It needs to be used along with -r option"
|
||||
echo " -h, --help Prints this help"
|
||||
echo
|
||||
echo
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
PROJ_NAME="rocr"
|
||||
TARGET="build"
|
||||
PACKAGE_ROOT="$(getPackageRoot)"
|
||||
PACKAGE_SRC="$(getSrcPath)"
|
||||
PACKAGE_LIB="$(getLibPath)"
|
||||
PACKAGE_BIN="$(getBinPath)"
|
||||
PACKAGE_DEB="$(getPackageRoot)/deb/$PROJ_NAME"
|
||||
PACKAGE_RPM="$(getPackageRoot)/rpm/$PROJ_NAME"
|
||||
MAKEARG=""
|
||||
CORE_BUILD_DIR="$(getBuildPath hsa-core)"
|
||||
ROCR_DEV_BUILD_DIR="$(getBuildPath hsa-rocr-dev)"
|
||||
PREFIX_PATH="$PACKAGE_ROOT"
|
||||
BUILD_TYPE="Debug"
|
||||
SHARED_LIBS="ON"
|
||||
CLEAN_OR_OUT=0;
|
||||
MAKETARGET="deb"
|
||||
PKGTYPE="deb"
|
||||
|
||||
unset HIP_DEVICE_LIB_PATH
|
||||
unset ROCM_PATH
|
||||
|
||||
#parse the arguments
|
||||
VALID_STR=`getopt -o hcraswo: --long help,clean,release,static,wheel,address_sanitizer,outdir: -- "$@"`
|
||||
eval set -- "$VALID_STR"
|
||||
|
||||
while true ;
|
||||
do
|
||||
#echo "parocessing $1"
|
||||
case "$1" in
|
||||
(-h | --help)
|
||||
printUsage ; exit 0;;
|
||||
(-c | --clean)
|
||||
TARGET="clean" ; ((CLEAN_OR_OUT|=1)) ; shift ;;
|
||||
(-r | --release)
|
||||
BUILD_TYPE="RelWithDebInfo" ; shift ;;
|
||||
(-a | --address_sanitizer)
|
||||
set_asan_env_vars
|
||||
set_address_sanitizer_on ; shift ;;
|
||||
(-s | --static)
|
||||
SHARED_LIBS="OFF" ; shift ;;
|
||||
(-w | --wheel)
|
||||
WHEEL_PACKAGE=true ; shift ;;
|
||||
(-o | --outdir)
|
||||
TARGET="outdir"; PKGTYPE=$2 ; OUT_DIR_SPECIFIED=1 ; ((CLEAN_OR_OUT|=2)) ; shift 2 ;;
|
||||
--) shift; break;; # end delimiter
|
||||
(*)
|
||||
echo " This should never come but just incase : UNEXPECTED ERROR Parm : [$1] ">&2 ; exit 20;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
RET_CONFLICT=1
|
||||
check_conflicting_options $CLEAN_OR_OUT $PKGTYPE $MAKETARGET
|
||||
if [ $RET_CONFLICT -ge 30 ]; then
|
||||
print_vars $API_NAME $TARGET $BUILD_TYPE $SHARED_LIBS $CLEAN_OR_OUT $PKGTYPE $MAKETARGET
|
||||
exit $RET_CONFLICT
|
||||
fi
|
||||
|
||||
clean_hsa() {
|
||||
echo "Cleaning HSA"
|
||||
|
||||
rm -rf "$CORE_BUILD_DIR"
|
||||
rm -rf "$PACKAGE_RPM"
|
||||
rm -rf "$PACKAGE_DEB"
|
||||
rm -f "$PACKAGE_ROOT"/lib/libhsa-runtime*
|
||||
rm -rf "$PACKAGE_ROOT/lib/cmake/hsa-runtime64"
|
||||
rm -rf "$PACKAGE_ROOT/include/hsa"
|
||||
rm -rf "$PACKAGE_ROOT/share/doc/hsa-runtime64"
|
||||
# Remove when switching to flat directory layout.
|
||||
rm -rf "$PACKAGE_ROOT/hsa"
|
||||
}
|
||||
|
||||
|
||||
build_hsa_core() {
|
||||
echo "Build HSA"
|
||||
local coreMakeOpts="$DASH_JAY -C $CORE_BUILD_DIR"
|
||||
|
||||
echo "$HSA_CORE_ROOT"
|
||||
|
||||
if [ ! -d "$CORE_BUILD_DIR" ]; then
|
||||
mkdir -p "$CORE_BUILD_DIR"
|
||||
pushd "$CORE_BUILD_DIR"
|
||||
print_lib_type $SHARED_LIBS
|
||||
|
||||
cmake $(rocm_cmake_params) \
|
||||
-DBUILD_SHARED_LIBS=$SHARED_LIBS \
|
||||
-DENABLE_LDCONFIG=OFF \
|
||||
$(rocm_common_cmake_params) \
|
||||
-DADDRESS_SANITIZER="$ADDRESS_SANITIZER" \
|
||||
"$HSA_CORE_ROOT"
|
||||
popd
|
||||
fi
|
||||
time cmake --build "$CORE_BUILD_DIR" -- $coreMakeOpts
|
||||
time cmake --build "$CORE_BUILD_DIR" -- $coreMakeOpts install
|
||||
time cmake --build "$CORE_BUILD_DIR" -- $coreMakeOpts package
|
||||
|
||||
copy_if DEB "${CPACKGEN:-"DEB;RPM"}" "$PACKAGE_DEB" $CORE_BUILD_DIR/hsa-rocr*.deb
|
||||
copy_if RPM "${CPACKGEN:-"DEB;RPM"}" "$PACKAGE_RPM" $CORE_BUILD_DIR/hsa-rocr*.rpm
|
||||
}
|
||||
|
||||
print_output_directory() {
|
||||
case ${PKGTYPE} in
|
||||
("deb")
|
||||
echo ${PACKAGE_DEB};;
|
||||
("rpm")
|
||||
echo ${PACKAGE_RPM};;
|
||||
(*)
|
||||
echo "Invalid package type \"${PKGTYPE}\" provided for -o" >&2; exit 1;;
|
||||
esac
|
||||
exit
|
||||
}
|
||||
|
||||
case $TARGET in
|
||||
(clean)
|
||||
clean_hsa
|
||||
;;
|
||||
(build)
|
||||
build_hsa_core
|
||||
build_wheel "$CORE_BUILD_DIR" "$PROJ_NAME"
|
||||
;;
|
||||
(outdir)
|
||||
print_output_directory
|
||||
;;
|
||||
(*)
|
||||
die "Invalid target $TARGET"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Operation complete"
|
||||
@@ -25,10 +25,7 @@ printUsage() {
|
||||
echo " -P, --package Generate packages"
|
||||
echo " -N, --skip_lit_tests Skip llvm lit testing (llvm lit testing is enabled by default)"
|
||||
echo " -M, --skip_man_pages Skip llvm documentation generation (man pages and rocm-llvm-docs package generation is enabled by default)"
|
||||
echo " --skip_utils Skip installation of LLVM Utils (FileCheck, not, etc.)"
|
||||
echo " -h, --help Prints this help"
|
||||
echo " --compiler_rt_debug Build a debug version of runtimes"
|
||||
echo " --compiler_rt_release Build a release version of runtimes (enabled by default)"
|
||||
echo
|
||||
echo
|
||||
|
||||
@@ -45,27 +42,17 @@ DEB_PATH="$(getDebPath $PROJ_NAME)"
|
||||
RPM_PATH="$(getRpmPath $PROJ_NAME)"
|
||||
INSTALL_PATH="${ROCM_INSTALL_PATH}/lib/llvm"
|
||||
LLVM_ROOT_LCL="${LLVM_ROOT}"
|
||||
ROCM_WHEEL_DIR="${BUILD_PATH}/_wheel"
|
||||
|
||||
TARGET="all"
|
||||
MAKEOPTS="$DASH_JAY"
|
||||
# Default to build release with Assertions ON
|
||||
BUILD_TYPE="Release"
|
||||
COMPILER_RT_DEBUG="OFF"
|
||||
# Enable assertions for all builds except release, nfar, and afar jobs.
|
||||
case "${JOB_NAME}" in
|
||||
( *"rel"* | \
|
||||
*"nfar"* )
|
||||
ENABLE_ASSERTIONS=0 ;;
|
||||
( * )
|
||||
ENABLE_ASSERTIONS=1 ;;
|
||||
esac
|
||||
ENABLE_ASSERTIONS=0
|
||||
SHARED_LIBS="ON"
|
||||
|
||||
# Build LLVM libraries for dynamically linking. Default is to build LLVM with statically linked libraries
|
||||
BUILD_LLVM_DYLIB="OFF"
|
||||
|
||||
FLANG_NEW=0
|
||||
CHK_FLANG=""
|
||||
CLEAN_OR_OUT=0;
|
||||
PKGTYPE="deb"
|
||||
MAKETARGET="deb"
|
||||
@@ -75,31 +62,19 @@ ASSERT_LLVM_VERSION_MINOR=""
|
||||
|
||||
SKIP_LIT_TESTS=0
|
||||
BUILD_MANPAGES="ON"
|
||||
LLVM_INSTALL_UTILS="ON"
|
||||
STATIC_FLAG=
|
||||
|
||||
SANITIZER_AMDGPU=1
|
||||
|
||||
if [ -d "$WORK_ROOT/ROCR-Runtime/runtime/hsa-runtime/inc/" ]; then
|
||||
HSA_INC_PATH="$WORK_ROOT/ROCR-Runtime/runtime/hsa-runtime/inc/"
|
||||
else
|
||||
HSA_INC_PATH="$WORK_ROOT/ROCR-Runtime/src/inc"
|
||||
fi
|
||||
COMGR_INC_PATH="$COMGR_ROOT/include"
|
||||
|
||||
#parse the arguments
|
||||
VALID_STR=`getopt -o hcV:v:draAswlo:BPNM --long help,clean,assert_llvm_ver_major:,assert_llvm_ver_minor:,debug,release,address_sanitizer,no_address_sanitizer,static,build_llvm_static,wheel,build,package,skip_lit_tests,skip_man_pages,skip_utils,compiler_rt_debug,compiler_rt_release,outdir: -- "$@"`
|
||||
VALID_STR=`getopt -o hcV:v:draAswlo:BPNM --long help,clean,assert_llvm_ver_major:,assert_llvm_ver_minor:,debug,release,address_sanitizer,no_address_sanitizer,static,build_llvm_static,wheel,build,package,skip_lit_tests,skip_man_pages,outdir: -- "$@"`
|
||||
eval set -- "$VALID_STR"
|
||||
|
||||
set_dwarf_version(){
|
||||
# In SLES and RHEL splitting debuginfo is getting failed(dwarf-5 unhandled) when compiler is set to clang.
|
||||
# By default -gdwarf-5 is used for the compression of debug symbols
|
||||
# So setting -gdwarf-4
|
||||
# SWDEV-462774: In RHEL/SLES with dwarf-4 enabled, seeing ASAN llvm build getting killed due to high memory usage.
|
||||
# So adding -gsplit-dwarf which splits the debug information into separate files to reduce memory usage during linking.
|
||||
case "$DISTRO_ID" in
|
||||
(sles*|rhel*)
|
||||
SET_DWARF_VERSION_4="-gdwarf-4 -gsplit-dwarf"
|
||||
SET_DWARF_VERSION_4="-gdwarf-4"
|
||||
;;
|
||||
(*)
|
||||
SET_DWARF_VERSION_4=""
|
||||
@@ -128,7 +103,9 @@ do
|
||||
BUILD_TYPE="Release" ; shift ;;
|
||||
(-a | --address_sanitizer)
|
||||
set_dwarf_version
|
||||
SANITIZER_AMDGPU=1 ; shift ;;
|
||||
SANITIZER_AMDGPU=1 ;
|
||||
HSA_INC_PATH="$WORK_ROOT/hsa/runtime/opensrc/hsa-runtime/inc" ;
|
||||
COMGR_INC_PATH="$COMGR_ROOT/include" ; shift ;;
|
||||
(-A | --no_address_sanitizer)
|
||||
SANITIZER_AMDGPU=0 ;
|
||||
unset HSA_INC_PATH ;
|
||||
@@ -150,12 +127,6 @@ do
|
||||
SKIP_LIT_TESTS=1; shift ;;
|
||||
(-M | --skip_man_pages)
|
||||
BUILD_MANPAGES="OFF"; shift ;;
|
||||
(--skip_utils)
|
||||
LLVM_INSTALL_UTILS="OFF"; shift ;;
|
||||
(--compiler_rt_debug)
|
||||
COMPILER_RT_DEBUG="ON"; shift ;;
|
||||
(--compiler_rt_release)
|
||||
COMPILER_RT_DEBUG="OFF"; shift ;;
|
||||
--) shift; break;; # end delimiter
|
||||
(*)
|
||||
echo " This should not happen : UNEXPECTED ERROR Parm : [$1] ">&2 ; exit 20;;
|
||||
@@ -174,51 +145,38 @@ LLVM_PROJECTS="clang;lld;clang-tools-extra"
|
||||
ENABLE_RUNTIMES="compiler-rt;libunwind"
|
||||
BOOTSTRAPPING_BUILD_LIBCXX=0
|
||||
BUILD_AMDCLANG="ON"
|
||||
# build libcxx to support the amdclang binary
|
||||
|
||||
ENABLE_RUNTIMES="$ENABLE_RUNTIMES;libcxx;libcxxabi"
|
||||
BOOTSTRAPPING_BUILD_LIBCXX=1
|
||||
|
||||
clean_lightning() {
|
||||
# Delete cmake output directory
|
||||
rm -rf "$ROCM_WHEEL_DIR"
|
||||
rm -rf "$BUILD_PATH"
|
||||
rm -rf "$DEB_PATH"
|
||||
rm -rf "$RPM_PATH"
|
||||
}
|
||||
|
||||
# Collect LLVM/Clang git information for clang --version output.
|
||||
# Include repo name, branch name and gitdate.
|
||||
setup_llvm_info() {
|
||||
# Allow this function to fail repo and git commands, but not crash the build.
|
||||
set +e
|
||||
mkdir -p "$LLVM_ROOT_LCL"
|
||||
pushd "$LLVM_ROOT_LCL"
|
||||
# Initialize local variable. Does not include
|
||||
# LLVM_COMMIT_GITDATE and LLVM_REPO_INFO.
|
||||
local LLVM_REMOTE_NAME
|
||||
local LLVM_URL_NAME
|
||||
local LLVM_BRANCH_NAME
|
||||
local LLVM_URL_BRANCH
|
||||
|
||||
# Release Build: set url to external repo.
|
||||
# Internal Build: set url to actual url.
|
||||
if [[ "${JOB_NAME}" == *rel* ]]; then
|
||||
LLVM_URL_NAME="https://github.com/RadeonOpenCompute/llvm-project"
|
||||
# Release branch follows convention roc-X.Y.x according to CI.
|
||||
LLVM_BRANCH_NAME="roc-${ROCM_VERSION}"
|
||||
LLVM_URL_BRANCH="${LLVM_URL_NAME} ${LLVM_BRANCH_NAME}"
|
||||
LLVM_URL_NAME="https://github.com/RadeonOpenCompute/llvm-project"
|
||||
LLVM_BRANCH_NAME="roc-${ROCM_VERSION}"
|
||||
LLVM_URL_BRANCH="${LLVM_URL_NAME} ${LLVM_BRANCH_NAME}"
|
||||
else
|
||||
LLVM_REMOTE_NAME=$(git remote)
|
||||
LLVM_URL_NAME=$(git config --get remote."${LLVM_REMOTE_NAME}".url)
|
||||
# Parse the manifest to obtain upstream branch.
|
||||
LLVM_BRANCH_NAME=$(repo manifest | sed -n 's/.*path="external\/llvm-project".* upstream="\([^"]*\)".*/\1/p' )
|
||||
LLVM_URL_BRANCH="${LLVM_URL_NAME} ${LLVM_BRANCH_NAME}"
|
||||
LLVM_REMOTE_NAME=$(git remote)
|
||||
LLVM_URL_NAME=$(git config --get remote."${LLVM_REMOTE_NAME}".url)
|
||||
LLVM_BRANCH_NAME=$(repo manifest | sed -n 's/.*path="external\/llvm-project".* upstream="\([^"]*\)".*/\1/p' )
|
||||
LLVM_URL_BRANCH="${LLVM_URL_NAME} ${LLVM_BRANCH_NAME}"
|
||||
fi
|
||||
|
||||
# Obtain git date information based on UTC time.
|
||||
# Format date as yyuuw - [last two digits of year][work week][day of week].
|
||||
# Use xargs to remove trailing newline character.
|
||||
LLVM_COMMIT_GITDATE=$(git show -s --format=@%ct | xargs | date -f - --utc +%y%U%w)
|
||||
# Organize into REPO BRANCH GITDATE
|
||||
LLVM_REPO_INFO="${LLVM_URL_BRANCH} ${LLVM_COMMIT_GITDATE}"
|
||||
|
||||
popd
|
||||
@@ -242,37 +200,25 @@ get_llvm_version() {
|
||||
echo "Detected LLVM version from source: ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}"
|
||||
}
|
||||
|
||||
# Generate compiler config files with default ROCm settings
|
||||
create_compiler_config_files() {
|
||||
local llvm_bin_dir="${INSTALL_PATH}/bin"
|
||||
local rocm_cfg="rocm.cfg"
|
||||
|
||||
# rocm.cfg content
|
||||
{
|
||||
echo "-Wl,--enable-new-dtags"
|
||||
echo "--rocm-path='<CFGDIR>/../../..'"
|
||||
echo "-frtlib-add-rpath"
|
||||
} > "${llvm_bin_dir}/$rocm_cfg"
|
||||
|
||||
local compiler_commands=("clang" "clang++" "clang-cpp" "clang-${LLVM_VERSION_MAJOR}" "clang-cl" )
|
||||
local compiler_commands=("clang" "clang++" "clang-cpp" "clang-${LLVM_VERSION_MAJOR}" "clang-cl" "flang" "flang-new")
|
||||
for i in "${compiler_commands[@]}"; do
|
||||
if [ -f "$llvm_bin_dir/$i" ]; then
|
||||
local config_file="${llvm_bin_dir}/${i}.cfg"
|
||||
echo "@${rocm_cfg}" > $config_file
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $FLANG_NEW -eq 1 ]; then
|
||||
local flang_commands=("flang" "flang-new" "flang-classic")
|
||||
for i in "${flang_commands[@]}"; do
|
||||
local config_file="${llvm_bin_dir}/${i}.cfg"
|
||||
echo "@${rocm_cfg}" > $config_file
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to check if a list contains an element
|
||||
# return true if $1 is in $2...
|
||||
contains(){
|
||||
|
||||
local target=$1 element
|
||||
@@ -284,7 +230,6 @@ contains(){
|
||||
}
|
||||
|
||||
build_lightning() {
|
||||
# Obtain LLVM build information
|
||||
setup_llvm_info
|
||||
|
||||
get_llvm_version
|
||||
@@ -303,59 +248,11 @@ build_lightning() {
|
||||
fi
|
||||
fi
|
||||
|
||||
# Upstream llvm option -DCLANG_DEFAULT_PIE_ON_LINUX changed to ON
|
||||
# by default however, it breaks ROCM builds on SLES/CentOS distros
|
||||
# so disabling it for now in lighting compiler builds.
|
||||
# Todo : this should be removed to follow the upstream's default.
|
||||
DISABLE_PIE=0
|
||||
|
||||
# Find out distro / RHEL build here to adjust Python version for building LLVM if needed.
|
||||
case "$DISTRO_ID" in
|
||||
(rhel*|centos*)
|
||||
RHEL_BUILD=1
|
||||
;;
|
||||
(*)
|
||||
RHEL_BUILD=0
|
||||
;;
|
||||
esac
|
||||
|
||||
# Special handling for Debian 10
|
||||
# - gcc is too ancient and can't build LLVM, switch to clang-13 instead
|
||||
# - zstd is severely out-of-date and can't support LLVM, disable it
|
||||
case "$DISTRO_ID" in
|
||||
(debian-10)
|
||||
BUILD_COMPILER_LINKER_FLAGS=("-DCMAKE_C_COMPILER=/usr/bin/clang-13" "-DCMAKE_CXX_COMPILER=/usr/bin/clang++-13" "-DLLVM_USE_LINKER=lld")
|
||||
LLVM_COMPRESSION_FLAGS=("-DLLVM_ENABLE_ZLIB=ON" "-DLLVM_ENABLE_ZSTD=OFF")
|
||||
;;
|
||||
(*)
|
||||
BUILD_COMPILER_LINKER_FLAGS=()
|
||||
LLVM_COMPRESSION_FLAGS=("-DLLVM_ENABLE_ZLIB=ON")
|
||||
;;
|
||||
esac
|
||||
|
||||
# Upstream moved to requiring Python 3.8 as the minimum.
|
||||
# Point CMake to that explicit location and adjust LD_LIBRARY_PATH.
|
||||
PYTHON_VERSION_WORKAROUND=''
|
||||
# TODO: Workshop the condition before landing, only to show
|
||||
# what needs to be done for the Python issue.
|
||||
echo "build_lightning DISTRO_ID: ${DISTRO_ID}"
|
||||
if [[ "$DISTRO_ID" == "rhel-8"* || "$DISTRO_NAME" == "sles" || "$DISTRO_ID" == "debian-10" ]]; then
|
||||
EXTRA_PYTHON_PATH=/opt/Python-3.8.13
|
||||
PYTHON_VERSION_WORKAROUND="-DPython3_EXECUTABLE=${EXTRA_PYTHON_PATH}/bin/python3.8"
|
||||
# For the python interpreter we need to export LD_LIBRARY_PATH.
|
||||
# XXX: This is only needed during CMake and ninja check-* targets, maybe we can limit scope further?
|
||||
export LD_LIBRARY_PATH=${EXTRA_PYTHON_PATH}/lib:$LD_LIBRARY_PATH
|
||||
fi
|
||||
|
||||
# Start CMake Build
|
||||
mkdir -p "$BUILD_PATH"
|
||||
pushd "$BUILD_PATH"
|
||||
|
||||
#Extra llvm cmake parameter can be passed from an environment variable EXTRA_LLVM_CMAKE_PARAMS
|
||||
#For example:
|
||||
# export EXTRA_LLVM_CMAKE_PARAMS='-DLLVM_LIT_ARGS="-sv -j8" -DP2=1'
|
||||
#Alternatively, this variable can be prefixed to this script:
|
||||
# EXTRA_LLVM_CMAKE_PARAMS='-DLLVM_LIT_ARGS="-sv -j8" -DP2=1' build_lightning.sh
|
||||
eval EXTRA_LLVM_CMAKE_PARAMS_ARRAY=($EXTRA_LLVM_CMAKE_PARAMS)
|
||||
|
||||
if [ ! -e Makefile ]; then
|
||||
@@ -364,8 +261,14 @@ build_lightning() {
|
||||
if [ -e "$LLVM_ROOT_LCL/../flang/EnableFlangBuild" ]; then
|
||||
FLANG_NEW=1
|
||||
LLVM_PROJECTS="$LLVM_PROJECTS;flang"
|
||||
ENABLE_RUNTIMES="$ENABLE_RUNTIMES;openmp";
|
||||
else
|
||||
echo "NOT building project flang"
|
||||
if [[ "${JOB_NAME}" != *afar* ]] && [ -e "$LLVM_ROOT_LCL/../flang/DoROCmRelease" ]; then
|
||||
FLANG_NEW=1
|
||||
LLVM_PROJECTS="$LLVM_PROJECTS;flang"
|
||||
else
|
||||
echo "NOT building project flang"
|
||||
fi
|
||||
fi
|
||||
set -x
|
||||
cmake $(rocm_cmake_params) ${GEN_NINJA} \
|
||||
@@ -410,14 +313,8 @@ build_lightning() {
|
||||
-DROCM_LLVM_BACKWARD_COMPAT_LINK="$ROCM_INSTALL_PATH/llvm" \
|
||||
-DROCM_LLVM_BACKWARD_COMPAT_LINK_TARGET="./lib/llvm" \
|
||||
-DCLANG_LINK_FLANG_LEGACY=ON \
|
||||
-DFLANG_RUNTIME_F128_MATH_LIB=libquadmath \
|
||||
-DLIBOMPTARGET_BUILD_DEVICE_FORTRT=ON \
|
||||
-DCMAKE_CXX_STANDARD=17 \
|
||||
-DFLANG_INCLUDE_DOCS=OFF \
|
||||
-DLLVM_INSTALL_UTILS="$LLVM_INSTALL_UTILS" \
|
||||
-DCOMPILER_RT_DEBUG="$COMPILER_RT_DEBUG" \
|
||||
"${BUILD_COMPILER_LINKER_FLAGS[@]}" \
|
||||
"${LLVM_COMPRESSION_FLAGS[@]}" \
|
||||
"${EXTRA_LLVM_CMAKE_PARAMS_ARRAY[@]}" \
|
||||
"$LLVM_ROOT_LCL"
|
||||
set +x
|
||||
@@ -427,42 +324,28 @@ build_lightning() {
|
||||
echo "Building LLVM"
|
||||
|
||||
if [ $BOOTSTRAPPING_BUILD_LIBCXX -eq 1 ]; then
|
||||
# The following is to do a bootstrap build of libc++ to support
|
||||
# amdclang, which needs the C++17 std::filesystem library
|
||||
# build clang first
|
||||
cmake --build . -- $MAKEOPTS clang lld compiler-rt
|
||||
# build libc++ and libcxxabi using the just-built clang
|
||||
cmake --build . -- $MAKEOPTS runtimes cxx
|
||||
fi
|
||||
|
||||
# Remove these 12 lines
|
||||
echo "Workaround for race condition"
|
||||
# find make targets like clang_rt.asan-dynamic-ARCH-version-list
|
||||
# and prebuild them. ARCH will include x86_64 but might also
|
||||
# include i386, depending on the build environment.
|
||||
# TODO figure out why ubuntu 18 builds the i386, but sles, centos
|
||||
# and ubuntu 20 do not. If we can stop ubuntu 18 then it might
|
||||
# give us some speed.
|
||||
#for prebuild in $(make help | sed -n '/-version-list/s/^... //p') ; do
|
||||
# make $MAKEOPTS $prebuild
|
||||
#done
|
||||
echo "End Workaround for race condition"
|
||||
cmake --build . -- $MAKEOPTS
|
||||
# FIXME: check-all would be better, but some tests require sys calls that
|
||||
# are not allowed in the CI dockers and so fail. Switch to check-all
|
||||
# when possible.
|
||||
# FIXME: disable testing on sles; a test is failing for unknown reasons
|
||||
# and breaking the sles build; keep it enabled everywhere else
|
||||
# FIXME: disable check-clang on rhel; python 3.8 issue
|
||||
# and breaking the rhel build; keep it enabled everywhere else
|
||||
|
||||
case "$DISTRO_ID" in
|
||||
(rhel*|centos*)
|
||||
RHEL_BUILD=1
|
||||
;;
|
||||
(*)
|
||||
RHEL_BUILD=0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ $SKIP_LIT_TESTS -eq 0 ]; then
|
||||
if [ $FLANG_NEW -eq 1 ]; then
|
||||
CHK_FLANG="check-flang"
|
||||
fi
|
||||
if [ $RHEL_BUILD -eq 1 ]; then
|
||||
cmake --build . -- $MAKEOPTS check-lld check-mlir
|
||||
elif [ "$DISTRO_NAME" != "sles" ]; then
|
||||
cmake --build . -- $MAKEOPTS check-llvm check-clang check-lld check-mlir $CHK_FLANG
|
||||
cmake --build . -- $MAKEOPTS check-llvm check-clang check-lld check-mlir
|
||||
fi
|
||||
fi
|
||||
cmake --build . -- $MAKEOPTS clang-tidy
|
||||
@@ -473,21 +356,17 @@ build_lightning() {
|
||||
|
||||
package_lightning_dynamic(){
|
||||
|
||||
# do common stuff here:
|
||||
if [ "$BUILD_TYPE" == "Debug" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# Echos ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}
|
||||
get_llvm_version
|
||||
# We require the LLVM major, minor and patch. Scrub the LLVM_VERSION_SUFFIX.
|
||||
local llvmParsedVersion="${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}"
|
||||
local packageName="rocm-llvm"
|
||||
local packageSummary="ROCm compiler"
|
||||
local packageSummaryLong="ROCm compiler based on LLVM $llvmParsedVersion"
|
||||
local installPath="$ROCM_INSTALL_PATH/lib/llvm/"
|
||||
|
||||
# setup for rocm-llvm-core package
|
||||
if [ "$BUILD_LLVM_DYLIB" == "ON" ] ; then
|
||||
local packageNameCore="rocm-llvm-core"
|
||||
local packageSummaryCore="ROCm core compiler dylibs"
|
||||
@@ -506,16 +385,14 @@ package_lightning_dynamic(){
|
||||
local packageDir="$BUILD_PATH/package"
|
||||
local backwardsCompatibleSymlink="$ROCM_INSTALL_PATH/llvm"
|
||||
|
||||
# Debian specific
|
||||
local packageDeb="$packageDir/deb"
|
||||
local controlFile="$packageDeb/DEBIAN/control"
|
||||
local postinstFile="$packageDeb/DEBIAN/postinst"
|
||||
local prermFile="$packageDeb/DEBIAN/prerm"
|
||||
local specFile="$packageDir/$packageName.spec"
|
||||
local debDependencies="python3, libc6, libstdc++6|libstdc++8, libstdc++-5-dev|libstdc++-7-dev|libstdc++-11-dev, libgcc-5-dev|libgcc-7-dev|libgcc-11-dev, rocm-core"
|
||||
local debRecommends="gcc, g++, gcc-multilib, g++-multilib, rocm-device-libs"
|
||||
local debRecommends="gcc, g++, gcc-multilib, g++-multilib"
|
||||
|
||||
# RPM specific
|
||||
local packageRpm="$packageDir/rpm"
|
||||
local packageRpmCore="$packageDir/rpm"
|
||||
local specFile="$packageDir/$packageName.spec"
|
||||
@@ -525,15 +402,14 @@ package_lightning_dynamic(){
|
||||
rpmRequires+=", rocm-llvm-core"
|
||||
fi
|
||||
local rpmRequiresCore="rocm-core"
|
||||
local rpmRecommends="gcc, gcc-c++, devtoolset-7-gcc-c++, rocm-device-libs"
|
||||
local rpmRecommends="gcc, gcc-c++, devtoolset-7-gcc-c++"
|
||||
|
||||
# Cleanup previous packages
|
||||
rm -rf "$packageDir"
|
||||
echo "rm -rf $packageDir"
|
||||
rm -rf "$DEB_PATH"
|
||||
|
||||
local amd_compiler_commands=("amdclang" "amdclang++" "amdclang-cl" "amdclang-cpp" "amdflang" "amdflang-new" "amdflang-legacy" "amdflang-classic" "amdlld" "offload-arch")
|
||||
local amd_man_pages=("amdclang.1.gz" "amdclang++.1.gz" "flang.1.gz" "amdflang.1.gz")
|
||||
local amd_compiler_commands=("amdclang" "amdclang++" "amdclang-cl" "amdclang-cpp" "amdflang" "amdlld" "offload-arch")
|
||||
local amd_man_pages=("amdclang.1.gz" "flang.1.gz" "amdflang.1.gz")
|
||||
local man_pages=("bugpoint.1" "FileCheck.1" "llvm-ar.1" "llvm-cxxmap.1" "llvm-extract.1" "llvm-lipo.1" "llvm-otool.1" "llvm-readobj.1" "llvm-symbolizer.1" "tblgen.1"
|
||||
"clang.1" "lit.1" "llvm-as.1" "llvm-diff.1" "llvm-ifs.1" "llvm-locstats.1" "llvm-pdbutil.1" "llvm-remarkutil.1" "llvm-tblgen.1" "clang-tblgen.1"
|
||||
"llc.1" "llvm-bcanalyzer.1" "llvm-dis.1" "llvm-install-name-tool.1" "llvm-mca.1" "llvm-profdata.1" "llvm-size.1" "llvm-tli-checker.1" "diagtool.1"
|
||||
@@ -541,22 +417,17 @@ package_lightning_dynamic(){
|
||||
"llvm-cov.1" "llvm-dwarfutil.1" "llvm-libtool-darwin.1" "llvm-objcopy.1" "llvm-ranlib.1" "llvm-strings.1" "opt.1" "extraclangtools.1" "llvm-addr2line.1"
|
||||
"llvm-cxxfilt.1" "llvm-exegesis.1" "llvm-link.1" "llvm-objdump.1" "llvm-readelf.1" "llvm-strip.1")
|
||||
|
||||
# Only build deb in Ubuntu environment
|
||||
if [ "$PACKAGEEXT" = "deb" ]; then
|
||||
# Debian packaging
|
||||
|
||||
mkdir -p "$packageDeb/$installPath"
|
||||
mkdir -p "$(dirname $controlFile)"
|
||||
mkdir -p "$DEB_PATH"
|
||||
mkdir -p "$packageDeb/$licenseDir"
|
||||
|
||||
# build the rocm-llvm-core package first:
|
||||
# we only need some .so files, and we're doing a MV so that they're not picked up in the next (rocm-llvm) package.
|
||||
if [ "$BUILD_LLVM_DYLIB" == "ON" ] ; then
|
||||
|
||||
mkdir -p "$packageDeb/$licenseDirCore"
|
||||
|
||||
# Copy the LICENSE file to rocm-core
|
||||
cp -r "$LLVM_ROOT_LCL/LICENSE.TXT" "$packageDeb/$licenseDirCore"
|
||||
|
||||
cp -P "$distLib/libLLVM"*"so"* "$packageDeb/$installPath/"
|
||||
@@ -578,36 +449,28 @@ package_lightning_dynamic(){
|
||||
fakeroot dpkg-deb -Zgzip --build $packageDeb \
|
||||
"${DEB_PATH}/${packageNameCore}_${packageVersion}.${ROCM_LIBPATCH_VERSION}-${JOB_DESIGNATOR}${BUILD_ID}~${DISTRO_RELEASE}_${packageArch}.deb"
|
||||
|
||||
# clean up, get ready for rocm-llvm
|
||||
rm -rf "$controlFile"
|
||||
rm -rf "$packageDeb/$licenseDirCore"
|
||||
|
||||
#remove the LLVM/Clang dylibs we already packaged in rocm-llvm-core
|
||||
rm -f "$packageDeb/$installPath/libLLVM"*"so"*
|
||||
rm -f "$packageDeb/$installPath/libFortran"*"so"*
|
||||
rm -f "$packageDeb/$installPath/libclang"*"so"*
|
||||
|
||||
mkdir -p "$(dirname $controlFile)"
|
||||
|
||||
# clean up dylibs we already packaged:
|
||||
rm -rf "$packageDeb/$installPath/*"
|
||||
|
||||
# add this rocm-llvm-core package as a dependency for rocm-llvm
|
||||
debDependencies="${debDependencies}, ${packageNameCore}"
|
||||
fi # end of building rocm-llvm-core package
|
||||
fi
|
||||
|
||||
# now build rocm-llvm:
|
||||
# Install license file in rocm-llvm package .
|
||||
cp -r "$LLVM_ROOT_LCL/LICENSE.TXT" "$packageDeb/$licenseDir"
|
||||
cp -r "$distBin" "$packageDeb/$installPath/bin"
|
||||
cp -r "$distInc" "$packageDeb/$installPath/include"
|
||||
cp -r "$distLib" "$packageDeb/$installPath/lib"
|
||||
if [ "$BUILD_MANPAGES" == "ON" ]; then
|
||||
# zip the generated man pages before installing them in the package
|
||||
for i in "${man_pages[@]}"; do
|
||||
gzip -f "$distMan/man1/$i"
|
||||
done
|
||||
# Create symbolic links for amd man pages
|
||||
if [ -f "$distMan/man1/clang.1.gz" ]; then
|
||||
for i in "${amd_man_pages[@]}"; do
|
||||
ln -sf "clang.1.gz" "$distMan/man1/$i"
|
||||
@@ -644,14 +507,11 @@ package_lightning_dynamic(){
|
||||
"${DEB_PATH}/${packageName}_${packageVersion}.${ROCM_LIBPATCH_VERSION}-${JOB_DESIGNATOR}${BUILD_ID}~${DISTRO_RELEASE}_${packageArch}.deb"
|
||||
fi
|
||||
|
||||
# Only build RPM in CentOS or SLES or RHEL or Mariner environment
|
||||
if [ "$PACKAGEEXT" = "rpm" ]; then
|
||||
# RPM packaging
|
||||
mkdir -p "$(dirname $specFile)"
|
||||
rm -rf "$RPM_PATH"
|
||||
mkdir -p "$RPM_PATH"
|
||||
|
||||
# set up for rocm-llvm-core package
|
||||
if [ "$BUILD_LLVM_DYLIB" == "ON" ] ; then
|
||||
echo "Name: $packageNameCore" > $specFileCore
|
||||
echo "Version: ${packageVersion}.${ROCM_LIBPATCH_VERSION}" >> $specFileCore
|
||||
@@ -682,11 +542,6 @@ package_lightning_dynamic(){
|
||||
echo "rm -rf \$RPM_BUILD_ROOT/$installPath" >> $specFileCore
|
||||
echo "%files " >> $specFileCore
|
||||
echo "%defattr(-,root,root,-)" >> $specFileCore
|
||||
# Note: In some OS like SLES, during upgrade rocm-core is getting upgraded first and followed by other packages
|
||||
# rocm-core cannot delete rocm-ver folder, since it contains files of other packages that are yet to be upgraded
|
||||
# To remove rocm-ver folder after upgrade the spec file of other packages should contain the rocm-ver directory
|
||||
# Otherwise after upgrade empty old rocm-ver folder will be left out.
|
||||
# If empty remove /opt/rocm-ver folder and its subdirectories created by rocm-llvm-core package
|
||||
echo "$ROCM_INSTALL_PATH" >> $specFileCore
|
||||
|
||||
echo "%post" >> $specFileCore
|
||||
@@ -697,9 +552,8 @@ package_lightning_dynamic(){
|
||||
rpmbuild --define "_topdir $packageRpmCore" -ba $specFileCore
|
||||
|
||||
mv $packageRpm/RPMS/x86_64/*.rpm $RPM_PATH
|
||||
fi # end of building rocm-lllvm-core package
|
||||
fi
|
||||
|
||||
# setup for rocm-llvm package
|
||||
echo "Name: $packageName" > $specFile
|
||||
echo "Version: ${packageVersion}.${ROCM_LIBPATCH_VERSION}" >> $specFile
|
||||
echo "Release: ${JOB_DESIGNATOR}${SLES_BUILD_ID_PREFIX}${BUILD_ID}%{?dist}" >> $specFile
|
||||
@@ -732,11 +586,9 @@ package_lightning_dynamic(){
|
||||
echo "cp -R $distInc \$RPM_BUILD_ROOT/$installPath" >> $specFile
|
||||
echo "cp -R $distLib \$RPM_BUILD_ROOT/$installPath" >> $specFile
|
||||
if [ "$BUILD_MANPAGES" == "ON" ]; then
|
||||
# zip the generated man pages before installing them in the package
|
||||
for i in "${man_pages[@]}"; do
|
||||
echo "gzip -f $distMan/man1/$i" >> $specFile
|
||||
done
|
||||
# Create symbolic links for amd man pages
|
||||
if [ -f "$distMan/man1/clang.1.gz" ]; then
|
||||
for i in "${amd_man_pages[@]}"; do
|
||||
echo "ln -sf clang.1.gz \"$distMan/man1/$i\"" >> $specFile
|
||||
@@ -755,11 +607,6 @@ package_lightning_dynamic(){
|
||||
fi
|
||||
|
||||
echo "%defattr(-,root,root,-)" >> $specFile
|
||||
# Note: In some OS like SLES, during upgrade rocm-core is getting upgraded first and followed by other packages
|
||||
# rocm-core cannot delete rocm-ver folder, since it contains files of other packages that are yet to be upgraded
|
||||
# To remove rocm-ver folder after upgrade the spec file of other packages should contain the rocm-ver directory
|
||||
# Otherwise after upgrade empty old rocm-ver folder will be left out.
|
||||
# If empty remove /opt/rocm-ver folder and its subdirectories created by rocm-llvm package
|
||||
echo "$ROCM_INSTALL_PATH" >> $specFile
|
||||
|
||||
echo "%post" >> $specFile
|
||||
@@ -786,21 +633,16 @@ package_lightning_dynamic(){
|
||||
|
||||
package_lightning_static() {
|
||||
|
||||
# do common stuff here:
|
||||
if [ "$BUILD_TYPE" == "Debug" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# Echo the LLVM version ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}
|
||||
get_llvm_version
|
||||
# We require the LLVM major, minor and patch. Scrub the LLVM_VERSION_SUFFIX.
|
||||
local llvmParsedVersion="${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}"
|
||||
|
||||
# setup for rocm-llvm package
|
||||
local packageName="rocm-llvm"
|
||||
local packageSummary="ROCm core compiler"
|
||||
local packageSummaryLong="ROCm core compiler based on LLVM $llvmParsedVersion"
|
||||
# setup for rocm-llvm-dev package
|
||||
if [ "$PACKAGEEXT" = "deb" ]; then
|
||||
local packageNameExtra="rocm-llvm-dev"
|
||||
else
|
||||
@@ -821,46 +663,40 @@ package_lightning_static() {
|
||||
local packageDir="$BUILD_PATH/package"
|
||||
local backwardsCompatibleSymlink="$ROCM_INSTALL_PATH/llvm"
|
||||
|
||||
# Debian specific
|
||||
local packageDeb="$packageDir/deb"
|
||||
local controlFile="$packageDeb/DEBIAN/control"
|
||||
local postinstFile="$packageDeb/DEBIAN/postinst"
|
||||
local prermFile="$packageDeb/DEBIAN/prerm"
|
||||
local specFile="$packageDir/$packageName.spec"
|
||||
local debDependencies="python3, libc6, libstdc++6|libstdc++8, libstdc++-5-dev|libstdc++-7-dev|libstdc++-11-dev, libgcc-5-dev|libgcc-7-dev|libgcc-11-dev, rocm-core"
|
||||
local debRecommends="gcc, g++, gcc-multilib, g++-multilib, rocm-device-libs"
|
||||
local debRecommends="gcc, g++, gcc-multilib, g++-multilib"
|
||||
|
||||
# RPM specific
|
||||
local packageRpm="$packageDir/rpm"
|
||||
local packageRpmExtra="$packageDir/rpm"
|
||||
local specFile="$packageDir/$packageName.spec"
|
||||
local specFileExtra="$packageDir/$packageNameExtra.spec"
|
||||
local rpmRequires="rocm-core"
|
||||
local rpmRequiresExtra="rocm-core, $packageName"
|
||||
#local rpmRecommends="gcc, gcc-c++, devtoolset-7-gcc-c++, rocm-device-libs"
|
||||
local rpmRecommends="rocm-device-libs"
|
||||
local rpmRecommends="gcc, gcc-c++, devtoolset-7-gcc-c++"
|
||||
|
||||
# Cleanup previous packages
|
||||
rm -rf "$packageDir"
|
||||
echo "rm -rf $packageDir"
|
||||
rm -rf "$DEB_PATH"
|
||||
|
||||
local amd_compiler_commands=("amdclang" "amdclang++" "amdclang-cl" "amdclang-cpp" "amdflang" "amdflang-new" "amdflang-legacy" "amdflang-classic" "amdlld" "offload-arch")
|
||||
local amd_man_pages=("amdclang.1.gz" "amdclang++.1.gz" "flang.1.gz" "amdflang.1.gz")
|
||||
local core_bin=("amd-llvm-spirv" "amdgpu-arch" "amdgpu-offload-arch" "amdlld" "amdllvm" "clang" "clang++" "clang-${LLVM_VERSION_MAJOR}" "clang-cl"
|
||||
"clang-cpp" "clang-build-select-link" "clang-offload-bundler" "clang-offload-packager" "clang-offload-wrapper" "clang-linker-wrapper" "clang-nvlink-wrapper" "flang" "flang-new" "flang-legacy" "flang-classic" "llvm-symbolizer"
|
||||
local amd_compiler_commands=("amdclang" "amdclang++" "amdclang-cl" "amdclang-cpp" "amdflang" "amdlld" "offload-arch")
|
||||
local amd_man_pages=("amdclang.1.gz" "flang.1.gz" "amdflang.1.gz")
|
||||
local core_bin=("amdgpu-arch" "amdgpu-offload-arch" "amdlld" "amdllvm" "clang" "clang++" "clang-${LLVM_VERSION_MAJOR}" "clang-cl"
|
||||
"clang-cpp" "clang-build-select-link" "clang-offload-bundler" "clang-offload-packager" "clang-offload-wrapper" "clang-linker-wrapper" "clang-nvlink-wrapper" "flang" "flang-new"
|
||||
"ld64.lld" "ld.lld" "llc" "lld" "lld-link" "llvm-ar" "llvm-bitcode-strip" "llvm-dwarfdump" "llvm-install-name-tool"
|
||||
"llvm-link" "llvm-mc" "llvm-objcopy" "llvm-objdump" "llvm-otool" "llvm-ranlib" "llvm-readelf" "llvm-readobj" "llvm-strip"
|
||||
"nvidia-arch" "nvptx-arch" "offload-arch" "opt" "wasm-ld" "amdclang" "amdclang++" "amdclang-${LLVM_VERSION_MAJOR}" "amdclang-cl"
|
||||
"amdclang-cpp" "amdflang" "amdflang-new" "amdflang-legacy" "amdflang-classic"
|
||||
"clang++.cfg" "clang-${LLVM_VERSION_MAJOR}.cfg" "clang-cl.cfg" "clang-cpp.cfg" "clang.cfg" "rocm.cfg"
|
||||
"flang.cfg" "flang-new.cfg" "flang-classic.cfg" )
|
||||
"amdclang-cpp" "amdflang"
|
||||
"clang++.cfg" "clang-${LLVM_VERSION_MAJOR}.cfg" "clang-cl.cfg" "clang-cpp.cfg" "clang.cfg" "rocm.cfg")
|
||||
local core_lib=("libclang-cpp.so.${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}" "libclang-cpp.so" "libclang.so"
|
||||
"libclang-cpp.so.${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX}"
|
||||
"libclang.so.${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}"
|
||||
"libclang.so.${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}"
|
||||
"libFortranSemantics.a" "libFortranLower.a" "libFortranParser.a" "libFortranCommon.a"
|
||||
"libFortranRuntime.a" "libFortranFloat128Math.a" "libFortranDecimal.a" "libFortranEvaluate.a")
|
||||
"libFortranRuntime.a" "libFortran_main.a" "libFortranDecimal.a" "libFortranEvaluate.a")
|
||||
local core_man_pages=("llvm-otool.1" "llvm-readobj.1" "clang.1" "lit.1" "llc.1" "llvm-ar.1" "llvm-dwarfdump.1" "llvm-objcopy.1" "opt.1"
|
||||
"llvm-link.1" "llvm-mc.1" "llvm-objdump.1" "llvm-ranlib.1" "llvm-readelf.1" "llvm-strip.1")
|
||||
local dev_man_pages=("bugpoint.1" "FileCheck.1" "llvm-cxxmap.1" "llvm-extract.1" "llvm-lipo.1" "llvm-symbolizer.1"
|
||||
@@ -871,44 +707,27 @@ package_lightning_static() {
|
||||
"lli.1" "llvm-cov.1" "llvm-dwarfutil.1" "llvm-libtool-darwin.1" "llvm-strings.1"
|
||||
"extraclangtools.1" "llvm-addr2line.1" "llvm-cxxfilt.1" "llvm-exegesis.1" "scan-build.1")
|
||||
|
||||
# Only build deb in Ubuntu environment
|
||||
if [ "$PACKAGEEXT" = "deb" ]; then
|
||||
# Debian packaging
|
||||
|
||||
mkdir -p "$packageDeb/$installPath"
|
||||
mkdir "${controlFile%/*}"
|
||||
mkdir -p "$DEB_PATH"
|
||||
mkdir -p "$packageDeb/$licenseDir"
|
||||
|
||||
# Build the static rocm-llvm package first:
|
||||
# We're doing a MV so that they're not picked up in the next (rocm-dev) package.
|
||||
|
||||
# Install license file in rocm-llvm package.
|
||||
cp -r "$LLVM_ROOT_LCL/LICENSE.TXT" "$packageDeb/$licenseDir"
|
||||
|
||||
# Copy the core binaries
|
||||
mkdir -p "$packageDeb/$installPath/bin"
|
||||
for i in "${core_bin[@]}"; do
|
||||
if [ -f "$distBin/$i" ]; then
|
||||
cp -d "$distBin"/$i "$packageDeb/$installPath/bin/"
|
||||
fi
|
||||
done
|
||||
# FIXME: At this point flang is pointing to flang-classic, which does
|
||||
# not exist yet (created later), and code above does not copy it
|
||||
# because it check if it exists first. Blindly copy flang for now.
|
||||
# Permanent fix will be merged into openmp-extras by moving symlink
|
||||
# creation there.
|
||||
if [ -h $distBin/flang ]; then
|
||||
cp -d "$distBin/flang" "$packageDeb/$installPath/bin/"
|
||||
fi
|
||||
|
||||
# Copy the core libraries
|
||||
# TODO: Only copy llvm/lib/clang/X.0.0/include and llvm/lib/clang/X.0.0/lib/linux
|
||||
cp -d "$distBin/flang" "$packageDeb/$installPath/bin/"
|
||||
|
||||
mkdir -p "$packageDeb/$installPath/lib/clang"
|
||||
cp -r "$distLib/clang/" "$packageDeb/$installPath/lib/"
|
||||
|
||||
if [ $FLANG_NEW -eq 1 ]; then
|
||||
# flang-new mod files
|
||||
mkdir -p "$packageDeb/$installPath/include/flang"
|
||||
cp -r "$distInc/flang/" "$packageDeb/$installPath/include/"
|
||||
fi
|
||||
@@ -919,17 +738,14 @@ package_lightning_static() {
|
||||
fi
|
||||
done
|
||||
|
||||
# Copy core specific man pages
|
||||
if [ "$BUILD_MANPAGES" == "ON" ]; then
|
||||
mkdir -p "$packageDeb/$installPath/share/man1"
|
||||
# zip the generated man pages before installing them in the package
|
||||
for i in "${core_man_pages[@]}"; do
|
||||
if [ -f "$distMan/man1/$i" ]; then
|
||||
gzip -f "$distMan/man1/$i"
|
||||
cp -d "$distMan/man1/${i}.gz" "$packageDeb/$installPath/share/man1/"
|
||||
fi
|
||||
done
|
||||
# Create symbolic links for amd man pages
|
||||
if [ -f "$distMan/man1/clang.1.gz" ]; then
|
||||
for i in "${amd_man_pages[@]}"; do
|
||||
ln -sf "clang.1.gz" "$distMan/man1/$i"
|
||||
@@ -948,9 +764,7 @@ package_lightning_static() {
|
||||
done
|
||||
echo "rmdir --ignore-fail-on-non-empty \"$ROCM_INSTALL_PATH/bin\"" >> $prermFile
|
||||
chmod 0555 "$postinstFile" "$prermFile"
|
||||
if [ -h $backwardsCompatibleSymlink ]; then
|
||||
cp -P "$backwardsCompatibleSymlink" "$packageDeb/$ROCM_INSTALL_PATH"
|
||||
fi
|
||||
cp -P "$backwardsCompatibleSymlink" "$packageDeb/$ROCM_INSTALL_PATH"
|
||||
|
||||
{
|
||||
echo "Package: $packageName"
|
||||
@@ -969,7 +783,6 @@ package_lightning_static() {
|
||||
fakeroot dpkg-deb -Zgzip --build $packageDeb \
|
||||
"${DEB_PATH}/${packageName}_${packageVersion}.${ROCM_LIBPATCH_VERSION}-${JOB_DESIGNATOR}${BUILD_ID}~${DISTRO_RELEASE}_${packageArch}.deb"
|
||||
|
||||
# clean up, get ready for rocm-llvm-dev
|
||||
rm -rf "$controlFile"
|
||||
rm -rf "$packageDeb"
|
||||
|
||||
@@ -977,22 +790,18 @@ package_lightning_static() {
|
||||
mkdir "${controlFile%/*}"
|
||||
mkdir -p "$DEB_PATH"
|
||||
|
||||
# now build rocm-llvm-dev:
|
||||
mkdir -p "$packageDeb/$installPath/bin"
|
||||
# Only copy binaries not packaged in core
|
||||
for i in "$distBin"/*; do
|
||||
bin=$(basename "$i")
|
||||
contains "$bin" "${core_bin[@]}" "${amd_compiler_commands[@]}" && continue
|
||||
cp -d "$i" "$packageDeb/$installPath/bin/"
|
||||
done
|
||||
|
||||
# Only copy libraries not packaged in core
|
||||
for i in "$distLib"/*; do
|
||||
lib=$(basename "$i")
|
||||
contains "$lib" "${core_lib[@]}" && continue
|
||||
cp -dr "$i" "$packageDeb/$installPath/lib/"
|
||||
done
|
||||
# Remove dirs already packaged in rocm-llvm-core
|
||||
rm -rf "$packageDeb/$installPath/lib/clang"
|
||||
|
||||
cp -r "$distInc" "$packageDeb/$installPath/include"
|
||||
@@ -1003,7 +812,6 @@ package_lightning_static() {
|
||||
|
||||
if [ "$BUILD_MANPAGES" == "ON" ]; then
|
||||
mkdir -p "$packageDeb/$installPath/share/man1"
|
||||
# zip the generated man pages before installing them in the package
|
||||
for i in "${dev_man_pages[@]}"; do
|
||||
if [ -f "$distMan/man1/$i" ]; then
|
||||
gzip -f "$distMan/man1/$i"
|
||||
@@ -1012,7 +820,6 @@ package_lightning_static() {
|
||||
done
|
||||
fi
|
||||
|
||||
# add this rocm-llvm package as a dependency for rocm-llvm-dev
|
||||
debDependencies="${debDependencies}, ${packageName}"
|
||||
|
||||
echo "Package: $packageNameExtra" > $controlFile
|
||||
@@ -1031,26 +838,20 @@ package_lightning_static() {
|
||||
"${DEB_PATH}/${packageNameExtra}_${packageVersion}.${ROCM_LIBPATCH_VERSION}-${JOB_DESIGNATOR}${BUILD_ID}~${DISTRO_RELEASE}_${packageArch}.deb"
|
||||
fi
|
||||
|
||||
# Only build RPM in CentOS or SLES or RHEL or Mariner environment
|
||||
if [ "$PACKAGEEXT" = "rpm" ]; then
|
||||
# RPM packaging
|
||||
|
||||
mkdir -p "$(dirname $specFile)"
|
||||
rm -rf "$RPM_PATH"
|
||||
mkdir -p "$RPM_PATH"
|
||||
|
||||
# set up for rocm-llvm package
|
||||
echo "Name: $packageName" >> $specFile
|
||||
echo "Name: $packageName" > $specFile
|
||||
echo "Version: ${packageVersion}.${ROCM_LIBPATCH_VERSION}" >> $specFile
|
||||
echo "Release: ${JOB_DESIGNATOR}${SLES_BUILD_ID_PREFIX}${BUILD_ID}%{?dist}" >> $specFile
|
||||
echo "Summary: $packageSummary" >> $specFile
|
||||
echo "Group: System Environment/Libraries" >> $specFile
|
||||
echo "License: ASL 2.0 with exceptions" >> $specFile
|
||||
echo "Prefix: $ROCM_INSTALL_PATH" >> $specFile
|
||||
echo "Requires: $rpmRequires" >> $specFile
|
||||
if [[ "$DISTRO_ID" != "centos"* ]]; then
|
||||
echo "Recommends: $rpmRecommends" >> $specFile
|
||||
fi
|
||||
|
||||
echo "%description" >> $specFile
|
||||
echo "$packageSummaryLong" >> $specFile
|
||||
|
||||
@@ -1062,38 +863,23 @@ package_lightning_static() {
|
||||
echo "mkdir -p \$RPM_BUILD_ROOT/$installPath/bin" >> $specFile
|
||||
echo "mkdir -p \$RPM_BUILD_ROOT/$licenseDir" >> $specFile
|
||||
|
||||
# Install the license file to rocm-llvm
|
||||
echo "cp -R $LLVM_ROOT_LCL/LICENSE.TXT \$RPM_BUILD_ROOT/$licenseDir" >> $specFile
|
||||
if [ -h $backwardsCompatibleSymlink ]; then
|
||||
echo "cp -P $backwardsCompatibleSymlink \$RPM_BUILD_ROOT/$ROCM_INSTALL_PATH" >> $specFile
|
||||
fi
|
||||
echo "cp -P $backwardsCompatibleSymlink \$RPM_BUILD_ROOT/$ROCM_INSTALL_PATH" >> $specFile
|
||||
|
||||
# Copy the core binaries
|
||||
for i in "${core_bin[@]}"; do
|
||||
if [ -f "$distBin/$i" ]; then
|
||||
echo "cp -d \"$distBin\"/$i \$RPM_BUILD_ROOT/$installPath/bin/" >> $specFile
|
||||
fi
|
||||
done
|
||||
|
||||
# FIXME: At this point flang is pointing to flang-classic, which does
|
||||
# not exist yet (created later), and code above does not copy it
|
||||
# because it check if it exists first. Blindly copy flang for now.
|
||||
# Permanent fix will be merged into openmp-extras by moving symlink
|
||||
# creation there.
|
||||
if [ -h $distBin/flang ]; then
|
||||
echo "cp -d \"$distBin/flang\" \$RPM_BUILD_ROOT/$installPath/bin/" >> $specFile
|
||||
fi
|
||||
echo "cp -d \"$distBin/flang\" \$RPM_BUILD_ROOT/$installPath/bin/" >> $specFile
|
||||
|
||||
# Copy the config files
|
||||
echo "cp -d \"$distBin\"/*.cfg \$RPM_BUILD_ROOT/$installPath/bin/" >> $specFile
|
||||
|
||||
# Copy the core libraries
|
||||
# TODO: Only copy llvm/lib/clang/X.0.0/include and llvm/lib/clang/X.0.0/lib/linux
|
||||
echo "mkdir -p \$RPM_BUILD_ROOT/$installPath/lib/clang" >> $specFile
|
||||
echo "cp -R \"$distLib/clang/\" \$RPM_BUILD_ROOT/$installPath/lib/" >> $specFile
|
||||
|
||||
if [ $FLANG_NEW -eq 1 ]; then
|
||||
# flang-new mod files
|
||||
echo "mkdir -p \$RPM_BUILD_ROOT/$installPath/include/flang" >> $specFile
|
||||
echo "cp -R \"$distInc/flang/\" \$RPM_BUILD_ROOT/$installPath/include/" >> $specFile
|
||||
fi
|
||||
@@ -1104,32 +890,26 @@ package_lightning_static() {
|
||||
fi
|
||||
done
|
||||
|
||||
# Copy core specific man pages
|
||||
if [ "$BUILD_MANPAGES" == "ON" ]; then
|
||||
echo "mkdir -p \$RPM_BUILD_ROOT/$installPath/share/man/man1" >> $specFile
|
||||
# zip the generated man pages before installing them in the package
|
||||
for i in "${core_man_pages[@]}"; do
|
||||
if [ -f "$distMan/man1/$i" ]; then
|
||||
echo "gzip -f ${distMan}/man1/${i}" >> $specFile
|
||||
echo "cp -d ${distMan}/man1/${i}.gz \$RPM_BUILD_ROOT/$installPath/share/man/man1/" >> $specFile
|
||||
echo "gzip -f $distMan/man1/$i" >> $specFile
|
||||
echo "cp -d $distMan/man1/${i}.gz \$RPM_BUILD_ROOT/$installPath/share/man/man1/" >> $specFile
|
||||
fi
|
||||
done
|
||||
# Create symbolic links for amd man pages
|
||||
for i in "${amd_man_pages[@]}"; do
|
||||
echo "ln -sf clang.1.gz ${distMan}/man1/${i}" >> $specFile
|
||||
echo "cp -d ${distMan}/man1/${i} \$RPM_BUILD_ROOT/$installPath/share/man/man1/" >> $specFile
|
||||
done
|
||||
if [ -f "$distMan/man1/clang.1.gz" ]; then
|
||||
for i in "${amd_man_pages[@]}"; do
|
||||
echo "ln -sf clang.1.gz \"$distMan/man1/$i\"" >> $specFile
|
||||
echo "cp -d $distMan/man1/${i} \$RPM_BUILD_ROOT/$installPath/share/man/man1/" >> $specFile
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "%clean" >> $specFile
|
||||
echo "rm -rf \$RPM_BUILD_ROOT/$installPath" >> $specFile
|
||||
echo "%files " >> $specFile
|
||||
echo "%defattr(-,root,root,-)" >> $specFile
|
||||
# Note: In some OS like SLES, during upgrade rocm-core is getting upgraded first and followed by other packages
|
||||
# rocm-core cannot delete rocm-ver folder, since it contains files of other packages that are yet to be upgraded
|
||||
# To remove rocm-ver folder after upgrade the spec file of other packages should contain the rocm-ver directory
|
||||
# Otherwise after upgrade empty old rocm-ver folder will be left out.
|
||||
# If empty remove /opt/rocm-ver folder and its subdirectories created by rocm-llvm-core package
|
||||
{
|
||||
echo "$ROCM_INSTALL_PATH"
|
||||
|
||||
@@ -1157,7 +937,6 @@ package_lightning_static() {
|
||||
|
||||
mv $packageRpm/RPMS/x86_64/*.rpm $RPM_PATH
|
||||
|
||||
# setup for rocm-llvm-dev package
|
||||
echo "Name: $packageNameExtra" > $specFileExtra
|
||||
echo "Version: ${packageVersion}.${ROCM_LIBPATCH_VERSION}" >> $specFileExtra
|
||||
echo "Release: ${JOB_DESIGNATOR}${SLES_BUILD_ID_PREFIX}${BUILD_ID}%{?dist}" >> $specFileExtra
|
||||
@@ -1185,13 +964,11 @@ package_lightning_static() {
|
||||
|
||||
echo "cp -P $backwardsCompatibleSymlink \$RPM_BUILD_ROOT/$ROCM_INSTALL_PATH" >> $specFileExtra
|
||||
|
||||
# Only copy binaries not packaged in core
|
||||
for i in "$distBin"/*; do
|
||||
bin=$(basename "$i")
|
||||
contains "$bin" "${core_bin[@]}" "${amd_compiler_commands[@]}" && continue
|
||||
echo "cp -d \"$i\" \$RPM_BUILD_ROOT/$installPath/bin/" >> $specFileExtra
|
||||
done
|
||||
# Only copy libraries not packaged in core
|
||||
for i in "$distLib"/*; do
|
||||
lib=$(basename "$i")
|
||||
contains "$lib" "${core_lib[@]}" && continue
|
||||
@@ -1199,17 +976,14 @@ package_lightning_static() {
|
||||
done
|
||||
|
||||
echo "cp -R $distInc \$RPM_BUILD_ROOT/$installPath" >> $specFileExtra
|
||||
# Remove dirs already packaged in rocm-llvm-core
|
||||
echo "rm -rf \$RPM_BUILD_ROOT/$installPath/lib/clang" >> $specFileExtra
|
||||
|
||||
if [ $FLANG_NEW -eq 1 ]; then
|
||||
# Remove flang mods packaged in rocm-llvm-core
|
||||
echo "rm -rf \$RPM_BUILD_ROOT/$installPath/include/flang" >> $specFileExtra
|
||||
fi
|
||||
|
||||
if [ "$BUILD_MANPAGES" == "ON" ]; then
|
||||
echo "mkdir -p \$RPM_BUILD_ROOT/$installPath/share/man/man1" >> $specFileExtra
|
||||
# zip the generated man pages before installing them in the package
|
||||
for i in "${dev_man_pages[@]}"; do
|
||||
if [ -f "$distMan/man1/$i" ]; then
|
||||
echo "gzip -f $distMan/man1/$i" >> $specFileExtra
|
||||
@@ -1223,11 +997,6 @@ package_lightning_static() {
|
||||
echo "%files " >> $specFileExtra
|
||||
|
||||
echo "%defattr(-,root,root,-)" >> $specFileExtra
|
||||
# Note: In some OS like SLES, during upgrade rocm-core is getting upgraded first and followed by other packages
|
||||
# rocm-core cannot delete rocm-ver folder, since it contains files of other packages that are yet to be upgraded
|
||||
# To remove rocm-ver folder after upgrade the spec file of other packages should contain the rocm-ver directory
|
||||
# Otherwise after upgrade empty old rocm-ver folder will be left out.
|
||||
# If empty remove /opt/rocm-ver folder and its subdirectories created by rocm-llvm package
|
||||
echo "$ROCM_INSTALL_PATH" >> $specFileExtra
|
||||
|
||||
echo "%post" >> $specFileExtra
|
||||
@@ -1241,7 +1010,6 @@ package_lightning_static() {
|
||||
|
||||
package_docs() {
|
||||
|
||||
# do common stuff here:
|
||||
if [ "$BUILD_TYPE" == "Debug" ]; then
|
||||
return
|
||||
fi
|
||||
@@ -1250,9 +1018,7 @@ package_docs() {
|
||||
return
|
||||
fi
|
||||
|
||||
# Echo the LLVM version ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}
|
||||
get_llvm_version
|
||||
# We require the LLVM major, minor and patch. Scrub the LLVM_VERSION_SUFFIX.
|
||||
local llvmParsedVersion="${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}"
|
||||
|
||||
local packageName="rocm-llvm-docs"
|
||||
@@ -1267,31 +1033,24 @@ package_docs() {
|
||||
local licenseDir="$ROCM_INSTALL_PATH/share/doc/$packageName"
|
||||
local packageDir="$BUILD_PATH/package"
|
||||
|
||||
# Debian specific
|
||||
local packageDeb="$packageDir/deb"
|
||||
local controlFile="$packageDeb/DEBIAN/control"
|
||||
local debDependencies="rocm-core"
|
||||
|
||||
# RPM specific
|
||||
local packageRpm="$packageDir/rpm"
|
||||
local specFile="$packageDir/$packageName.spec"
|
||||
local rpmRequires="rocm-core"
|
||||
|
||||
# Cleanup previous packages
|
||||
rm -rf "$packageDir"
|
||||
echo "rm -rf $packageDir"
|
||||
|
||||
# Only build deb in Ubuntu environment
|
||||
if [ "$PACKAGEEXT" = "deb" ]; then
|
||||
|
||||
# Debian packaging
|
||||
mkdir -p "$packageDeb/$licenseDir"
|
||||
mkdir "${controlFile%/*}"
|
||||
|
||||
# Install license file in rocm-llvm-docs package.
|
||||
cp -r "$LLVM_ROOT_LCL/LICENSE.TXT" "$packageDeb/$licenseDir"
|
||||
|
||||
# Copy the docs
|
||||
cp -r "$distDoc" "$packageDeb/$licenseDir"
|
||||
|
||||
{
|
||||
@@ -1312,21 +1071,17 @@ package_docs() {
|
||||
"${DEB_PATH}/${packageName}_${packageVersion}.${ROCM_LIBPATCH_VERSION}-${JOB_DESIGNATOR}${BUILD_ID}~${DISTRO_RELEASE}_${packageArch}.deb"
|
||||
fi
|
||||
|
||||
# Only build RPM in CentOS or SLES or RHEL or Mariner environment
|
||||
if [ "$PACKAGEEXT" = "rpm" ]; then
|
||||
|
||||
# RPM packaging
|
||||
mkdir -p "$(dirname $specFile)"
|
||||
mkdir -p "$RPM_PATH"
|
||||
|
||||
# set up for rocm-llvm-docs package
|
||||
echo "Name: $packageName" > $specFile
|
||||
echo "Version: ${packageVersion}.${ROCM_LIBPATCH_VERSION}" >> $specFile
|
||||
echo "Release: ${JOB_DESIGNATOR}${SLES_BUILD_ID_PREFIX}${BUILD_ID}%{?dist}" >> $specFile
|
||||
echo "Summary: $packageSummary" >> $specFile
|
||||
echo "Group: System Environment/Libraries" >> $specFile
|
||||
echo "License: ASL 2.0 with exceptions" >> $specFile
|
||||
echo "Prefix: $ROCM_INSTALL_PATH" >> $specFile
|
||||
echo "Requires: $rpmRequires" >> $specFile
|
||||
|
||||
echo "%description" >> $specFile
|
||||
@@ -1338,10 +1093,8 @@ package_docs() {
|
||||
echo "%install" >> $specFile
|
||||
echo "mkdir -p \$RPM_BUILD_ROOT/$licenseDir" >> $specFile
|
||||
|
||||
# Install the license file to rocm-llvm-docs
|
||||
echo "cp -R $LLVM_ROOT_LCL/LICENSE.TXT \$RPM_BUILD_ROOT/$licenseDir" >> $specFile
|
||||
|
||||
# Copy the docs
|
||||
echo "cp -R \"$distDoc\" \$RPM_BUILD_ROOT/$licenseDir" >> $specFile
|
||||
|
||||
echo "%clean" >> $specFile
|
||||
@@ -1375,13 +1128,24 @@ build() {
|
||||
create_compiler_config_files
|
||||
}
|
||||
|
||||
create_wheel_package() {
|
||||
echo "Creating rocm-llvm wheel package"
|
||||
mkdir -p "$ROCM_WHEEL_DIR"
|
||||
cp -f $SCRIPT_ROOT/generate_setup_py.py $ROCM_WHEEL_DIR
|
||||
cp -f $SCRIPT_ROOT/repackage_wheel.sh $ROCM_WHEEL_DIR
|
||||
cd $ROCM_WHEEL_DIR
|
||||
# Currently only supports python3.6
|
||||
./repackage_wheel.sh $RPM_PATH/rocm-llvm*.rpm python3.6
|
||||
# Copy the wheel created to RPM folder which will be uploaded to artifactory
|
||||
mv "$ROCM_WHEEL_DIR"/dist/*.whl "$RPM_PATH"
|
||||
}
|
||||
|
||||
case $TARGET in
|
||||
(clean) clean_lightning ;;
|
||||
(all)
|
||||
time build
|
||||
time package_lightning_static
|
||||
time package_docs
|
||||
build_wheel "$BUILD_PATH" "$PROJ_NAME"
|
||||
;;
|
||||
(build)
|
||||
build
|
||||
@@ -1394,4 +1158,9 @@ case $TARGET in
|
||||
(*) die "Invalid target $TARGET" ;;
|
||||
esac
|
||||
|
||||
if [[ $WHEEL_PACKAGE == true ]]; then
|
||||
echo "Wheel Package build started !!!!"
|
||||
create_wheel_package
|
||||
fi
|
||||
|
||||
echo "Operation complete"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_utils.sh"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/compute_helper.sh"
|
||||
|
||||
set_component_src MIOpen
|
||||
|
||||
@@ -19,18 +19,18 @@ build_miopen_mlir() {
|
||||
mkdir build && cd build
|
||||
cmake \
|
||||
-G Ninja \
|
||||
-DCMAKE_C_COMPILER="$(set_build_variables __CLANG__)" \
|
||||
-DCMAKE_CXX_COMPILER="$(set_build_variables __CLANG++__)" \
|
||||
-DCMAKE_C_COMPILER="${ROCM_PATH}/llvm/bin/clang" \
|
||||
-DCMAKE_CXX_COMPILER="${ROCM_PATH}/llvm/bin/clang++" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH="${ROCM_PATH};${HOME}/miopen-deps" \
|
||||
-DCMAKE_PREFIX_PATH="${ROCM_PATH};${HOME}/miopen-deps" \
|
||||
-DCMAKE_INSTALL_PREFIX="$ROCM_PATH" \
|
||||
-DBUILD_FAT_LIBROCKCOMPILER=1 \
|
||||
..
|
||||
..
|
||||
cmake --build . -- librockCompiler -j${PROC}
|
||||
cmake --build . -- install
|
||||
|
||||
rm -rf _CPack_Packages/ && find -name '*.o' -delete
|
||||
|
||||
|
||||
echo "Finished building rocMLIR"
|
||||
}
|
||||
|
||||
@@ -43,6 +43,12 @@ build_miopen_deps() {
|
||||
echo "Start build"
|
||||
cd "$COMPONENT_SRC"
|
||||
|
||||
# Update rocm-recipes for boost link
|
||||
# https://github.com/ROCm/MIOpen/pull/3457/files
|
||||
sed -i 's/329203d79f9fe77ae5d0d742af0966bc57f4dfc8/92c6695449c85887962f45509b376f2eb0d284f7/g' \
|
||||
rbuild.ini \
|
||||
install_deps.cmake \
|
||||
dev-requirements.txt
|
||||
# Commenting the rocMLIR & composable_kernel from requirements.txt
|
||||
sed -i '/ROCm\/rocMLIR@\|ROCm\/composable_kernel@/s/^/#/' requirements.txt
|
||||
# Extract MLIR commit from requirements.txt
|
||||
@@ -50,7 +56,7 @@ build_miopen_deps() {
|
||||
|
||||
|
||||
pip3 install https://github.com/RadeonOpenCompute/rbuild/archive/master.tar.gz
|
||||
PATH="${PATH}:${ROCM_PATH}:${HOME}/.local/bin" rbuild prepare -d "$HOME/miopen-deps" --cxx="$(set_build_variables __CLANG++__)" --cc "$(set_build_variables __CLANG__)"
|
||||
PATH="${PATH}:${ROCM_PATH}:${HOME}/.local/bin" rbuild prepare -d "$HOME/miopen-deps" --cxx=${ROCM_PATH}/llvm/bin/clang++ --cc ${ROCM_PATH}/llvm/bin/clang
|
||||
build_miopen_mlir "$MLIR_COMMIT"
|
||||
|
||||
show_build_cache_stats
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user