Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Add support for Navi4x architecture in nightly CI pipeline. #1599

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 41 additions & 4 deletions mlir/utils/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ String getLabelFromCodepath(String codepath) {
label = 'mlir'
} else if (codepath == "navi3x") {
label = 'mlir && ( gfx1100 || gfx1101 )'
} else if (codepath == "navi4x") {
label = 'mlir && ( gfx1200 || gfx1201 )'
} else {
echo "${codepath} is not supported"
label = 'wrongLabel'
Expand All @@ -212,6 +214,10 @@ String getLabelFromChip(String chip) {
return "mlir && gfx1100"
case "gfx1101":
return "mlir && gfx1101"
case "gfx1200":
return "mlir && gfx1200"
case "gfx1201":
return "mlir && gfx1201"
}
}

Expand Down Expand Up @@ -289,6 +295,17 @@ void check_RockE2ETests_Navi3x(boolean fixed) {
}
}

void check_RockE2ETests_Navi4x(boolean fixed) {
sh '[ ! -d build ] || rm -rf build'
buildProject('check-mlir check-rock-e2e', """
-DROCK_E2E_TEST_ENABLED=1
-DROCMLIR_DRIVER_RANDOM_DATA_SEED=${fixed ? 'none' : '1'}
-DROCMLIR_DRIVER_TEST_GPU_VALIDATION=${fixed ? 1 : 0}
-DLLVM_LIT_ARGS='-v --time-tests -j 1'
-DCMAKE_EXPORT_COMPILE_COMMANDS=1
""")
}

void check_randomE2ETests(String codepath) {
// Limit the number of lit workers to 8 for navi21/navi3x codepath on nightly CI as a workaround for issue#702
limit_lit_workers = false
Expand Down Expand Up @@ -332,6 +349,11 @@ boolean shouldRunFromCodepath(String codepath) {
if (params.canXdlops && (params.disableNavi3x == false) && (codepath == "navi3x")) {
return true
}
// Run navi4x on private nightly CI only
if (params.canXdlops && (params.disableNavi4x == false) && (codepath == "navi4x") &&
params.nightly) {
return true;
}
return false
}

Expand All @@ -350,6 +372,9 @@ boolean shouldRunFromChip(String chip) {
case "gfx1100":
case "gfx1101":
return shouldRunFromCodepath("navi3x")
case "gfx1200":
case "gfx1201":
return shouldRunFromCodepath("navi4x")
}
}

Expand All @@ -371,7 +396,7 @@ void archivePerfDB() {
}

boolean shouldRunBuildAndTest(String codepath) {
// When default codepath is selected, we test mfma, navi21 and navi3x on
// When default codepath is selected, we test mfma, navi21, navi3x and navi4x on
// private CI and vanilla on public CI
if (params.codepath == "default" && shouldRunFromCodepath(codepath))
return true
Expand All @@ -383,6 +408,7 @@ boolean shouldRunBuildAndTest(String codepath) {
if (params.codepath == "vanilla") return true
if (params.codepath == "navi21" && params.disableNavi21 == false) return true
if (params.codepath == "navi3x" && params.disableNavi3x == false) return true
if (params.codepath == "navi4x" && params.disableNavi4x == false) return true
return false
}
}
Expand Down Expand Up @@ -424,14 +450,17 @@ pipeline {

// choose the codepath for testing
choice(name: 'codepath',
choices: ['default', 'mfma', 'navi21', 'navi3x', 'vanilla'],
choices: ['default', 'mfma', 'navi21', 'navi3x', 'navi4x', 'vanilla'],
description: 'Choose the codepath to test')
// option to disable navi21 cells in case nodes are offline
booleanParam(name: 'disableNavi21', defaultValue: false,
description: 'Disable testing on Navi21')
// option to disable navi3x cells in case nodes are offline
booleanParam(name: 'disableNavi3x', defaultValue: false,
description: 'Disable testing on Navi3x')
// option to disable navi4x cells in case nodes are offline
booleanParam(name: 'disableNavi4x', defaultValue: false,
description: 'Disable testing on Navi4x')


// option only to be used with upstream merges
Expand Down Expand Up @@ -468,7 +497,7 @@ pipeline {
axes {
axis {
name 'CODEPATH'
values 'vanilla', 'mfma', 'navi21', 'navi3x'
values 'vanilla', 'mfma', 'navi21', 'navi3x', 'navi4x'
}
}
agent {
Expand Down Expand Up @@ -506,6 +535,11 @@ pipeline {
check_RockE2ETests_Navi3x(true)
}
}
else if ( "${CODEPATH}" == 'navi4x' ) {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
check_RockE2ETests_Navi4x(true)
}
}
else {
build_fixedE2ETests("${CODEPATH}")
preMergeCheck("${CODEPATH}")
Expand All @@ -522,7 +556,10 @@ pipeline {
allOf {
equals expected: true, actual: params.sharedLib;
equals expected: true, actual: params.nightly
}
not {
equals expected: 'navi4x', actual: "${CODEPATH}"
}
}
}
steps {
script {
Expand Down