tqchen commented on code in PR #18239:
URL: https://github.com/apache/tvm/pull/18239#discussion_r2303760557
##########
CMakeLists.txt:
##########
@@ -818,3 +820,123 @@ if(USE_ROCM AND USE_RCCL)
target_link_libraries(tvm PRIVATE rccl)
target_link_libraries(tvm_runtime PRIVATE rccl)
endif()
+
+# Python package installation configuration
+# This section ensures that all necessary files are installed for the Python
wheel
+if(TVM_BUILD_PYTHON_MODULE)
+ message(STATUS "Configuring Python package installation")
+
+ # Install Python source files
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/python/tvm"
+ DESTINATION "tvm"
+ FILES_MATCHING
+ PATTERN "*.py"
+ PATTERN "*.pyi"
+ PATTERN "__pycache__" EXCLUDE
+ PATTERN "*.pyc" EXCLUDE
+ )
+
+ # Install compiled shared libraries
+ install(TARGETS tvm DESTINATION "tvm")
+ install(TARGETS tvm_runtime DESTINATION "tvm")
+
+ # Install third-party compiled dependencies
+ if(TARGET fpA_intB_gemm)
+ install(TARGETS fpA_intB_gemm DESTINATION "tvm")
+ endif()
+ if(TARGET flash_attn)
+ install(TARGETS flash_attn DESTINATION "tvm")
+ endif()
+
+ # Install minimal header files needed by Python extensions
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/tvm/runtime"
+ DESTINATION "tvm/include/tvm/runtime"
+ FILES_MATCHING
+ PATTERN "*.h"
+ )
+
+ # Install DLPack headers
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ffi/3rdparty/dlpack/include"
+ DESTINATION "tvm/3rdparty/dlpack"
+ )
+
+ # Install libbacktrace only if enabled
+ if(USE_LIBBACKTRACE)
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ffi/3rdparty/libbacktrace"
+ DESTINATION "tvm/3rdparty"
+ PATTERN ".git" EXCLUDE
+ PATTERN ".git*" EXCLUDE
+ PATTERN "*.tmp" EXCLUDE
+ )
+ endif()
+
+ # Install minimal CMake configuration
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/utils"
+ DESTINATION "tvm/cmake/utils"
+ FILES_MATCHING
+ PATTERN "*.cmake"
+ )
+
+ # Install minimal third-party files
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/dlpack/include"
+ DESTINATION "tvm/3rdparty/dlpack"
+ FILES_MATCHING
+ PATTERN "*.h"
+ )
+
+ # Install CUTLASS headers only if available
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/cutlass/include")
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/cutlass/include"
+ DESTINATION "tvm/3rdparty/cutlass"
+ FILES_MATCHING
+ PATTERN "*.h"
+ PATTERN "*.hpp"
+ )
+ endif()
+
+ # Install other essential third-party headers
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/dmlc-core/include"
Review Comment:
they are shipped as part of ffi
##########
CMakeLists.txt:
##########
@@ -818,3 +820,123 @@ if(USE_ROCM AND USE_RCCL)
target_link_libraries(tvm PRIVATE rccl)
target_link_libraries(tvm_runtime PRIVATE rccl)
endif()
+
+# Python package installation configuration
+# This section ensures that all necessary files are installed for the Python
wheel
+if(TVM_BUILD_PYTHON_MODULE)
+ message(STATUS "Configuring Python package installation")
+
+ # Install Python source files
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/python/tvm"
+ DESTINATION "tvm"
+ FILES_MATCHING
+ PATTERN "*.py"
+ PATTERN "*.pyi"
+ PATTERN "__pycache__" EXCLUDE
+ PATTERN "*.pyc" EXCLUDE
+ )
+
+ # Install compiled shared libraries
+ install(TARGETS tvm DESTINATION "tvm")
+ install(TARGETS tvm_runtime DESTINATION "tvm")
+
+ # Install third-party compiled dependencies
+ if(TARGET fpA_intB_gemm)
+ install(TARGETS fpA_intB_gemm DESTINATION "tvm")
+ endif()
+ if(TARGET flash_attn)
+ install(TARGETS flash_attn DESTINATION "tvm")
+ endif()
+
+ # Install minimal header files needed by Python extensions
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/tvm/runtime"
+ DESTINATION "tvm/include/tvm/runtime"
+ FILES_MATCHING
+ PATTERN "*.h"
+ )
+
+ # Install DLPack headers
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ffi/3rdparty/dlpack/include"
+ DESTINATION "tvm/3rdparty/dlpack"
+ )
+
+ # Install libbacktrace only if enabled
+ if(USE_LIBBACKTRACE)
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ffi/3rdparty/libbacktrace"
+ DESTINATION "tvm/3rdparty"
+ PATTERN ".git" EXCLUDE
+ PATTERN ".git*" EXCLUDE
+ PATTERN "*.tmp" EXCLUDE
+ )
+ endif()
+
+ # Install minimal CMake configuration
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/utils"
+ DESTINATION "tvm/cmake/utils"
+ FILES_MATCHING
+ PATTERN "*.cmake"
+ )
+
+ # Install minimal third-party files
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/dlpack/include"
+ DESTINATION "tvm/3rdparty/dlpack"
Review Comment:
we no longer need to install dlpack
##########
tests/lint/pylintrc:
##########
@@ -124,7 +124,8 @@ disable=
use-list-literal,
arguments-renamed,
super-init-not-called,
- c-extension-no-member
+ c-extension-no-member,
+ wrong-import-order
Review Comment:
disable import order in each file instead of globally
##########
pyproject.toml:
##########
@@ -14,6 +14,199 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+
+[build-system]
+requires = ["scikit-build-core>=0.7.0"]
+build-backend = "scikit_build_core.build"
+
+[project]
+name = "tvm"
+version = "0.16.0.dev0"
+description = "Apache TVM: An End-to-End Deep Learning Compiler Stack"
+readme = "README.md"
+license = { text = "Apache-2.0" }
+requires-python = ">=3.8"
+authors = [
+ { name = "Apache TVM Community", email = "[email protected]" }
+]
+keywords = ["machine learning", "compiler", "deep learning", "inference"]
+classifiers = [
+ "Development Status :: 4 - Beta",
+ "Intended Audience :: Developers",
+ "Intended Audience :: Education",
+ "Intended Audience :: Science/Research",
+ "License :: OSI Approved :: Apache Software License",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+]
+# Core dependencies - these are the minimum required for basic TVM
functionality
+dependencies = [
+ "cloudpickle",
+ "ml_dtypes",
+ "numpy",
+ "packaging",
+ "psutil",
+ "scipy",
+ "tornado",
+ "typing_extensions",
+]
+
+# Optional dependencies for different features
+[project.optional-dependencies]
+# Model importers
+importer-coreml = ["coremltools"]
+importer-keras = ["tensorflow", "tensorflow-estimator"]
+importer-onnx = ["future", "onnx", "onnxoptimizer", "onnxruntime", "torch",
"torchvision"]
+importer-pytorch = ["torch", "torchvision"]
+importer-tensorflow = ["tensorflow", "tensorflow-estimator"]
+importer-tflite = ["tflite"]
+importer-paddle = ["paddlepaddle"]
+
+# AutoTVM and autoscheduler
+autotvm = ["xgboost"]
+autoscheduler = ["xgboost"]
+
+# Development and testing
+dev = [
+ "black",
+ "isort",
+ "mypy",
+ "pylint",
+ "pytest",
+ "pytest-xdist",
+ "pytest-cov",
+ "pytest-mock",
+ "pytest-benchmark",
+ "pytest-timeout",
+ "pytest-rerunfailures",
+ "pytest-repeat",
+ "pytest-xdist",
+ "pytest-cov",
+ "pytest-mock",
+ "pytest-benchmark",
+ "pytest-timeout",
+ "pytest-rerunfailures",
+ "pytest-repeat",
+]
+
+# All optional dependencies (excluding dev)
+all = [
+ "coremltools",
+ "tensorflow",
+ "tensorflow-estimator",
+ "future",
+ "onnx",
+ "onnxoptimizer",
+ "onnxruntime",
+ "torch",
+ "torchvision",
+ "tflite",
+ "paddlepaddle",
+ "xgboost",
+]
+
+[project.urls]
+Homepage = "https://tvm.apache.org/"
+Documentation = "https://tvm.apache.org/docs/"
+Repository = "https://github.com/apache/tvm"
+"Bug Tracker" = "https://github.com/apache/tvm/issues"
+
+[tool.scikit-build]
+# Point to the root CMakeLists.txt
+cmake.source-dir = "."
+cmake.build-type = "Release"
+
+# Configure the wheel to be Python version-agnostic
+wheel.py-api = "py3"
+
+# Build configuration
+build-dir = "build"
+
+# CMake configuration - ensure proper installation paths
+cmake.args = [
+ "-DTVM_BUILD_PYTHON_MODULE=ON",
+ "-DTVM_FFI_BUILD_PYTHON_MODULE=ON",
+ "-DTVM_USE_CUTLASS=ON",
+ "-DTVM_USE_FLASH_ATTN=ON",
+ "-DTVM_USE_LLVM=ON",
+ "-DTVM_USE_CUDA=OFF", # Set based on your needs
Review Comment:
we only need to set -DTVM_BUILD_PYTHON_MODULE=ON, given we are shipping ffi
separately, we should not set `-DTVM_FFI_BUILD_PYTHON_MODULE=ON`
##########
CMakeLists.txt:
##########
@@ -818,3 +820,123 @@ if(USE_ROCM AND USE_RCCL)
target_link_libraries(tvm PRIVATE rccl)
target_link_libraries(tvm_runtime PRIVATE rccl)
endif()
+
+# Python package installation configuration
+# This section ensures that all necessary files are installed for the Python
wheel
+if(TVM_BUILD_PYTHON_MODULE)
+ message(STATUS "Configuring Python package installation")
+
+ # Install Python source files
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/python/tvm"
+ DESTINATION "tvm"
+ FILES_MATCHING
+ PATTERN "*.py"
+ PATTERN "*.pyi"
+ PATTERN "__pycache__" EXCLUDE
+ PATTERN "*.pyc" EXCLUDE
+ )
+
+ # Install compiled shared libraries
+ install(TARGETS tvm DESTINATION "tvm")
+ install(TARGETS tvm_runtime DESTINATION "tvm")
+
+ # Install third-party compiled dependencies
+ if(TARGET fpA_intB_gemm)
+ install(TARGETS fpA_intB_gemm DESTINATION "tvm")
+ endif()
+ if(TARGET flash_attn)
+ install(TARGETS flash_attn DESTINATION "tvm")
+ endif()
+
+ # Install minimal header files needed by Python extensions
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/tvm/runtime"
+ DESTINATION "tvm/include/tvm/runtime"
+ FILES_MATCHING
+ PATTERN "*.h"
+ )
+
+ # Install DLPack headers
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ffi/3rdparty/dlpack/include"
+ DESTINATION "tvm/3rdparty/dlpack"
+ )
+
+ # Install libbacktrace only if enabled
+ if(USE_LIBBACKTRACE)
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ffi/3rdparty/libbacktrace"
+ DESTINATION "tvm/3rdparty"
Review Comment:
they are shipped as part of ffi
##########
CMakeLists.txt:
##########
@@ -818,3 +820,123 @@ if(USE_ROCM AND USE_RCCL)
target_link_libraries(tvm PRIVATE rccl)
target_link_libraries(tvm_runtime PRIVATE rccl)
endif()
+
+# Python package installation configuration
+# This section ensures that all necessary files are installed for the Python
wheel
+if(TVM_BUILD_PYTHON_MODULE)
+ message(STATUS "Configuring Python package installation")
+
+ # Install Python source files
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/python/tvm"
+ DESTINATION "tvm"
+ FILES_MATCHING
+ PATTERN "*.py"
+ PATTERN "*.pyi"
+ PATTERN "__pycache__" EXCLUDE
+ PATTERN "*.pyc" EXCLUDE
+ )
+
+ # Install compiled shared libraries
+ install(TARGETS tvm DESTINATION "tvm")
+ install(TARGETS tvm_runtime DESTINATION "tvm")
+
+ # Install third-party compiled dependencies
+ if(TARGET fpA_intB_gemm)
+ install(TARGETS fpA_intB_gemm DESTINATION "tvm")
+ endif()
+ if(TARGET flash_attn)
+ install(TARGETS flash_attn DESTINATION "tvm")
+ endif()
+
+ # Install minimal header files needed by Python extensions
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/tvm/runtime"
+ DESTINATION "tvm/include/tvm/runtime"
+ FILES_MATCHING
+ PATTERN "*.h"
+ )
+
+ # Install DLPack headers
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ffi/3rdparty/dlpack/include"
+ DESTINATION "tvm/3rdparty/dlpack"
+ )
+
+ # Install libbacktrace only if enabled
+ if(USE_LIBBACKTRACE)
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ffi/3rdparty/libbacktrace"
+ DESTINATION "tvm/3rdparty"
Review Comment:
we no longer need to install libbacktrace
##########
CMakeLists.txt:
##########
@@ -818,3 +820,123 @@ if(USE_ROCM AND USE_RCCL)
target_link_libraries(tvm PRIVATE rccl)
target_link_libraries(tvm_runtime PRIVATE rccl)
endif()
+
+# Python package installation configuration
+# This section ensures that all necessary files are installed for the Python
wheel
+if(TVM_BUILD_PYTHON_MODULE)
+ message(STATUS "Configuring Python package installation")
+
+ # Install Python source files
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/python/tvm"
+ DESTINATION "tvm"
+ FILES_MATCHING
+ PATTERN "*.py"
+ PATTERN "*.pyi"
+ PATTERN "__pycache__" EXCLUDE
+ PATTERN "*.pyc" EXCLUDE
+ )
+
+ # Install compiled shared libraries
+ install(TARGETS tvm DESTINATION "tvm")
+ install(TARGETS tvm_runtime DESTINATION "tvm")
+
+ # Install third-party compiled dependencies
+ if(TARGET fpA_intB_gemm)
+ install(TARGETS fpA_intB_gemm DESTINATION "tvm")
+ endif()
+ if(TARGET flash_attn)
+ install(TARGETS flash_attn DESTINATION "tvm")
+ endif()
+
+ # Install minimal header files needed by Python extensions
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/tvm/runtime"
+ DESTINATION "tvm/include/tvm/runtime"
+ FILES_MATCHING
+ PATTERN "*.h"
+ )
+
+ # Install DLPack headers
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ffi/3rdparty/dlpack/include"
+ DESTINATION "tvm/3rdparty/dlpack"
Review Comment:
we no longer need to ship dlpack
##########
CMakeLists.txt:
##########
@@ -818,3 +820,123 @@ if(USE_ROCM AND USE_RCCL)
target_link_libraries(tvm PRIVATE rccl)
target_link_libraries(tvm_runtime PRIVATE rccl)
endif()
+
+# Python package installation configuration
+# This section ensures that all necessary files are installed for the Python
wheel
+if(TVM_BUILD_PYTHON_MODULE)
+ message(STATUS "Configuring Python package installation")
+
+ # Install Python source files
+ install(
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/python/tvm"
+ DESTINATION "tvm"
Review Comment:
are we sure we want to install to the tvm subfolder? usually we need to
install into the . folder in a python package, please cross confirm the wheel
in pip install mode
Cross ref https://github.com/apache/tvm/blob/main/ffi/CMakeLists.txt for an
example
##########
pyproject.toml:
##########
@@ -14,6 +14,199 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+
+[build-system]
+requires = ["scikit-build-core>=0.7.0"]
+build-backend = "scikit_build_core.build"
+
+[project]
+name = "tvm"
+version = "0.16.0.dev0"
+description = "Apache TVM: An End-to-End Deep Learning Compiler Stack"
+readme = "README.md"
+license = { text = "Apache-2.0" }
+requires-python = ">=3.8"
+authors = [
+ { name = "Apache TVM Community", email = "[email protected]" }
+]
+keywords = ["machine learning", "compiler", "deep learning", "inference"]
+classifiers = [
+ "Development Status :: 4 - Beta",
+ "Intended Audience :: Developers",
+ "Intended Audience :: Education",
+ "Intended Audience :: Science/Research",
+ "License :: OSI Approved :: Apache Software License",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+]
+# Core dependencies - these are the minimum required for basic TVM
functionality
+dependencies = [
+ "cloudpickle",
+ "ml_dtypes",
+ "numpy",
+ "packaging",
+ "psutil",
+ "scipy",
+ "tornado",
+ "typing_extensions",
+]
+
+# Optional dependencies for different features
+[project.optional-dependencies]
+# Model importers
+importer-coreml = ["coremltools"]
+importer-keras = ["tensorflow", "tensorflow-estimator"]
+importer-onnx = ["future", "onnx", "onnxoptimizer", "onnxruntime", "torch",
"torchvision"]
+importer-pytorch = ["torch", "torchvision"]
+importer-tensorflow = ["tensorflow", "tensorflow-estimator"]
+importer-tflite = ["tflite"]
+importer-paddle = ["paddlepaddle"]
+
+# AutoTVM and autoscheduler
+autotvm = ["xgboost"]
+autoscheduler = ["xgboost"]
+
+# Development and testing
+dev = [
+ "black",
+ "isort",
+ "mypy",
+ "pylint",
+ "pytest",
+ "pytest-xdist",
+ "pytest-cov",
+ "pytest-mock",
+ "pytest-benchmark",
+ "pytest-timeout",
+ "pytest-rerunfailures",
+ "pytest-repeat",
+ "pytest-xdist",
+ "pytest-cov",
+ "pytest-mock",
+ "pytest-benchmark",
+ "pytest-timeout",
+ "pytest-rerunfailures",
+ "pytest-repeat",
+]
+
+# All optional dependencies (excluding dev)
+all = [
+ "coremltools",
+ "tensorflow",
+ "tensorflow-estimator",
+ "future",
+ "onnx",
+ "onnxoptimizer",
+ "onnxruntime",
+ "torch",
+ "torchvision",
+ "tflite",
+ "paddlepaddle",
+ "xgboost",
+]
+
+[project.urls]
+Homepage = "https://tvm.apache.org/"
+Documentation = "https://tvm.apache.org/docs/"
+Repository = "https://github.com/apache/tvm"
+"Bug Tracker" = "https://github.com/apache/tvm/issues"
+
+[tool.scikit-build]
+# Point to the root CMakeLists.txt
+cmake.source-dir = "."
+cmake.build-type = "Release"
+
+# Configure the wheel to be Python version-agnostic
+wheel.py-api = "py3"
+
+# Build configuration
+build-dir = "build"
+
+# CMake configuration - ensure proper installation paths
+cmake.args = [
+ "-DTVM_BUILD_PYTHON_MODULE=ON",
+ "-DTVM_FFI_BUILD_PYTHON_MODULE=ON",
+ "-DTVM_USE_CUTLASS=ON",
+ "-DTVM_USE_FLASH_ATTN=ON",
+ "-DTVM_USE_LLVM=ON",
+ "-DTVM_USE_CUDA=OFF", # Set based on your needs
+ "-DTVM_USE_OPENCL=OFF",
+ "-DTVM_USE_VULKAN=OFF",
+ "-DTVM_USE_METAL=OFF",
+ "-DTVM_USE_OPENGL=OFF",
+ "-DTVM_USE_RPC=ON",
+ "-DTVM_USE_GRAPH_EXECUTOR=ON",
+ "-DTVM_USE_PROFILER=ON",
+ "-DTVM_USE_UTILS=ON",
+]
+
+# Ensure dependent libraries install to same location as libtvm.so
+cmake.define.CMAKE_INSTALL_PREFIX = "python/tvm"
+cmake.define.CMAKE_INSTALL_LIBDIR = "lib"
Review Comment:
we should not set cmake configs here, instead, we should set
https://github.com/apache/tvm/blob/main/ffi/pyproject.toml#L77
##########
src/support/libinfo.cc:
##########
@@ -106,6 +106,10 @@
#define TVM_INFO_USE_HEXAGON_GTEST "NOT-FOUND"
#endif
+#ifndef TVM_INFO_TVM_BUILD_PYTHON_MODULE
+#define TVM_INFO_TVM_BUILD_PYTHON_MODULE "NOT-FOUND"
Review Comment:
this does not have to goto libinfo, as the flag is not as useful
##########
pyproject.toml:
##########
@@ -14,6 +14,199 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+
+[build-system]
+requires = ["scikit-build-core>=0.7.0"]
+build-backend = "scikit_build_core.build"
+
+[project]
+name = "tvm"
+version = "0.16.0.dev0"
+description = "Apache TVM: An End-to-End Deep Learning Compiler Stack"
+readme = "README.md"
+license = { text = "Apache-2.0" }
+requires-python = ">=3.8"
+authors = [
+ { name = "Apache TVM Community", email = "[email protected]" }
+]
+keywords = ["machine learning", "compiler", "deep learning", "inference"]
+classifiers = [
+ "Development Status :: 4 - Beta",
+ "Intended Audience :: Developers",
+ "Intended Audience :: Education",
+ "Intended Audience :: Science/Research",
+ "License :: OSI Approved :: Apache Software License",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+]
+# Core dependencies - these are the minimum required for basic TVM
functionality
+dependencies = [
+ "cloudpickle",
+ "ml_dtypes",
+ "numpy",
+ "packaging",
+ "psutil",
+ "scipy",
+ "tornado",
+ "typing_extensions",
+]
+
+# Optional dependencies for different features
+[project.optional-dependencies]
+# Model importers
+importer-coreml = ["coremltools"]
+importer-keras = ["tensorflow", "tensorflow-estimator"]
+importer-onnx = ["future", "onnx", "onnxoptimizer", "onnxruntime", "torch",
"torchvision"]
+importer-pytorch = ["torch", "torchvision"]
+importer-tensorflow = ["tensorflow", "tensorflow-estimator"]
+importer-tflite = ["tflite"]
+importer-paddle = ["paddlepaddle"]
+
+# AutoTVM and autoscheduler
+autotvm = ["xgboost"]
+autoscheduler = ["xgboost"]
+
+# Development and testing
+dev = [
+ "black",
+ "isort",
+ "mypy",
+ "pylint",
+ "pytest",
+ "pytest-xdist",
+ "pytest-cov",
+ "pytest-mock",
+ "pytest-benchmark",
+ "pytest-timeout",
+ "pytest-rerunfailures",
+ "pytest-repeat",
+ "pytest-xdist",
+ "pytest-cov",
+ "pytest-mock",
+ "pytest-benchmark",
+ "pytest-timeout",
+ "pytest-rerunfailures",
+ "pytest-repeat",
+]
+
+# All optional dependencies (excluding dev)
+all = [
+ "coremltools",
+ "tensorflow",
+ "tensorflow-estimator",
+ "future",
+ "onnx",
+ "onnxoptimizer",
+ "onnxruntime",
+ "torch",
+ "torchvision",
+ "tflite",
+ "paddlepaddle",
+ "xgboost",
+]
+
+[project.urls]
+Homepage = "https://tvm.apache.org/"
+Documentation = "https://tvm.apache.org/docs/"
+Repository = "https://github.com/apache/tvm"
+"Bug Tracker" = "https://github.com/apache/tvm/issues"
+
+[tool.scikit-build]
+# Point to the root CMakeLists.txt
+cmake.source-dir = "."
+cmake.build-type = "Release"
+
+# Configure the wheel to be Python version-agnostic
+wheel.py-api = "py3"
+
+# Build configuration
+build-dir = "build"
+
+# CMake configuration - ensure proper installation paths
+cmake.args = [
+ "-DTVM_BUILD_PYTHON_MODULE=ON",
+ "-DTVM_FFI_BUILD_PYTHON_MODULE=ON",
+ "-DTVM_USE_CUTLASS=ON",
+ "-DTVM_USE_FLASH_ATTN=ON",
+ "-DTVM_USE_LLVM=ON",
+ "-DTVM_USE_CUDA=OFF", # Set based on your needs
Review Comment:
do not set these configs by default, instead they can be picked up by
config.cmake
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]