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 a200af70c [BUILD] Drop the packaging dependency and bump to 0.1.0b1 
(#200)
a200af70c is described below

commit a200af70cb0d9bb7961b813d09c7c32d86f90ada
Author: Tianqi Chen <[email protected]>
AuthorDate: Thu Nov 5 00:09:48 2026 -0500

    [BUILD] Drop the packaging dependency and bump to 0.1.0b1 (#200)
    
    Drops the `packaging` runtime and test dependency and bumps the version
    to 0.1.0b1.
    
    - The Triton version checks in `tirx/script/ir_builder/triton.py` and
    `tests/python/codegen/test_triton.py` compare the leading `(major,
    minor)` integers directly.
    - The Pygments >= 2.4 check in the script printer is removed; 2.4 dates
    from 2019.
    - The crate publication workflow installs `packaging` for its own
    release-version check, which previously came in through
    `apache-tvm-tirx`.
    - Version 0.1.0b0 -> 0.1.0b1 in `pyproject.toml`, `CMakeLists.txt`,
    `include/tvm/runtime/base.h`, `libinfo.py` and the LLVM targets wheel.
---
 .github/workflows/publish_crate.yml              |  2 +-
 CMakeLists.txt                                   |  2 +-
 ci/wheel/tvm-tirx-llvm-targets/pyproject.toml    |  4 ++--
 include/tvm/runtime/base.h                       |  2 +-
 pyproject.toml                                   |  4 +---
 python/tvm_tirx/libinfo.py                       |  2 +-
 python/tvm_tirx/script/printer/highlight.py      | 12 ++----------
 python/tvm_tirx/tirx/script/ir_builder/triton.py |  3 +--
 tests/python/codegen/test_triton.py              |  6 +++---
 9 files changed, 13 insertions(+), 24 deletions(-)

diff --git a/.github/workflows/publish_crate.yml 
b/.github/workflows/publish_crate.yml
index d1c9421f4..76ef39d8b 100644
--- a/.github/workflows/publish_crate.yml
+++ b/.github/workflows/publish_crate.yml
@@ -159,7 +159,7 @@ jobs:
           else
             tirx=("apache-tvm-tirx==${RELEASE_VERSION}")
           fi
-          uv pip install "${tirx[@]}" "apache-tvm-ffi==${TVM_FFI_VERSION}"
+          uv pip install "${tirx[@]}" "apache-tvm-ffi==${TVM_FFI_VERSION}" 
packaging
           python - <<'PY'
           import os
           from importlib.metadata import version
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4fda7f787..d1b0bf195 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,7 +32,7 @@ endfunction()
 
 # ######### Common options ##########
 
-set(TVM_TIRX_VERSION "0.1.0b0")
+set(TVM_TIRX_VERSION "0.1.0b1")
 if(PROJECT_IS_TOP_LEVEL)
   tvm_tirx_option(TVM_TIRX_BUILD_TESTS BOOL OFF "Build C++ tests")
   tvm_tirx_option(TVM_TIRX_BUILD_PYTHON_MODULE BOOL OFF "Build the Python 
package with scikit-build-core")
diff --git a/ci/wheel/tvm-tirx-llvm-targets/pyproject.toml 
b/ci/wheel/tvm-tirx-llvm-targets/pyproject.toml
index 7f71ea0f3..94238b9a4 100644
--- a/ci/wheel/tvm-tirx-llvm-targets/pyproject.toml
+++ b/ci/wheel/tvm-tirx-llvm-targets/pyproject.toml
@@ -16,11 +16,11 @@
 # under the License.
 [project]
 name = "apache-tvm-tirx-llvm-targets"
-version = "0.1.0b0"
+version = "0.1.0b1"
 description = "Additional LLVM code generation targets for TVM TIRx"
 license = "Apache-2.0"
 requires-python = ">=3.10"
-dependencies = ["apache-tvm-tirx==0.1.0b0"]
+dependencies = ["apache-tvm-tirx==0.1.0b1"]
 
 [build-system]
 requires = [
diff --git a/include/tvm/runtime/base.h b/include/tvm/runtime/base.h
index 58d49459d..05b4e34e8 100644
--- a/include/tvm/runtime/base.h
+++ b/include/tvm/runtime/base.h
@@ -32,7 +32,7 @@
 // passes the setuptools_scm-resolved version through CMake). The literal 
below is the
 // fallback for a bare build with no override.
 #ifndef TVM_TIRX_VERSION
-#define TVM_TIRX_VERSION "0.1.0b0"
+#define TVM_TIRX_VERSION "0.1.0b1"
 #endif
 
 // Core runtime visibility is independent of TIRx compiler visibility.
diff --git a/pyproject.toml b/pyproject.toml
index 91b919172..be3369c28 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -17,7 +17,7 @@
 
 [project]
 name = "apache-tvm-tirx"
-version = "0.1.0b0"
+version = "0.1.0b1"
 description = "TVM TIRx"
 license = "Apache-2.0"
 license-files = ["LICENSE"]
@@ -42,7 +42,6 @@ dependencies = [
   "apache-tvm-ffi-orcjit>=0.1.3",
   "ml_dtypes",
   "numpy",
-  "packaging",
 ]
 
 [project.urls]
@@ -84,7 +83,6 @@ test = [
   "pytest",
   "pytest-xdist",
   "z3-solver",
-  "packaging",
 ]
 lint = ["ruff", "pre-commit"]
 dev = [{ include-group = "test" }, { include-group = "lint" }]
diff --git a/python/tvm_tirx/libinfo.py b/python/tvm_tirx/libinfo.py
index a415666e7..0f3e2aaa0 100644
--- a/python/tvm_tirx/libinfo.py
+++ b/python/tvm_tirx/libinfo.py
@@ -94,7 +94,7 @@ def find_include_path() -> str:
     raise RuntimeError("Cannot find TVM include path.")
 
 
-__version__ = "0.1.0b0"
+__version__ = "0.1.0b1"
 
 
 _LIBRARY_NAMES = ("tvm_tirx_compiler", "tvm_runtime")
diff --git a/python/tvm_tirx/script/printer/highlight.py 
b/python/tvm_tirx/script/printer/highlight.py
index f8f923ef1..60d60bc95 100644
--- a/python/tvm_tirx/script/printer/highlight.py
+++ b/python/tvm_tirx/script/printer/highlight.py
@@ -113,20 +113,12 @@ def _get_pygments_style(
     """
     try:
         # pylint: disable=import-outside-toplevel
-        import pygments
-        from packaging import version
         from pygments.style import Style
         from pygments.token import Comment, Keyword, Name, Number, Operator, 
String
-
-        if version.parse(pygments.__version__) < version.parse("2.4.0"):
-            raise ImportError("Required Pygments version >= 2.4.0 but got " + 
pygments.__version__)
     except ImportError as err:
-        if err.name == "packaging":
-            name = "packaging"
-        elif err.name == "pygments":
-            name = "Pygments>=2.4.0"
-        else:
+        if err.name != "pygments":
             raise ValueError(f'Package "{err.name}" should not be used')
+        name = "Pygments"
 
         with warnings.catch_warnings():
             warnings.simplefilter("once", UserWarning)
diff --git a/python/tvm_tirx/tirx/script/ir_builder/triton.py 
b/python/tvm_tirx/tirx/script/ir_builder/triton.py
index 6a749291d..f1e6957e9 100644
--- a/python/tvm_tirx/tirx/script/ir_builder/triton.py
+++ b/python/tvm_tirx/tirx/script/ir_builder/triton.py
@@ -22,7 +22,6 @@ from typing import Any
 
 import triton
 import tvm_ffi
-from packaging import version
 from triton.runtime.jit import type_canonicalisation_dict
 
 import tvm_tirx
@@ -31,7 +30,7 @@ from tvm_tirx.ir import IntImm, PrimType, PtrType, 
is_prim_expr
 
 from .external_kernel import BaseKernel
 
-if version.parse(triton.__version__) < version.parse("3.3.0"):
+if tuple(int(part) for part in triton.__version__.split(".")[:2]) < (3, 3):
     raise ImportError(
         f"TIR Triton integration requires Triton >= 3.3.0, but found Triton 
{triton.__version__}"
     )
diff --git a/tests/python/codegen/test_triton.py 
b/tests/python/codegen/test_triton.py
index 474530143..78c1d7a86 100644
--- a/tests/python/codegen/test_triton.py
+++ b/tests/python/codegen/test_triton.py
@@ -26,11 +26,11 @@ from tvm_tirx.testing import env
 try:
     import triton
     import triton.language as tl
-    from packaging import version
 except ImportError:
     pytestmark = pytest.skip("Triton is not available", 
allow_module_level=True)
 else:
-    if version.parse(triton.__version__) < version.parse("3.3.0"):
+    TRITON_VERSION = tuple(int(part) for part in 
triton.__version__.split(".")[:2])
+    if TRITON_VERSION < (3, 3):
         pytestmark = pytest.skip("Triton >= 3.3.0 is required", 
allow_module_level=True)
 
 
@@ -83,7 +83,7 @@ def test_triton_call_kernel():
     # Triton omits constexpr arguments and appends global scratch, plus profile
     # scratch starting in 3.5. This kernel requires no scratch allocation.
     scratch_args = [tvm_tirx.tirx.reinterpret(tvm_tirx.ir.IntImm("uint64", 0), 
ty="handle")]
-    if version.parse(triton.__version__) >= version.parse("3.5.0"):
+    if TRITON_VERSION >= (3, 5):
         
scratch_args.append(tvm_tirx.tirx.reinterpret(tvm_tirx.ir.IntImm("uint64", 0), 
ty="handle"))
 
     # The thread extent is 256 because the kernel is compiled with num_warps=8.

Reply via email to