From a4712487b98f563f8c526f21639f8a62395efee9 Mon Sep 17 00:00:00 2001 From: Naren Dasan Date: Fri, 5 Dec 2025 18:57:09 +0000 Subject: [PATCH] chore: Deleting legacy CI infrastructure --- toolchains/legacy/WORKSPACE.sbsa | 92 -------- toolchains/legacy/WORKSPACE.win.release.tmpl | 83 ------- toolchains/legacy/WORKSPACE.x86_64 | 93 -------- .../WORKSPACE.x86_64.cu118.release.rhel | 97 -------- .../WORKSPACE.x86_64.cu121.release.rhel | 97 -------- toolchains/legacy/WORKSPACE.x86_64.legacy | 93 -------- .../legacy/WORKSPACE.x86_64.release.rhel.tmpl | 93 -------- .../legacy/WORKSPACE.x86_64.release.ubuntu | 97 -------- toolchains/legacy/pyproject.toml | 218 ------------------ 9 files changed, 963 deletions(-) delete mode 100644 toolchains/legacy/WORKSPACE.sbsa delete mode 100644 toolchains/legacy/WORKSPACE.win.release.tmpl delete mode 100644 toolchains/legacy/WORKSPACE.x86_64 delete mode 100644 toolchains/legacy/WORKSPACE.x86_64.cu118.release.rhel delete mode 100644 toolchains/legacy/WORKSPACE.x86_64.cu121.release.rhel delete mode 100644 toolchains/legacy/WORKSPACE.x86_64.legacy delete mode 100644 toolchains/legacy/WORKSPACE.x86_64.release.rhel.tmpl delete mode 100644 toolchains/legacy/WORKSPACE.x86_64.release.ubuntu delete mode 100644 toolchains/legacy/pyproject.toml diff --git a/toolchains/legacy/WORKSPACE.sbsa b/toolchains/legacy/WORKSPACE.sbsa deleted file mode 100644 index ea8d72f347..0000000000 --- a/toolchains/legacy/WORKSPACE.sbsa +++ /dev/null @@ -1,92 +0,0 @@ -workspace(name = "Torch-TensorRT") - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -http_archive( - name = "rules_python", - sha256 = "863ba0fa944319f7e3d695711427d9ad80ba92c6edd0b7c7443b84e904689539", - strip_prefix = "rules_python-0.22.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.22.0/rules_python-0.22.0.tar.gz", -) - -load("@rules_python//python:repositories.bzl", "py_repositories") - -py_repositories() - -http_archive( - name = "rules_pkg", - sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - "https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - ], -) - -load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") - -rules_pkg_dependencies() - -http_archive( - name = "googletest", - sha256 = "755f9a39bc7205f5a0c428e920ddad092c33c8a1b46997def3f1d4a82aded6e1", - strip_prefix = "googletest-5ab508a01f9eb089207ee87fd547d290da39d015", - urls = ["https://github.com/google/googletest/archive/5ab508a01f9eb089207ee87fd547d290da39d015.zip"], -) - -# External dependency for torch_tensorrt if you already have precompiled binaries. -local_repository( - name = "torch_tensorrt", - path = "/opt/circleci/.pyenv/versions/3.10.9/lib/python3.10/site-packages/torch_tensorrt" -) - -# CUDA should be installed on the system locally -new_local_repository( - name = "cuda", - build_file = "@//third_party/cuda:BUILD", - path = "/usr/local/cuda/", -) - -new_local_repository( - name = "cublas", - build_file = "@//third_party/cublas:BUILD", - path = "/usr", -) -#################################################################################### -# Locally installed dependencies (use in cases of custom dependencies or aarch64) -#################################################################################### - -# NOTE: In the case you are using just the pre-cxx11-abi path or just the cxx11 abi path -# with your local libtorch, just point deps at the same path to satisfy bazel. - -# NOTE: NVIDIA's aarch64 PyTorch (python) wheel file uses the CXX11 ABI unlike PyTorch's standard -# x86_64 python distribution. If using NVIDIA's version just point to the root of the package -# for both versions here and do not use --config=pre-cxx11-abi - -new_local_repository( - name = "libtorch", - path = "/opt/circleci/.pyenv/versions/3.10.9/lib/python3.10/site-packages/torch", - build_file = "third_party/libtorch/BUILD" -) - -new_local_repository( - name = "libtorch_pre_cxx11_abi", - path = "/opt/circleci/.pyenv/versions/3.10.9/lib/python3.10/site-packages/torch", - build_file = "third_party/libtorch/BUILD" -) - -new_local_repository( - name = "tensorrt", - path = "/usr/", - build_file = "@//third_party/tensorrt/local:BUILD" -) - -load("@rules_python//python:pip.bzl", "pip_parse") - -pip_parse( - name = "devtools_deps", - requirements = "//:requirements-dev.txt", -) - -load("@devtools_deps//:requirements.bzl", "install_deps") - -install_deps() diff --git a/toolchains/legacy/WORKSPACE.win.release.tmpl b/toolchains/legacy/WORKSPACE.win.release.tmpl deleted file mode 100644 index dfab56aad4..0000000000 --- a/toolchains/legacy/WORKSPACE.win.release.tmpl +++ /dev/null @@ -1,83 +0,0 @@ -workspace(name = "Torch-TensorRT") - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -http_archive( - name = "rules_python", - sha256 = "863ba0fa944319f7e3d695711427d9ad80ba92c6edd0b7c7443b84e904689539", - strip_prefix = "rules_python-0.22.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.22.0/rules_python-0.22.0.tar.gz", -) - -load("@rules_python//python:repositories.bzl", "py_repositories") - -py_repositories() - -http_archive( - name = "rules_pkg", - sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - "https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - ], -) - -load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") - -rules_pkg_dependencies() - -http_archive( - name = "googletest", - sha256 = "755f9a39bc7205f5a0c428e920ddad092c33c8a1b46997def3f1d4a82aded6e1", - strip_prefix = "googletest-5ab508a01f9eb089207ee87fd547d290da39d015", - urls = ["https://github.com/google/googletest/archive/5ab508a01f9eb089207ee87fd547d290da39d015.zip"], -) - -# External dependency for torch_tensorrt if you already have precompiled binaries. -local_repository( - name = "torch_tensorrt", - path = "/opt/conda/lib/python3.8/site-packages/torch_tensorrt", -) - -# CUDA should be installed on the system locally -new_local_repository( - name = "cuda_win", - build_file = "@//third_party/cuda:BUILD", - path = "${CUDA_HOME}", -) - -############################################################################################################# -# Tarballs and fetched dependencies (default - use in cases when building from precompiled bin and tarballs) -############################################################################################################# - -http_archive( - name = "libtorch_win", - build_file = "@//third_party/libtorch:BUILD", - strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/${CHANNEL}/${CU_VERSION}/libtorch-win-shared-with-deps-latest.zip"], -) - -#################################################################################### -# Locally installed dependencies (use in cases of custom dependencies or aarch64) -#################################################################################### - -new_local_repository( - name = "tensorrt_win", - path = "C:/TensorRT-10.8.0.43", - build_file = "@//third_party/tensorrt/local:BUILD" -) - -######################################################################### -# Development Dependencies (optional - comment out on aarch64) -######################################################################### - -load("@rules_python//python:pip.bzl", "pip_parse") - -pip_parse( - name = "devtools_deps", - requirements = "//:requirements-dev.txt", -) - -load("@devtools_deps//:requirements.bzl", "install_deps") - -install_deps() diff --git a/toolchains/legacy/WORKSPACE.x86_64 b/toolchains/legacy/WORKSPACE.x86_64 deleted file mode 100644 index c8df299c8e..0000000000 --- a/toolchains/legacy/WORKSPACE.x86_64 +++ /dev/null @@ -1,93 +0,0 @@ -workspace(name = "Torch-TensorRT") - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -http_archive( - name = "rules_python", - sha256 = "863ba0fa944319f7e3d695711427d9ad80ba92c6edd0b7c7443b84e904689539", - strip_prefix = "rules_python-0.22.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.22.0/rules_python-0.22.0.tar.gz", -) - -load("@rules_python//python:repositories.bzl", "py_repositories") - -py_repositories() - -http_archive( - name = "rules_pkg", - sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - "https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - ], -) - -load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") - -rules_pkg_dependencies() - -http_archive( - name = "googletest", - sha256 = "755f9a39bc7205f5a0c428e920ddad092c33c8a1b46997def3f1d4a82aded6e1", - strip_prefix = "googletest-5ab508a01f9eb089207ee87fd547d290da39d015", - urls = ["https://github.com/google/googletest/archive/5ab508a01f9eb089207ee87fd547d290da39d015.zip"], -) - -# External dependency for torch_tensorrt if you already have precompiled binaries. -local_repository( - name = "torch_tensorrt", - path = "/opt/circleci/.pyenv/versions/3.10.9/lib/python3.10/site-packages/torch_tensorrt" -) - -# CUDA should be installed on the system locally -new_local_repository( - name = "cuda", - build_file = "@//third_party/cuda:BUILD", - path = "/usr/local/cuda-12.8/", -) - -new_local_repository( - name = "cublas", - build_file = "@//third_party/cublas:BUILD", - path = "/usr", -) - -#################################################################################### -# Locally installed dependencies (use in cases of custom dependencies or aarch64) -#################################################################################### - -# NOTE: In the case you are using just the pre-cxx11-abi path or just the cxx11 abi path -# with your local libtorch, just point deps at the same path to satisfy bazel. - -# NOTE: NVIDIA's aarch64 PyTorch (python) wheel file uses the CXX11 ABI unlike PyTorch's standard -# x86_64 python distribution. If using NVIDIA's version just point to the root of the package -# for both versions here and do not use --config=pre-cxx11-abi - -new_local_repository( - name = "libtorch", - path = "/opt/circleci/.pyenv/versions/3.10.9/lib/python3.10/site-packages/torch", - build_file = "third_party/libtorch/BUILD" -) - -new_local_repository( - name = "libtorch_pre_cxx11_abi", - path = "/opt/circleci/.pyenv/versions/3.10.9/lib/python3.10/site-packages/torch", - build_file = "third_party/libtorch/BUILD" -) - -new_local_repository( - name = "tensorrt", - path = "/usr/", - build_file = "@//third_party/tensorrt/local:BUILD" -) - -load("@rules_python//python:pip.bzl", "pip_parse") - -pip_parse( - name = "devtools_deps", - requirements = "//:requirements-dev.txt", -) - -load("@devtools_deps//:requirements.bzl", "install_deps") - -install_deps() diff --git a/toolchains/legacy/WORKSPACE.x86_64.cu118.release.rhel b/toolchains/legacy/WORKSPACE.x86_64.cu118.release.rhel deleted file mode 100644 index edeeb76ff7..0000000000 --- a/toolchains/legacy/WORKSPACE.x86_64.cu118.release.rhel +++ /dev/null @@ -1,97 +0,0 @@ -workspace(name = "Torch-TensorRT") - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -http_archive( - name = "rules_python", - sha256 = "863ba0fa944319f7e3d695711427d9ad80ba92c6edd0b7c7443b84e904689539", - strip_prefix = "rules_python-0.22.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.22.0/rules_python-0.22.0.tar.gz", -) - -load("@rules_python//python:repositories.bzl", "py_repositories") - -py_repositories() - -http_archive( - name = "rules_pkg", - sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - "https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - ], -) - -load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") - -rules_pkg_dependencies() - -http_archive( - name = "googletest", - sha256 = "755f9a39bc7205f5a0c428e920ddad092c33c8a1b46997def3f1d4a82aded6e1", - strip_prefix = "googletest-5ab508a01f9eb089207ee87fd547d290da39d015", - urls = ["https://github.com/google/googletest/archive/5ab508a01f9eb089207ee87fd547d290da39d015.zip"], -) - -# External dependency for torch_tensorrt if you already have precompiled binaries. -local_repository( - name = "torch_tensorrt", - path = "/opt/circleci/.pyenv/versions/3.10.9/lib/python3.10/site-packages/torch_tensorrt" -) - -# CUDA should be installed on the system locally -new_local_repository( - name = "cuda", - build_file = "@//third_party/cuda:BUILD", - path = "/usr/local/cuda-11.8", -) - -new_local_repository( - name = "cublas", - build_file = "@//third_party/cublas:BUILD", - path = "/usr", -) -############################################################################################################# -# Tarballs and fetched dependencies (default - use in cases when building from precompiled bin and tarballs) -############################################################################################################# - -http_archive( - name = "libtorch", - build_file = "@//third_party/libtorch:BUILD", - sha256 = "174579a7ee2a506d063714160c5fc57da428f7935311ef511c8f19820eb14c86", - strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/nightly/cu121/libtorch-cxx11-abi-shared-with-deps-2.1.0.dev20230731%2Bcu121.zip"], -) - -http_archive( - name = "libtorch_pre_cxx11_abi", - build_file = "@//third_party/libtorch:BUILD", - sha256 = "532217063c65354d5534211badadc9c370d889cb1c3fdb295c9b3d0f181bc0ba", - strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/nightly/cu121/libtorch-shared-with-deps-2.1.0.dev20230731%2Bcu121.zip"], -) - -#################################################################################### -# Locally installed dependencies (use in cases of custom dependencies or aarch64) -#################################################################################### - -new_local_repository( - name = "tensorrt", - path = "/usr/", - build_file = "@//third_party/tensorrt/local:BUILD" -) - -# ######################################################################### -# # Testing Dependencies (optional - comment out on aarch64) -# ######################################################################### - -load("@rules_python//python:pip.bzl", "pip_parse") - -pip_parse( - name = "devtools_deps", - requirements = "//:requirements-dev.txt", -) - -load("@devtools_deps//:requirements.bzl", "install_deps") - -install_deps() diff --git a/toolchains/legacy/WORKSPACE.x86_64.cu121.release.rhel b/toolchains/legacy/WORKSPACE.x86_64.cu121.release.rhel deleted file mode 100644 index 8b179084e9..0000000000 --- a/toolchains/legacy/WORKSPACE.x86_64.cu121.release.rhel +++ /dev/null @@ -1,97 +0,0 @@ -workspace(name = "Torch-TensorRT") - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -http_archive( - name = "rules_python", - sha256 = "863ba0fa944319f7e3d695711427d9ad80ba92c6edd0b7c7443b84e904689539", - strip_prefix = "rules_python-0.22.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.22.0/rules_python-0.22.0.tar.gz", -) - -load("@rules_python//python:repositories.bzl", "py_repositories") - -py_repositories() - -http_archive( - name = "rules_pkg", - sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - "https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - ], -) - -load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") - -rules_pkg_dependencies() - -http_archive( - name = "googletest", - sha256 = "755f9a39bc7205f5a0c428e920ddad092c33c8a1b46997def3f1d4a82aded6e1", - strip_prefix = "googletest-5ab508a01f9eb089207ee87fd547d290da39d015", - urls = ["https://github.com/google/googletest/archive/5ab508a01f9eb089207ee87fd547d290da39d015.zip"], -) - -# External dependency for torch_tensorrt if you already have precompiled binaries. -local_repository( - name = "torch_tensorrt", - path = "/opt/circleci/.pyenv/versions/3.10.9/lib/python3.10/site-packages/torch_tensorrt" -) - -# CUDA should be installed on the system locally -new_local_repository( - name = "cuda", - build_file = "@//third_party/cuda:BUILD", - path = "/usr/local/cuda-12.1", -) - -new_local_repository( - name = "cublas", - build_file = "@//third_party/cublas:BUILD", - path = "/usr", -) -############################################################################################################# -# Tarballs and fetched dependencies (default - use in cases when building from precompiled bin and tarballs) -############################################################################################################# - -http_archive( - name = "libtorch", - build_file = "@//third_party/libtorch:BUILD", - sha256 = "174579a7ee2a506d063714160c5fc57da428f7935311ef511c8f19820eb14c86", - strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/nightly/cu121/libtorch-cxx11-abi-shared-with-deps-2.1.0.dev20230731%2Bcu121.zip"], -) - -http_archive( - name = "libtorch_pre_cxx11_abi", - build_file = "@//third_party/libtorch:BUILD", - sha256 = "532217063c65354d5534211badadc9c370d889cb1c3fdb295c9b3d0f181bc0ba", - strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/nightly/cu121/libtorch-shared-with-deps-2.1.0.dev20230731%2Bcu121.zip"], -) - -#################################################################################### -# Locally installed dependencies (use in cases of custom dependencies or aarch64) -#################################################################################### - -new_local_repository( - name = "tensorrt", - path = "/usr/", - build_file = "@//third_party/tensorrt/local:BUILD" -) - -# ######################################################################### -# # Testing Dependencies (optional - comment out on aarch64) -# ######################################################################### - -load("@rules_python//python:pip.bzl", "pip_parse") - -pip_parse( - name = "devtools_deps", - requirements = "//:requirements-dev.txt", -) - -load("@devtools_deps//:requirements.bzl", "install_deps") - -install_deps() diff --git a/toolchains/legacy/WORKSPACE.x86_64.legacy b/toolchains/legacy/WORKSPACE.x86_64.legacy deleted file mode 100644 index 3825ee38e1..0000000000 --- a/toolchains/legacy/WORKSPACE.x86_64.legacy +++ /dev/null @@ -1,93 +0,0 @@ -workspace(name = "Torch-TensorRT") - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -http_archive( - name = "rules_python", - sha256 = "863ba0fa944319f7e3d695711427d9ad80ba92c6edd0b7c7443b84e904689539", - strip_prefix = "rules_python-0.22.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.22.0/rules_python-0.22.0.tar.gz", -) - -load("@rules_python//python:repositories.bzl", "py_repositories") - -py_repositories() - -http_archive( - name = "rules_pkg", - sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - "https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - ], -) - -load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") - -rules_pkg_dependencies() - -http_archive( - name = "googletest", - sha256 = "755f9a39bc7205f5a0c428e920ddad092c33c8a1b46997def3f1d4a82aded6e1", - strip_prefix = "googletest-5ab508a01f9eb089207ee87fd547d290da39d015", - urls = ["https://github.com/google/googletest/archive/5ab508a01f9eb089207ee87fd547d290da39d015.zip"], -) - -# External dependency for torch_tensorrt if you already have precompiled binaries. -local_repository( - name = "torch_tensorrt", - path = "/opt/circleci/.pyenv/versions/3.10.9/lib/python3.10/site-packages/torch_tensorrt" -) - -# CUDA should be installed on the system locally -new_local_repository( - name = "cuda", - build_file = "@//third_party/cuda:BUILD", - path = "/usr/local/cuda-11.8/", -) - -new_local_repository( - name = "cublas", - build_file = "@//third_party/cublas:BUILD", - path = "/usr", -) - -#################################################################################### -# Locally installed dependencies (use in cases of custom dependencies or aarch64) -#################################################################################### - -# NOTE: In the case you are using just the pre-cxx11-abi path or just the cxx11 abi path -# with your local libtorch, just point deps at the same path to satisfy bazel. - -# NOTE: NVIDIA's aarch64 PyTorch (python) wheel file uses the CXX11 ABI unlike PyTorch's standard -# x86_64 python distribution. If using NVIDIA's version just point to the root of the package -# for both versions here and do not use --config=pre-cxx11-abi - -new_local_repository( - name = "libtorch", - path = "/opt/circleci/.pyenv/versions/3.10.9/lib/python3.10/site-packages/torch", - build_file = "third_party/libtorch/BUILD" -) - -new_local_repository( - name = "libtorch_pre_cxx11_abi", - path = "/opt/circleci/.pyenv/versions/3.10.9/lib/python3.10/site-packages/torch", - build_file = "third_party/libtorch/BUILD" -) - -new_local_repository( - name = "tensorrt", - path = "/usr/", - build_file = "@//third_party/tensorrt/local:BUILD" -) - -load("@rules_python//python:pip.bzl", "pip_parse") - -pip_parse( - name = "devtools_deps", - requirements = "//:requirements-dev.txt", -) - -load("@devtools_deps//:requirements.bzl", "install_deps") - -install_deps() diff --git a/toolchains/legacy/WORKSPACE.x86_64.release.rhel.tmpl b/toolchains/legacy/WORKSPACE.x86_64.release.rhel.tmpl deleted file mode 100644 index e0a2974c3d..0000000000 --- a/toolchains/legacy/WORKSPACE.x86_64.release.rhel.tmpl +++ /dev/null @@ -1,93 +0,0 @@ -workspace(name = "Torch-TensorRT") - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -http_archive( - name = "rules_python", - sha256 = "863ba0fa944319f7e3d695711427d9ad80ba92c6edd0b7c7443b84e904689539", - strip_prefix = "rules_python-0.22.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.22.0/rules_python-0.22.0.tar.gz", -) - -load("@rules_python//python:repositories.bzl", "py_repositories") - -py_repositories() - -http_archive( - name = "rules_pkg", - sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8", - urls = [ - "https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - ], -) - -load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") - -rules_pkg_dependencies() - -http_archive( - name = "googletest", - sha256 = "755f9a39bc7205f5a0c428e920ddad092c33c8a1b46997def3f1d4a82aded6e1", - strip_prefix = "googletest-5ab508a01f9eb089207ee87fd547d290da39d015", - urls = ["https://github.com/google/googletest/archive/5ab508a01f9eb089207ee87fd547d290da39d015.zip"], -) - -# External dependency for torch_tensorrt if you already have precompiled binaries. -local_repository( - name = "torch_tensorrt", - path = "/opt/circleci/.pyenv/versions/3.10.9/lib/python3.10/site-packages/torch_tensorrt" -) - -# CUDA should be installed on the system locally -new_local_repository( - name = "cuda", - build_file = "@//third_party/cuda:BUILD", - path = "${CUDA_HOME}", -) - -new_local_repository( - name = "cublas", - build_file = "@//third_party/cublas:BUILD", - path = "/usr", -) -############################################################################################################# -# Tarballs and fetched dependencies (default - use in cases when building from precompiled bin and tarballs) -############################################################################################################# - -http_archive( - name = "libtorch", - build_file = "@//third_party/libtorch:BUILD", - strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/${CHANNEL}/${CU_VERSION}/libtorch-cxx11-abi-shared-with-deps-latest.zip"], -) - -http_archive( - name = "libtorch_pre_cxx11_abi", - build_file = "@//third_party/libtorch:BUILD", - strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/${CHANNEL}/${CU_VERSION}/libtorch-shared-with-deps-latest.zip"], -) - -http_archive( - name = "tensorrt", - build_file = "@//third_party/tensorrt/archive:BUILD", - strip_prefix = "TensorRT-10.8.0.43", - urls = [ - "https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.8.0/tars/TensorRT-10.8.0.43.Linux.x86_64-gnu.cuda-12.8.tar.gz", - ], -) - -# ######################################################################### -# # Testing Dependencies (optional - comment out on aarch64) -# ######################################################################### - -load("@rules_python//python:pip.bzl", "pip_parse") - -pip_parse( - name = "devtools_deps", - requirements = "//:requirements-dev.txt", -) - -load("@devtools_deps//:requirements.bzl", "install_deps") - -install_deps() diff --git a/toolchains/legacy/WORKSPACE.x86_64.release.ubuntu b/toolchains/legacy/WORKSPACE.x86_64.release.ubuntu deleted file mode 100644 index 2e953b5755..0000000000 --- a/toolchains/legacy/WORKSPACE.x86_64.release.ubuntu +++ /dev/null @@ -1,97 +0,0 @@ -workspace(name = "Torch-TensorRT") - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -http_archive( - name = "rules_python", - sha256 = "863ba0fa944319f7e3d695711427d9ad80ba92c6edd0b7c7443b84e904689539", - strip_prefix = "rules_python-0.22.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.22.0/rules_python-0.22.0.tar.gz", -) - -load("@rules_python//python:repositories.bzl", "py_repositories") - -py_repositories() - -http_archive( - name = "rules_pkg", - sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - "https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", - ], -) - -load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") - -rules_pkg_dependencies() - -http_archive( - name = "googletest", - sha256 = "755f9a39bc7205f5a0c428e920ddad092c33c8a1b46997def3f1d4a82aded6e1", - strip_prefix = "googletest-5ab508a01f9eb089207ee87fd547d290da39d015", - urls = ["https://github.com/google/googletest/archive/5ab508a01f9eb089207ee87fd547d290da39d015.zip"], -) shallow_since = "1570114335 -0400", - -# External dependency for torch_tensorrt if you already have precompiled binaries. -local_repository( - name = "torch_tensorrt", - path = "/opt/circleci/.pyenv/versions/3.10.9/lib/python3.10/site-packages/torch_tensorrt" -) - -# CUDA should be installed on the system locally -new_local_repository( - name = "cuda", - build_file = "@//third_party/cuda:BUILD", - path = "/usr/local/cuda-12.8", -) - -new_local_repository( - name = "cublas", - build_file = "@//third_party/cublas:BUILD", - path = "/usr", -) -############################################################################################################# -# Tarballs and fetched dependencies (default - use in cases when building from precompiled bin and tarballs) -############################################################################################################# - -http_archive( - name = "libtorch", - build_file = "@//third_party/libtorch:BUILD", - sha256 = "174579a7ee2a506d063714160c5fc57da428f7935311ef511c8f19820eb14c86", - strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/nightly/cu121/libtorch-cxx11-abi-shared-with-deps-2.1.0.dev20230731%2Bcu121.zip"], -) - -http_archive( - name = "libtorch_pre_cxx11_abi", - build_file = "@//third_party/libtorch:BUILD", - sha256 = "532217063c65354d5534211badadc9c370d889cb1c3fdb295c9b3d0f181bc0ba", - strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/nightly/cu121/libtorch-shared-with-deps-2.1.0.dev20230731%2Bcu121.zip"], -) - -#################################################################################### -# Locally installed dependencies (use in cases of custom dependencies or aarch64) -#################################################################################### - -new_local_repository( - name = "tensorrt", - path = "/usr/", - build_file = "@//third_party/tensorrt/local:BUILD" -) - -# ######################################################################### -# # Testing Dependencies (optional - comment out on aarch64) -# ######################################################################### - -load("@rules_python//python:pip.bzl", "pip_parse") - -pip_parse( - name = "devtools_deps", - requirements = "//:requirements-dev.txt", -) - -load("@devtools_deps//:requirements.bzl", "install_deps") - -install_deps() diff --git a/toolchains/legacy/pyproject.toml b/toolchains/legacy/pyproject.toml deleted file mode 100644 index 90b2d4f2ec..0000000000 --- a/toolchains/legacy/pyproject.toml +++ /dev/null @@ -1,218 +0,0 @@ -[build-system] -requires = [ - "setuptools>=68.0.0", - "packaging>=23.1", - "wheel>=0.40.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>=1.13.0,<2.0", - "pybind11==2.6.2", - "numpy", -] -build-backend = "setuptools.build_meta" - -[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>=1.13.0,<2.0", - "tensorrt>=8.6,<8.7", - "packaging>=23", - "numpy", - "typing-extensions>=4.7.0", -] -dynamic = ["version"] - -[project.optional-dependencies] -torchvision = ["torchvision >=0.14.0,<0.15.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.setuptools] -package-dir = {"" = "py"} -include-package-data = false - -[tool.ruff] -# NOTE: Synchoronize the ignores with .flake8 -lint.ignore = [ - # these ignores are from flake8-bugbear; please fix! - "B007", "B008", "B017", - "B018", # Useless expression - "B019", "B020", - "B023", "B024", "B026", - "B028", # No explicit `stacklevel` keyword argument found - "B904", "B905", - "E402", - "C408", # C408 ignored because we like the dict keyword argument syntax - "E501", # E501 is not flexible enough, we're using B950 instead - "E721", - "E731", # Assign lambda expression - "E741", - "EXE001", - "F405", - "F821", - "F841", - # these ignores are from flake8-logging-format; please fix! - "G101", "G201", "G202", "G003", "G004", - # these ignores are from RUFF perf; please fix! - "PERF203", "PERF4", - "SIM102", "SIM103", "SIM112", # flake8-simplify code styles - "SIM105", # these ignores are from flake8-simplify. please fix or ignore with commented reason - "SIM108", - "SIM110", - "SIM114", # Combine `if` branches using logical `or` operator - "SIM115", - "SIM116", # Disable Use a dictionary instead of consecutive `if` statements - "SIM117", - "SIM118", -] -#line-length = 120 -lint.select = [ - "B", - "C4", - "G", - "E", - "F", - "SIM1", - "W", - # Not included in flake8 - "PERF", - "PLE", - "TRY302", -] - -# Allow unused variables when underscore-prefixed. -lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" -target-version = "py311" - -# Allow autofix for all enabled rules (when `--fix`) is provided. -lint.fixable = [ - "A","B","C","D","E","F","G", - "I","N","Q","S","T","W", - "ANN", "ARG", "BLE", "COM", "DJ", - "DTZ", "EM", "ERA", "EXE", "FBT", - "ICN", "INP", "ISC", "NPY", "PD", - "PGH", "PIE", "PL", "PT", "PTH", - "PYI", "RET", "RSE", "RUF", "SIM", - "SLF", "TCH", "TID", "TRY", "UP", "YTT"] -lint.unfixable = [] - -# Exclude a variety of commonly ignored directories. -lint.exclude = [ - ".bzr", - ".direnv", - ".eggs", - ".git", - ".git-rewrite", - ".hg", - ".mypy_cache", - ".nox", - ".pants.d", - ".pytype", - ".ruff_cache", - ".svn", - ".tox", - ".venv", - "__pypackages__", - "_build", - "buck-out", - "build", - "dist", - "node_modules", - "venv", - "env", - "py/torch_tensorrt/fx", - ".github", - "examples", - "tests", - "tools", - "docs", - "docsrc", - "tests", - "setup.py", - "noxfile.py", - "__init__.py" -] - -[tool.ruff.lint.mccabe] -# Unlike Flake8, default to a complexity level of 10. -max-complexity = 10 - -[tool.isort] -profile = "black" -py_version = 311 -skip = [ - "py/torch_tensorrt/fx", -] - -[tool.black] -#line-length = 120 -target-versions = ["py38", "py39", "py310", "py311", "py312"] -force-exclude = """ -elu_converter/setup.py -""" - -[tool.mypy] -strict = true -ignore_missing_imports = true -show_error_codes = true -disable_error_code = "attr-defined" -no_implicit_optional = true -exclude = [ - "^py/torch_tensorrt/fx", - "py/torch_tensorrt/fx", - "torch_tensorrt/fx", - "py/torch_tensorrt/_C.so", - "examples", - "docs", - "docsrc", - "tests", - "setup.py", - "noxfile.py" -] -python_version = "3.11" - -follow_imports = "skip" - -[[tool.mypy.overrides]] -module = "torch_tensorrt.dynamo.conversion.aten_converters" -disable_error_code = "arg-type" - -[[tool.mypy.overrides]] -module = "torch_tensorrt.dynamo.lowering._decompositions" -disallow_untyped_calls = false - -[[tool.mypy.overrides]] -module = "torch_tensorrt.fx.*" -ignore_errors = true -follow_imports = "skip"