-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(//py)!: Build system is now PEP517 compatible
BREAKING CHANGE: A ton of files have been moved in order to support PEP517 standards based builds. Users are now advised to use commands such as the following: Editable installs: python -m pip install --verbose --pre -e . [if necessary add --index-url to access nightly builds of pytorch] Wheel files: python -m pip wheel --verbose --pre . [if necessary add --index-url to access nightly builds of pytorch] --config-setting="--build-option=<options you would pass to setup.py>" -w dist Alternative build processes are also supported pypa/build: python -m build --wheel --skip-dependency-check --no-isolation > Skip dependency check means you need to install py/requirements.txt first due to issues with TensorRT's python package Signed-off-by: Naren Dasan <naren@narendasan.com> Signed-off-by: Naren Dasan <narens@nvidia.com> tools: adding a pyproject.toml linter Signed-off-by: Naren Dasan <naren@narendasan.com> Signed-off-by: Naren Dasan <narens@nvidia.com> chore: update CI for new build path Signed-off-by: Naren Dasan <naren@narendasan.com> Signed-off-by: Naren Dasan <narens@nvidia.com> Adding no deps flag refactor: Formally define package contents in setup.py Signed-off-by: Naren Dasan <naren@narendasan.com> Signed-off-by: Naren Dasan <narens@nvidia.com>
- Loading branch information
1 parent
bac0c59
commit 8dfd895
Showing
19 changed files
with
519 additions
and
354 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,4 +66,5 @@ bazel-tensorrt | |
*.cache | ||
*cifar-10-batches-py* | ||
bazel-project | ||
build/ | ||
build/ | ||
wheelhouse/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
py38 | ||
py39 | ||
py310 | ||
py311 | ||
libtorchtrt_pre_cxx11_abi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,78 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools", | ||
"wheel", | ||
"numpy", | ||
"ninja", | ||
"pyyaml", | ||
"setuptools", | ||
"cffi", | ||
"typing_extensions", | ||
"future", | ||
"tensorrt >=8.6,<8.7" | ||
"setuptools>=68.0.0", | ||
"packaging>=23.1", | ||
"wheel>=0.40.0", | ||
"numpy>=1.25.0", | ||
"ninja>=1.11.0", | ||
"pyyaml>=6.0", | ||
"cffi>=1.15.1", | ||
"typing_extensions>=4.7.0", | ||
"future>=0.18.3", | ||
"tensorrt>=8.6,<8.7", | ||
#"torch >=2.0.0,<2.1.0", | ||
"torch==2.1.0.dev20230703+cu121", | ||
"pybind11==2.6.2" | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
# Use legacy backend to import local packages in setup.py | ||
#build-backend = "setuptools.build_meta:__legacy__" | ||
[project] | ||
name = "torch_tensorrt" | ||
authors = [ | ||
{name="NVIDIA Corporation", email="narens@nvidia.com"} | ||
] | ||
description = "Torch-TensorRT is a package which allows users to automatically compile PyTorch and TorchScript modules to TensorRT while remaining in PyTorch" | ||
license = {file = "LICENSE"} | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: GPU :: NVIDIA CUDA", | ||
"License :: OSI Approved :: BSD License", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Operating System :: POSIX :: Linux", | ||
"Programming Language :: C++", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
"Topic :: Software Development", | ||
"Topic :: Software Development :: Libraries", | ||
] | ||
readme = {file = "py/README.md", content-type = "text/markdown"} | ||
requires-python = ">=3.8" | ||
keywords = ["pytorch", "torch", "tensorrt", "trt", "ai", "artificial intelligence", "ml", "machine learning", "dl", "deep learning", "compiler", "dynamo", "torchscript", "inference"] | ||
dependencies = [ | ||
#"torch>=2.0.0,<2.1.0", | ||
"torch==2.1.0.dev20230703+cu121", | ||
"tensorrt>=8.6,<8.7", | ||
"packaging>=23", | ||
"numpy>=1.25.0", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.optional-dependencies] | ||
torchvision = ["torchvision >=0.16.dev,<0.17.0"] | ||
|
||
[project.urls] | ||
Homepage = "https://pytorch.org/tensorrt" | ||
Documentation = "https://pytorch.org/tensorrt" | ||
Repository = "https://github.com/pytorch/tensorrt.git" | ||
Changelog = "https://github.com/pytorch/tensorrt/releases" | ||
|
||
|
||
[tool.black] | ||
# Uncomment if pyproject.toml worked fine to ensure consistency with flake8 | ||
# line-length = 120 | ||
target-versions = ["py38", "py39", "py310"] | ||
target-versions = ["py38", "py39", "py310", "py311", "py312"] | ||
force-exclude = """ | ||
elu_converter/setup.py | ||
""" | ||
|
||
[tool.mypy] | ||
show_error_codes = true | ||
disable_error_code = "attr-defined" | ||
no_implicit_optional = true | ||
|
||
[tool.setuptools] | ||
package-dir = {"" = "py"} | ||
include-package-data = false |
Oops, something went wrong.