46 lines
1.6 KiB
TOML
46 lines
1.6 KiB
TOML
[build-system]
|
|
# torch must match the runtime range in ../pyproject.toml. The cache .so do not link
|
|
# libtorch (tvm-ffi builds them standalone), but the build reads torch.version.cuda for
|
|
# the wheel's +cuNNN local version and torch.utils.cpp_extension.CUDA_HOME to find nvcc.
|
|
# Build isolation resolves this list on its own, so a torch here whose CUDA differs from
|
|
# the runtime's tags the wheel wrong and freetoken.kernel.utils then refuses to load it.
|
|
requires = [
|
|
# 77 is the first release that understands the PEP 639 `license` SPDX string below.
|
|
"setuptools>=77",
|
|
"wheel",
|
|
"torch>=2.11,<2.12",
|
|
"apache-tvm-ffi==0.1.13.post3",
|
|
]
|
|
build-backend = "build_backend"
|
|
backend-path = ["."]
|
|
|
|
[project]
|
|
name = "freetoken-kernel-cache"
|
|
dynamic = ["version"]
|
|
description = "Prebuilt TVM FFI kernel cache for FreeToken"
|
|
requires-python = ">=3.10"
|
|
license = "Apache-2.0"
|
|
dependencies = ["apache-tvm-ffi==0.1.13.post3"]
|
|
|
|
# Provenance pin: PyPI's torch 2.11.0 is itself the cu130 build, but this index serves
|
|
# ONLY cu130 wheels, so an isolated build can never resolve a different-CUDA torch and
|
|
# stamp the wheel +cu126/+cu128. uv applies these to build-system.requires when this
|
|
# directory is the build root. Mirrors ../pyproject.toml.
|
|
[tool.uv.sources]
|
|
torch = { index = "pytorch-cu130" }
|
|
|
|
[[tool.uv.index]]
|
|
name = "pytorch-cu130"
|
|
url = "https://download.pytorch.org/whl/cu130"
|
|
explicit = true
|
|
|
|
[tool.setuptools]
|
|
include-package-data = false
|
|
packages = ["freetoken_kernel_cache"]
|
|
|
|
[tool.setuptools.dynamic]
|
|
version = {attr = "freetoken_kernel_cache.__version__"}
|
|
|
|
[tool.setuptools.package-data]
|
|
freetoken_kernel_cache = ["jit_cache/**/*.so", "_build_meta.py"]
|