Skip to content
Merged
Show file tree
Hide file tree
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
16 changes: 2 additions & 14 deletions jenkins/Build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,6 @@ def runLLMBuild(
sh "rm -rf **/*.xml *.tar.gz"

trtllm_utils.checkoutSource(LLM_REPO, env.gitlabCommit, LLM_ROOT, true, true)
if (env.alternativeTRT) {
sh "cd ${LLM_ROOT} && sed -i 's#tensorrt~=.*\$#tensorrt#g' requirements.txt && cat requirements.txt"
}

sh "mkdir TensorRT-LLM"
sh "cp -r ${LLM_ROOT}/ TensorRT-LLM/src/"
Expand All @@ -722,10 +719,6 @@ def runLLMBuild(
// install python package
trtllm_utils.llmExecStepWithRetry(pipeline, script: "cd ${LLM_ROOT} && pip3 install -r requirements-dev.txt ${pipArgs}")

if (env.alternativeTRT) {
trtllm_utils.replaceWithAlternativeTRT(env.alternativeTRT, "cp312")
}

int buildJobs = (buildFlags[BUILD_JOBS_FOR_CONFIG] ?: BUILD_JOBS) as int

withEnv([
Expand Down Expand Up @@ -949,7 +942,7 @@ def applyLatestBolt(pipeline, tarName, is_linux_x86_64, artifacts=null)
}
}

def buildWheelInContainer(pipeline, libraries=[], triple=X86_64_TRIPLE, clean=false, pre_cxx11abi=false, cpver="312", extra_args="", reconfigure=false)
def buildWheelInContainer(pipeline, libraries=[], triple=X86_64_TRIPLE, clean=false, pre_cxx11abi=false, extra_args="", reconfigure=false)
{
// Random sleep to avoid resource contention
sleep(10 * Math.random())
Expand All @@ -960,10 +953,6 @@ def buildWheelInContainer(pipeline, libraries=[], triple=X86_64_TRIPLE, clean=fa

// Step 1: cloning tekit source code
trtllm_utils.checkoutSource(LLM_REPO, env.gitlabCommit, LLM_ROOT, true, true)
if (env.alternativeTRT) {
trtllm_utils.replaceWithAlternativeTRT(env.alternativeTRT, cpver)
sh "cd ${LLM_ROOT} && sed -i 's#tensorrt~=.*\$#tensorrt#g' requirements.txt && cat requirements.txt"
}
// Step 2: building libs in container
sh "bash -c 'pip3 show tensorrt || true'"

Expand Down Expand Up @@ -1003,7 +992,6 @@ def launchStages(pipeline, cpu_arch, enableFailFast, globalVars)
echo "dockerImage: ${env.dockerImage}"
echo "gitlabSourceRepoHttpUrl: ${env.gitlabSourceRepoHttpUrl}"
echo "gitlabCommit: ${env.gitlabCommit}"
echo "alternativeTRT: ${env.alternativeTRT}"
echo "Using GitLab repo: ${LLM_REPO}. Commit: ${env.gitlabCommit}"

echo "env.globalVars is: ${env.globalVars}"
Expand Down Expand Up @@ -1124,7 +1112,7 @@ def launchStages(pipeline, cpu_arch, enableFailFast, globalVars)
stage(key) {
stage("[${key}] Run") {
echoNodeAndGpuInfo(pipeline, key)
buildWheelInContainer(pipeline, [], X86_64_TRIPLE, false, false, "cp312", "-a '90' -b Debug --micro_benchmarks", true)
buildWheelInContainer(pipeline, [], X86_64_TRIPLE, false, false, "-a '90' -b Debug --micro_benchmarks", true)
}
}
})
Expand Down
56 changes: 20 additions & 36 deletions jenkins/L0_MergeRequest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -828,9 +828,7 @@ def launchReleaseCheck(pipeline, globalVars)

// Step 2: Run guardwords scan
def isOfficialPostMergeJob = (env.JOB_NAME ==~ /.*PostMerge.*/)
if (env.alternativeTRT ||
isOfficialPostMergeJob ||
runMode == "nightly_release") {
if (isOfficialPostMergeJob || runMode == "nightly_release") {
trtllm_utils.checkoutSource(SCAN_REPO, SCAN_COMMIT, SCAN_ROOT, false, true)
trtllm_utils.llmExecStepWithRetry(pipeline, script: "cd ${SCAN_ROOT} && pip3 install -e .")
try {
Expand Down Expand Up @@ -866,7 +864,7 @@ def launchReleaseCheck(pipeline, globalVars)
// Step 3: Run pre-commit checks
// Post-merge CI runs on all files; pre-merge CI runs only on changed files.
def precommitArgs = "-a"
if (!(env.JOB_NAME ==~ /.*PostMerge.*/ || env.alternativeTRT)) {
if (!isOfficialPostMergeJob) {
// Use GitLab/GitHub API to get the exact list of changed files in this MR.
// This avoids git history depth issues with shallow clones.
def changedFileList = getMergeRequestChangedFileList(pipeline, globalVars)
Expand Down Expand Up @@ -1223,7 +1221,6 @@ def requireMultiGpuApprovalLabel(pipeline, globalVars, String arch) {
def getMergeRequestChangedFileList(pipeline, globalVars) {
def isOfficialPostMergeJob = (env.JOB_NAME ==~ /.*PostMerge.*/)
if ((params.InfraDryRun?.toString()?.toBoolean() ?: false) ||
env.alternativeTRT ||
isOfficialPostMergeJob ||
runMode == "nightly_release") {
pipeline.echo("Force set changed file list to empty list.")
Expand Down Expand Up @@ -1253,7 +1250,6 @@ def getMergeRequestOneFileChanges(pipeline, globalVars, filePath) {
// If there is an error to get the changed file diff, skip merging the waive list.
def isOfficialPostMergeJob = (env.JOB_NAME ==~ /.*PostMerge.*/)
if ((params.InfraDryRun?.toString()?.toBoolean() ?: false) ||
env.alternativeTRT ||
isOfficialPostMergeJob ||
runMode == "nightly_release") {
pipeline.echo("Force set changed file diff to empty string.")
Expand All @@ -1268,7 +1264,7 @@ def getMergeRequestOneFileChanges(pipeline, globalVars, filePath) {
def getAutoTriggerTagList(pipeline, testFilter, globalVars) {
def autoTriggerTagList = []
def isOfficialPostMergeJob = (env.JOB_NAME ==~ /.*PostMerge.*/)
if (env.alternativeTRT || isOfficialPostMergeJob) {
if (isOfficialPostMergeJob) {
pipeline.echo("Force set auto trigger tags to empty list.")
return autoTriggerTagList
}
Expand Down Expand Up @@ -1342,8 +1338,8 @@ def getCbtsResult(pipeline, testFilter, globalVars)
}

def isOfficialPostMergeJob = (env.JOB_NAME ==~ /.*PostMerge.*/)
if (env.alternativeTRT || isOfficialPostMergeJob) {
pipeline.echo("CBTS: deferring — post-merge job or alternativeTRT set")
if (isOfficialPostMergeJob) {
pipeline.echo("CBTS: deferring — post-merge job")
return null
}

Expand Down Expand Up @@ -1844,7 +1840,7 @@ def getMultiGpuFileChanged(pipeline, testFilter, globalVars)
pipeline.echo("Force not run multi-GPU testing.")
return false
}
if (env.alternativeTRT || testFilter[(ADD_MULTI_GPU_TEST)] || testFilter[(ONLY_MULTI_GPU_TEST)] || testFilter[(IS_POST_MERGE)]) {
if (testFilter[(ADD_MULTI_GPU_TEST)] || testFilter[(ONLY_MULTI_GPU_TEST)] || testFilter[(IS_POST_MERGE)]) {
pipeline.echo("Force run multi-GPU testing.")
return true
}
Expand Down Expand Up @@ -2016,7 +2012,7 @@ def getMultiGpuFileChanged(pipeline, testFilter, globalVars)

def getOnlyOneGroupChanged(pipeline, testFilter, globalVars) {
def isOfficialPostMergeJob = (env.JOB_NAME ==~ /.*PostMerge.*/)
if (env.alternativeTRT || isOfficialPostMergeJob) {
if (isOfficialPostMergeJob) {
pipeline.echo("Force set ONLY_ONE_GROUP_CHANGED \"\".")
return ""
}
Expand Down Expand Up @@ -2469,7 +2465,7 @@ def findCachedPLCSourceScanResult(commit) {
return [result: buildInfo.result, url: buildInfo.url]
}

def launchJob(pipeline, jobName, reuseBuild, enableFailFast, globalVars, platform="x86_64", additionalParameters = [:]) {
def launchJob(pipeline, jobName, reuseBuild, enableFailFast, globalVars, additionalParameters = [:]) {
def parameters = getCommonParameters()
// Build a local copy to avoid racey growth from shared parallel mutations.
// In particular, CACHED_CHANGED_FILE_LIST can become very large and may
Expand All @@ -2482,18 +2478,6 @@ def launchJob(pipeline, jobName, reuseBuild, enableFailFast, globalVars, platfor
'globalVars': globalVarsJson,
] + additionalParameters

if (env.alternativeTRT && platform == "x86_64") {
parameters += [
'alternativeTRT': env.alternativeTRT,
]
}

if (env.alternativeTrtSBSA && platform == "SBSA") {
parameters += [
'alternativeTRT': env.alternativeTrtSBSA,
]
}

// Preserve an explicit empty phase override from the dry-run helper.
if (!additionalParameters.containsKey('testPhase2StageName') && env.testPhase2StageName) {
parameters += [
Expand Down Expand Up @@ -2540,7 +2524,7 @@ def launchJob(pipeline, jobName, reuseBuild, enableFailFast, globalVars, platfor
return buildStatus
}

def launchInfraDryRunTestJob(pipeline, arch, testFilter, globalVars, platform, imageParameters)
def launchInfraDryRunTestJob(pipeline, arch, testFilter, globalVars, imageParameters)
{
String testFilterJson = writeJSON returnText: true, json: testFilter
def additionalParameters = [
Expand All @@ -2549,7 +2533,7 @@ def launchInfraDryRunTestJob(pipeline, arch, testFilter, globalVars, platform, i
'testPhase2StageName': '',
] + imageParameters
stage("[Test-${arch}-Single-GPU] Remote Run") {
launchJob(pipeline, "L0_Test-${arch}-Single-GPU", false, false, globalVars, platform, additionalParameters)
launchJob(pipeline, "L0_Test-${arch}-Single-GPU", false, false, globalVars, additionalParameters)
}
}

Expand Down Expand Up @@ -2694,7 +2678,7 @@ def launchStages(pipeline, reuseBuild, testFilter, enableFailFast, globalVars)
// launchJob returns UNSTABLE (without throwing) when the build
// sub-job was infra-incomplete: only infra aborts, no genuine
// build failure (see runBranchesWithInfraDefer in Build.groovy).
def buildStatus = launchJob(pipeline, "/LLM/helpers/Build-x86_64", reuseBuild, enableFailFast, globalVars, "x86_64", additionalParameters)
def buildStatus = launchJob(pipeline, "/LLM/helpers/Build-x86_64", reuseBuild, enableFailFast, globalVars, additionalParameters)
buildInfraIncomplete = (buildStatus == "UNSTABLE")
}

Expand All @@ -2712,7 +2696,7 @@ def launchStages(pipeline, reuseBuild, testFilter, enableFailFast, globalVars)
'wheelDockerImagePy310': globalVars["LLM_ROCKYLINUX8_PY310_DOCKER_IMAGE"],
'wheelDockerImagePy312': globalVars["LLM_ROCKYLINUX8_PY312_DOCKER_IMAGE"],
]
launchInfraDryRunTestJob(pipeline, "x86_64", testFilter, globalVars, "x86_64", imageParameters)
launchInfraDryRunTestJob(pipeline, "x86_64", testFilter, globalVars, imageParameters)
return
}

Expand Down Expand Up @@ -2750,7 +2734,7 @@ def launchStages(pipeline, reuseBuild, testFilter, enableFailFast, globalVars)

// launchJob returns UNSTABLE (without throwing) when the single-GPU
// sub-job was infra-incomplete: only infra aborts, no real failure.
def singleGpuStatus = launchJob(pipeline, "L0_Test-x86_64-Single-GPU", false, enableFailFast, globalVars, "x86_64", additionalParameters)
def singleGpuStatus = launchJob(pipeline, "L0_Test-x86_64-Single-GPU", false, enableFailFast, globalVars, additionalParameters)
singleGpuInfraIncomplete = (singleGpuStatus == "UNSTABLE")
} catch (InterruptedException e) {
throw e
Expand Down Expand Up @@ -2839,7 +2823,7 @@ def launchStages(pipeline, reuseBuild, testFilter, enableFailFast, globalVars)
'wheelDockerImagePy312': globalVars["LLM_ROCKYLINUX8_PY312_DOCKER_IMAGE"],
]

launchJob(pipeline, "L0_Test-x86_64-Multi-GPU", false, enableFailFast, globalVars, "x86_64", additionalParameters)
launchJob(pipeline, "L0_Test-x86_64-Multi-GPU", false, enableFailFast, globalVars, additionalParameters)

} catch (InterruptedException e) {
throw e
Expand Down Expand Up @@ -2880,7 +2864,7 @@ def launchStages(pipeline, reuseBuild, testFilter, enableFailFast, globalVars)
// launchJob returns UNSTABLE (without throwing) when the build
// sub-job was infra-incomplete: only infra aborts, no genuine
// build failure (see runBranchesWithInfraDefer in Build.groovy).
def buildStatus = launchJob(pipeline, "/LLM/helpers/Build-SBSA", reuseBuild, enableFailFast, globalVars, "SBSA", additionalParameters)
def buildStatus = launchJob(pipeline, "/LLM/helpers/Build-SBSA", reuseBuild, enableFailFast, globalVars, additionalParameters)
buildInfraIncomplete = (buildStatus == "UNSTABLE")
}

Expand All @@ -2898,7 +2882,7 @@ def launchStages(pipeline, reuseBuild, testFilter, enableFailFast, globalVars)
"dockerImage": globalVars["LLM_SBSA_DOCKER_IMAGE"],
'wheelDockerImage': globalVars["LLM_SBSA_WHEEL_DOCKER_IMAGE"],
]
launchInfraDryRunTestJob(pipeline, "SBSA", testFilter, globalVars, "SBSA", imageParameters)
launchInfraDryRunTestJob(pipeline, "SBSA", testFilter, globalVars, imageParameters)
return
}

Expand Down Expand Up @@ -2933,7 +2917,7 @@ def launchStages(pipeline, reuseBuild, testFilter, enableFailFast, globalVars)
// both writers on the same object.
'boltPublishCanonical': "false",
]
launchJob(pipeline, "/LLM/helpers/BoltProfileGen", false, false, globalVars, "SBSA", additionalParameters)
launchJob(pipeline, "/LLM/helpers/BoltProfileGen", false, false, globalVars, additionalParameters)
}
}
}
Expand Down Expand Up @@ -2971,7 +2955,7 @@ def launchStages(pipeline, reuseBuild, testFilter, enableFailFast, globalVars)

// launchJob returns UNSTABLE (without throwing) when the single-GPU
// sub-job was infra-incomplete: only infra aborts, no real failure.
def singleGpuStatus = launchJob(pipeline, "L0_Test-SBSA-Single-GPU", false, enableFailFast, globalVars, "SBSA", additionalParameters)
def singleGpuStatus = launchJob(pipeline, "L0_Test-SBSA-Single-GPU", false, enableFailFast, globalVars, additionalParameters)
singleGpuInfraIncomplete = (singleGpuStatus == "UNSTABLE")
} catch (InterruptedException e) {
throw e
Expand Down Expand Up @@ -3057,7 +3041,7 @@ def launchStages(pipeline, reuseBuild, testFilter, enableFailFast, globalVars)
'wheelDockerImage': globalVars["LLM_SBSA_WHEEL_DOCKER_IMAGE"],
]

launchJob(pipeline, "L0_Test-SBSA-Multi-GPU", false, enableFailFast, globalVars, "SBSA", additionalParameters)
launchJob(pipeline, "L0_Test-SBSA-Multi-GPU", false, enableFailFast, globalVars, additionalParameters)

} catch (InterruptedException e) {
throw e
Expand Down Expand Up @@ -3149,7 +3133,7 @@ def launchStages(pipeline, reuseBuild, testFilter, enableFailFast, globalVars)
if (params.release_type_id) {
additionalParameters['release_type_id'] = params.release_type_id
}
imageBuildStatus = launchJob(pipeline, "/LLM/helpers/BuildDockerImages", false, enableFailFast, globalVars, "x86_64", additionalParameters)
imageBuildStatus = launchJob(pipeline, "/LLM/helpers/BuildDockerImages", false, enableFailFast, globalVars, additionalParameters)
} catch (InterruptedException e) {
throw e
} catch (Exception e) {
Expand Down
Loading
Loading