Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ddb6eea
Add TVM wheel publish workflow
tlopex May 26, 2026
5498239
Fix TVM wheel packaging lint
tlopex May 26, 2026
39907d9
Expose LLVM runtime libs to auditwheel
tlopex May 26, 2026
55ffc29
Reduce runner disk pressure for wheel publish
tlopex May 26, 2026
a36d3b8
Exclude TVM FFI from wheel repair
tlopex May 26, 2026
5738a1f
Repair wheel internal TVM library paths
tlopex May 26, 2026
93b9c52
Avoid pytest dependency during TVM import
tlopex May 26, 2026
0ef42c4
Validate TVM wheel internal ELF links
tlopex May 27, 2026
3b12e76
Format ELF wheel validator
tlopex May 27, 2026
10bd65e
Build TVM wheel with static LLVM
tlopex May 27, 2026
a90d2e7
Build publish wheels across platforms
tlopex May 27, 2026
74ae3e2
Avoid empty array expansion in wheel build
tlopex May 27, 2026
1b5724d
Add zlib to wheel build conda environment
tlopex May 27, 2026
0d31684
Add LLVM prefix path for manylinux wheel builds
tlopex May 27, 2026
32f5349
Keep TVM wheel LLVM linkage static
tlopex May 27, 2026
bc2a7e4
Use static LLVM for host wheel builds
tlopex May 27, 2026
59c47bd
Verify platform-specific TVM runtime library
tlopex May 27, 2026
0e95460
Use cibuildwheel for publish wheel builds
tlopex May 27, 2026
1865e46
Rename CUDA wheel helper action
tlopex May 27, 2026
2b20497
Remove CUDA sidecar wording
tlopex May 27, 2026
c87fdf2
Keep CIBW as sole wheel builder
tlopex May 27, 2026
656b89c
Rename TVM wheel packaging helper
tlopex May 27, 2026
99eba8c
Expose LLVM libs to macOS wheel repair
tlopex May 27, 2026
265a1c8
Fix wheel repair verification paths
tlopex May 27, 2026
7ac2e4c
Clarify wheel CUDA runtime inputs
tlopex May 27, 2026
a5594e0
Fix wheel action runtime paths
tlopex May 27, 2026
1c663a1
Bundle Windows wheel support DLLs
tlopex May 27, 2026
94a4e0f
Harden TVM wheel publish workflow
tlopex May 28, 2026
198224a
Fix LLVM RTTI handling in wheel builds
tlopex May 28, 2026
bf10c6a
Improve wheel verify crash diagnostics
tlopex May 28, 2026
bb87383
Update wheel workflow actions
tlopex May 28, 2026
11f7e6b
Add detailed wheel verify diagnostics
tlopex May 28, 2026
af2a217
Allow TestPyPI wheel version override
tlopex May 28, 2026
b918918
Fix wheel version escaping for TestPyPI
tlopex May 28, 2026
0c40e0d
Collect Linux wheel verify backtraces
tlopex May 28, 2026
7ce86b0
Improve Linux wheel crash diagnostics
tlopex May 29, 2026
4855ebe
Keep diagnostic wheel builds in Release mode
tlopex May 29, 2026
8221238
Disable linker relaxation for the static-LLVM compiler library
tlopex May 29, 2026
01934ab
Remove wheel crash-diagnostic scaffolding
tlopex May 29, 2026
bc20088
Simplify wheel publish workflow structure
tlopex May 29, 2026
6f7743e
Apply distribution version override to Windows wheel repair
tlopex May 29, 2026
f03ec66
Fix C-compilation header discovery for installed wheels
tlopex May 29, 2026
887734c
Fix stale Simplify import in TIRX lowering test
tlopex May 29, 2026
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
117 changes: 117 additions & 0 deletions .github/actions/build-cuda/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: Build CUDA Runtime
description: Build libtvm_runtime_cuda for the TVM wheel packaging flow.

inputs:
arch:
description: "Target Linux architecture for CUDA builds (x86_64 or aarch64)"
required: true
linux_image:
description: "Manylinux image tag to use on Linux runners"
required: false
default: ""
linux_image_tag:
description: "Pinned manylinux container tag shared with cibuildwheel"
required: false
default: ""
cuda_architectures:
description: "CMake CUDA architectures for libtvm_runtime_cuda.so"
required: false
default: "75"
include_cuda_runtime:
description: "Set to true to build the CUDA runtime library"
required: false
default: "false"
Comment on lines +37 to +40
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It should always be true? If that's the case, we can remove this param?


outputs:
cuda_runtime_path:
description: "Absolute path to the built libtvm_runtime_cuda.so, or empty for CPU-only wheels"
value: ${{ steps.cuda_runtime.outputs.path }}

runs:
using: "composite"
steps:
- uses: ./.github/actions/detect-env-vars
id: env_vars

- name: Detect CUDA inputs
id: cuda_inputs
shell: bash -l {0}
env:
INPUT_INCLUDE_CUDA_RUNTIME: ${{ inputs.include_cuda_runtime }}
run: |
set -eux
include_cuda_runtime="$(printf '%s' "${INPUT_INCLUDE_CUDA_RUNTIME}" | tr '[:upper:]' '[:lower:]')"
case "${include_cuda_runtime}" in
1|true|yes|on) include_cuda_runtime=1 ;;
0|false|no|off) include_cuda_runtime=0 ;;
*)
echo "include_cuda_runtime must be a boolean value" >&2
exit 1
;;
esac
echo "include_cuda_runtime=${include_cuda_runtime}" >> "${GITHUB_OUTPUT}"
Comment on lines +53 to +69
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this check unnecessary?


- name: Build CUDA runtime in manylinux
if: runner.os == 'Linux' && steps.cuda_inputs.outputs.include_cuda_runtime == '1'
shell: bash -l {0}
env:
TVM_MANYLINUX_IMAGE: ${{ inputs.linux_image }}
TVM_MANYLINUX_IMAGE_TAG: ${{ inputs.linux_image_tag }}
TVM_ARCH: ${{ inputs.arch }}
TVM_CUDA_ARCHITECTURES: ${{ inputs.cuda_architectures }}
TVM_CUDA_BUILD_DIR: ${{ runner.temp }}/tvm-wheel-cuda
TVM_INCLUDE_CUDA_RUNTIME: "1"
TVM_BUILD_PARALLEL_LEVEL: ${{ steps.env_vars.outputs.cpu_count }}
CMAKE_BUILD_PARALLEL_LEVEL: ${{ steps.env_vars.outputs.cpu_count }}
run: ci/scripts/package/tvm_wheel_helper.sh manylinux-cuda

- name: Reject non-Linux CUDA runtime builds
if: runner.os != 'Linux' && steps.cuda_inputs.outputs.include_cuda_runtime == '1'
shell: bash -l {0}
run: |
echo "CUDA runtime wheels are only enabled on Linux in this workflow" >&2
exit 1
Comment on lines +85 to +90
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can be dropped?


- name: Report CUDA runtime output
id: cuda_runtime
shell: bash -l {0}
env:
INCLUDE_CUDA_RUNTIME: ${{ steps.cuda_inputs.outputs.include_cuda_runtime }}
TVM_CUDA_BUILD_DIR: ${{ runner.temp }}/tvm-wheel-cuda
TVM_CUDA_RUNTIME_PATH: ""
run: |
set -eux
if [[ "${INCLUDE_CUDA_RUNTIME}" != "1" ]]; then
echo "path=" >> "${GITHUB_OUTPUT}"
exit 0
fi
cuda_runtime="$(ci/scripts/package/tvm_wheel_helper.sh cuda-path)"
if [[ -z "${cuda_runtime}" ]]; then
echo "CUDA runtime build did not produce libtvm_runtime_cuda.so" >&2
exit 1
fi
case "${cuda_runtime}" in
"${TVM_CUDA_BUILD_DIR}"/*) ;;
*)
echo "CUDA runtime path is outside the expected build directory: ${cuda_runtime}" >&2
exit 1
;;
esac
echo "path=${cuda_runtime}" >> "${GITHUB_OUTPUT}"
Comment on lines +92 to +117
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need this report step? Or the "Build CUDA runtime in manylinux" step above already reports necessary info (e.g., success, failure, or failure reason)

Loading
Loading