Skip to content

[mlir-tensorrt] Update LLVM patch to add support for PTX ISA v9.0 #1099

[mlir-tensorrt] Update LLVM patch to add support for PTX ISA v9.0

[mlir-tensorrt] Update LLVM patch to add support for PTX ISA v9.0 #1099

name: MLIR-TensorRT CI
on:
push:
# this is for PR CI, it will be triggered by PRs via copy-pr-bot
# it does not support path filtering
branches:
- "pull-request/[0-9]+"
- "main"
# this is for release CI
tags:
# release tag example: mlir-tensorrt-v0.4.3 or mlir-tensorrt-v0.4.3dev20251212
- 'mlir-tensorrt-v[0-9]*.[0-9]*.[0-9]*'
workflow_dispatch:
# this is for nightly CI, it will be automatically triggered by the schedule on main branch only
# schedule:
# - cron: '0 0 * * *' # Runs at 00:00 UTC every day (minute hour day-of-month month-of-year day-of-week)
env:
DEFAULT_IMAGE: ghcr.io/nvidia/tensorrt-incubator/mlir-tensorrt:cuda12.9-ubuntu24.04-0.1
REGISTRY: ghcr.io
defaults:
run:
shell: bash
jobs:
changes:
name: Detect Relevant Changes
runs-on: ubuntu-latest
outputs:
has_changes: ${{ steps.diff.outputs.has_changes }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 5
- name: Compute diff under mlir-tensorrt/**
id: diff
run: |
set -euo pipefail
set -x
if bash ./.github/workflows/mlir-tensorrt/ci-utils.sh detect-code-change; then
echo "has_changes=true" >> "${GITHUB_OUTPUT}"
else
echo "has_changes=false" >> "${GITHUB_OUTPUT}"
fi
pre-check:
name: Pre Check
if: ${{ needs.changes.outputs.has_changes == 'true' }}
needs: changes
runs-on: ubuntu-latest
container:
image: ghcr.io/nvidia/tensorrt-incubator/mlir-tensorrt:cuda12.9-ubuntu24.04-0.1
outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }}
channel: ${{ steps.generate-matrix.outputs.channel }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 5
- name: Run lint checks
# lint check is only needed for PRs and push to main
if: ${{ github.ref_type != 'tag' && github.event_name != 'schedule' }}
run: |
set -euo pipefail
set -x
bash ./.github/workflows/mlir-tensorrt/ci-utils.sh lint-check
- name: Run release checks
# release check is only needed for release tags
if: ${{ github.ref_type == 'tag' }}
run: |
set -euo pipefail
set -x
bash ./.github/workflows/mlir-tensorrt/ci-utils.sh release-check
- name: Generate Build Matrix
id: generate-matrix
run: |
set -euo pipefail
set -x
CHANNEL="test"
if [ "${GITHUB_EVENT_NAME:-}" = "schedule" ]; then
CHANNEL="nightly"
elif [ "${GITHUB_REF_TYPE:-}" = "tag" ]; then
CHANNEL="release"
fi
MATRIX_BLOB="$(python3 ./.github/workflows/mlir-tensorrt/generate-matrix.py --channel "${CHANNEL}")"
echo "${MATRIX_BLOB}"
echo "${CHANNEL}"
echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}"
echo "channel=${CHANNEL}" >> "${GITHUB_OUTPUT}"
mlir-tensorrt-build-test:
name: Build and Test
needs:
- pre-check
if: ${{ needs.pre-check.outputs.channel != 'release' }}
uses: ./.github/workflows/mlir-tensorrt-build-test.yml
with:
build-matrix: ${{ needs.pre-check.outputs.matrix }}
channel: ${{ needs.pre-check.outputs.channel }}
mlir-tensorrt-wheel-tarball-release:
name: Release
needs:
- pre-check
if: ${{ needs.pre-check.outputs.channel == 'release' }}
uses: ./.github/workflows/mlir-tensorrt-release.yml
with:
build-matrix: ${{ needs.pre-check.outputs.matrix }}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-mlir-tensorrt
cancel-in-progress: true