This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm-tirx.git
The following commit(s) were added to refs/heads/main by this push:
new ec41cd139 Fix the crate publish against the released wheels (#236)
ec41cd139 is described below
commit ec41cd1396b8d0643e7779825b603e515058752f
Author: Tianqi Chen <[email protected]>
AuthorDate: Tue Nov 10 14:23:09 2026 -0500
Fix the crate publish against the released wheels (#236)
Fixes for the crate publish run against the published wheels.
The tvm-ffi submodule is at `v0.1.16-rc4`, but the package still
required `apache-tvm-ffi>=0.1.15.post1`. This requires
`apache-tvm-ffi>=0.1.16rc4` in `pyproject.toml` and in the two CUDA
runtime sidecar build scripts. Naming the rc lets pip and uv install it
while 0.1.16 is not out yet; 0.1.16 and later releases satisfy it too.
The `llvm::get_vector_width` doctest loaded `libtvm_tirx_llvm_backend`
by name, but the published wheels are built with
`TVM_TIRX_LLVM_NATIVE_ONLY` and ship `libtvm_tirx_llvm_backend_native`,
so the crate test against them failed with "cannot open shared object
file". The example is removed.
The `Install TIRx and TVM FFI` step of `publish_crate.yml` installs
`apache-tvm-tirx==${RELEASE_VERSION}` and checks the installed version
against it, but no step set `RELEASE_VERSION`. The release metadata step
now exports it from the version it writes into `pyproject.toml`.
---------
Signed-off-by: tqchen <[email protected]>
---
.github/workflows/publish_crate.yml | 6 ++++++
ci/wheel/manylinux_build_libtvm_runtime_cuda.sh | 2 +-
ci/wheel/windows_build_libtvm_runtime_cuda.bat | 2 +-
pyproject.toml | 2 +-
rust/tvm-tirx/src/codegen/llvm.rs | 16 ----------------
5 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/.github/workflows/publish_crate.yml
b/.github/workflows/publish_crate.yml
index f88efb2cd..dbbe708d6 100644
--- a/.github/workflows/publish_crate.yml
+++ b/.github/workflows/publish_crate.yml
@@ -92,6 +92,12 @@ jobs:
uv pip install tomlkit setuptools-scm
python ci/wheel/prepare_release_metadata.py --crate-version-from-tag
"$RELEASE_TAG"
echo "CRATE_VERSION=${RELEASE_TAG#v}" >> "$GITHUB_ENV"
+ python - >> "$GITHUB_ENV" <<'PY'
+ import tomlkit
+
+ version =
tomlkit.parse(open("pyproject.toml").read())["project"]["version"]
+ print(f"RELEASE_VERSION={version}")
+ PY
python ci/wheel/detect_tvm_ffi_version.py rewrite --version
"$TVM_FFI_VERSION"
build_crate:
diff --git a/ci/wheel/manylinux_build_libtvm_runtime_cuda.sh
b/ci/wheel/manylinux_build_libtvm_runtime_cuda.sh
index e1f4f7f4d..385e06e02 100755
--- a/ci/wheel/manylinux_build_libtvm_runtime_cuda.sh
+++ b/ci/wheel/manylinux_build_libtvm_runtime_cuda.sh
@@ -39,7 +39,7 @@ dnf -y install cuda-driver-devel-13-1
# generator (no Ninja), so no build tools are installed here. Put the bundled
# CPython and CUDA toolchain on PATH for the CMake configure and nvcc.
export PATH="/opt/python/cp310-cp310/bin:/usr/local/cuda/bin:${PATH}"
-python -m pip install "apache-tvm-ffi>=0.1.15.post0"
+python -m pip install "apache-tvm-ffi>=0.1.16rc4"
nvcc --version
rm -rf "${build_dir}"
diff --git a/ci/wheel/windows_build_libtvm_runtime_cuda.bat
b/ci/wheel/windows_build_libtvm_runtime_cuda.bat
index c7b189c27..4e4a7fb7b 100644
--- a/ci/wheel/windows_build_libtvm_runtime_cuda.bat
+++ b/ci/wheel/windows_build_libtvm_runtime_cuda.bat
@@ -86,7 +86,7 @@ set "cuda_root=%CD%"
popd
set "CUDA_PATH=%cuda_root%"
-python -m pip install -U pip cmake ninja "apache-tvm-ffi>=0.1.15.post1" ||
exit /b 1
+python -m pip install -U pip cmake ninja "apache-tvm-ffi>=0.1.16rc4" || exit
/b 1
"%nvcc_exe%" --version || exit /b 1
rem nvcc needs the MSVC host compiler (cl.exe), so locate VS via vswhere and
run the
diff --git a/pyproject.toml b/pyproject.toml
index 4a134bed1..726eaaac9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -38,7 +38,7 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
- "apache-tvm-ffi>=0.1.15.post1",
+ "apache-tvm-ffi>=0.1.16rc4",
"apache-tvm-ffi-orcjit>=0.1.3",
"ml_dtypes",
"numpy",
diff --git a/rust/tvm-tirx/src/codegen/llvm.rs
b/rust/tvm-tirx/src/codegen/llvm.rs
index 310aa7748..2e7a6271b 100644
--- a/rust/tvm-tirx/src/codegen/llvm.rs
+++ b/rust/tvm-tirx/src/codegen/llvm.rs
@@ -107,22 +107,6 @@ pub fn cpu_has_feature(feature: &str, target: &Target) ->
Result<bool> {
/// Return the vector width of the CPU of `target` in bits, or -1 for a target
that is not `llvm`
/// (`codegen.llvm_get_vector_width`).
-///
-/// # Examples
-///
-/// ```
-/// use std::env::consts::{DLL_PREFIX, DLL_SUFFIX};
-/// use tvm_tirx::codegen::llvm;
-/// use tvm_tirx::target::Target;
-/// use tvm_tirx::tvm_ffi::Module;
-///
-/// let backend = format!("{DLL_PREFIX}tvm_tirx_llvm_backend{DLL_SUFFIX}");
-/// let _backend = Module::load_from_file(backend)?;
-/// let cpu = llvm::get_system_cpu()?;
-/// let host = Target::new(&format!(r#"{{"kind": "llvm", "mcpu": "{}"}}"#,
cpu.as_str()))?;
-/// assert!(llvm::get_vector_width(&host)? > 0);
-/// # Ok::<(), tvm_tirx::tvm_ffi::Error>(())
-/// ```
pub fn get_vector_width(target: &Target) -> Result<i32> {
tvm_ffi::Function::get_global("codegen.llvm_get_vector_width")?
.call_tuple((target,))?