Skip to content

Add packaging pipeline for CUDA plugin EP#28152

Open
tianleiwu wants to merge 11 commits intomainfrom
tlwu/20260420/cuda_plugin_package_pipeline
Open

Add packaging pipeline for CUDA plugin EP#28152
tianleiwu wants to merge 11 commits intomainfrom
tlwu/20260420/cuda_plugin_package_pipeline

Conversation

@tianleiwu
Copy link
Copy Markdown
Contributor

Description

This PR adds an Azure Pipelines packaging flow for the CUDA plugin EP, following the existing WebGPU plugin packaging pipeline pattern. The new pipeline can package Windows x64 and Linux x64 builds for both CUDA 12.8 and 13.0, and optionally package Linux aarch64 builds when CUDA 13.0 is selected.

The flow is parameterized for CUDA version, package version, build type, and Python configuration so the packaging matrix can be expanded without duplicating pipeline logic. It also adds validation to reject unsupported combinations such as Linux aarch64 with CUDA 12.8.

Summary of Changes

Azure Pipelines packaging flow

File Change
tools/ci_build/github/azure-pipelines/plugin-cuda-pipeline.yml Adds the top-level official pipeline with CUDA 12.8/13.0 selection, package/build-type validation, and aarch64 gating for CUDA 13.0 only.
tools/ci_build/github/azure-pipelines/stages/plugin-cuda-packaging-stage.yml Adds the packaging orchestrator that fans out per-platform/per-Python build stages and merges Linux artifacts.
tools/ci_build/github/azure-pipelines/stages/plugin-linux-cuda-stage.yml Adds the Linux packaging stage template for x64 and aarch64, parameterized by CUDA version, Python executable, Docker image, and CUDA architectures.
tools/ci_build/github/azure-pipelines/stages/plugin-win-cuda-stage.yml Adds the Windows packaging stage template with CUDA-version-specific SDK setup and CUDA 13.0 cuDNN handling.

Linux build script

File Change
tools/ci_build/github/linux/build_cuda_plugin_package.sh Adds a Docker-based CUDA plugin packaging script with parameters for build config, Python executable, CUDA version, and CMAKE_CUDA_ARCHITECTURES.

Packaging behavior

  • Supports cuda_version = 12.8 or 13.0.
  • Restricts Linux aarch64 packaging to CUDA 13.0 because the aarch64 CUDA Docker image is only available for CUDA 13.x.
  • Uses CUDA-version-specific Docker base images and CUDA architecture lists.
  • Threads Python configuration through the Linux packaging path so wheel-producing builds can be selected per Python version.
  • Merges Linux per-version artifacts into a combined Linux artifact for downstream consumption.

Testing

  • Not run locally. This change adds CI pipeline definitions and packaging scripts only.

Motivation and Context

The CUDA plugin EP already has GitHub Actions CI coverage for Linux and Windows builds, but it did not yet have a matching Azure Pipelines packaging flow like the WebGPU plugin EP. Adding this packaging pipeline makes it possible to publish packaged CUDA plugin artifacts through the same official packaging infrastructure, while also supporting the newer CUDA 13.0 configuration and Linux aarch64 packaging where the required Docker image exists.

Checklist

  • Tests added/updated or not required
  • Documentation updated or not applicable
  • No breaking changes
  • CI passes

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an Azure Pipelines-based packaging workflow for the CUDA plugin Execution Provider (EP), modeled after the existing WebGPU plugin packaging pipelines, and threads a parameterized plugin version into the built binary.

Changes:

  • Introduces a new top-level official Azure Pipeline for CUDA plugin EP packaging with CUDA version selection and parameter validation.
  • Adds reusable stage templates to build/package CUDA plugin artifacts on Windows x64 and Linux (x64 + optional aarch64), including Linux artifact merge logic.
  • Adds a Linux Docker-based build script for producing the plugin shared library (and optionally wheels), and wires plugin EP versioning through CMake to runtime-reported version.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tools/ci_build/github/linux/build_cuda_plugin_package.sh New Docker-based Linux build script for CUDA plugin packaging with CUDA/Python/arch parameters.
tools/ci_build/github/azure-pipelines/stages/plugin-win-cuda-stage.yml New Windows x64 stage template to build/sign/publish CUDA plugin artifacts (CUDA 12.8/13.0).
tools/ci_build/github/azure-pipelines/stages/plugin-linux-cuda-stage.yml New Linux stage template (x64/aarch64) to build and publish CUDA plugin artifacts via Docker.
tools/ci_build/github/azure-pipelines/stages/plugin-cuda-packaging-stage.yml Orchestrates the platform/Python matrix and merges Linux artifacts for downstream consumption.
tools/ci_build/github/azure-pipelines/plugin-cuda-pipeline.yml New official pipeline entrypoint with parameter validation and CUDA-version-specific configuration.
onnxruntime/core/providers/cuda/plugin/cuda_ep_factory.h Switches CUDA plugin EP version string to a build-time macro value.
cmake/onnxruntime_providers_cuda_plugin.cmake Defines default plugin EP version and exports it to code via ORT_PLUGIN_EP_VERSION.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/ci_build/github/azure-pipelines/stages/plugin-linux-cuda-stage.yml Outdated
Comment thread tools/ci_build/github/azure-pipelines/plugin-cuda-pipeline.yml Outdated
Comment thread tools/ci_build/github/azure-pipelines/plugin-cuda-pipeline.yml Outdated
Comment thread tools/ci_build/github/linux/build_cuda_plugin_package.sh
Comment thread tools/ci_build/github/linux/build_cuda_plugin_package.sh
Comment thread tools/ci_build/github/linux/build_cuda_plugin_package.sh
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The stage template defaulted build_linux_aarch64 to true while
docker_base_image_aarch64 defaults to empty string, which would cause a
Docker build failure if the template were invoked with defaults. Change
the default to false to match the top-level pipeline and ensure safe
standalone usage.
Copy link
Copy Markdown
Member

@yuslepukhin yuslepukhin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed Linux CUDA plugin packaging always passes --build_wheel in build_cuda_plugin_package.sh. Is that intentional for this pipeline, or should wheel building be optional/disabled when we only need plugin artifacts? I’m asking because this can introduce extra failure modes unrelated to plugin binary packaging.

Comment thread tools/ci_build/github/azure-pipelines/plugin-cuda-pipeline.yml Outdated
Comment thread tools/ci_build/github/linux/build_cuda_plugin_package.sh Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants