Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build #1479

Merged
merged 8 commits into from
Nov 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ commands:
- run:
name: Test torch
command: |
python3 -c "import torch; print(torch.cuda.is_available()); print(torch.cuda.device_count())"
python3 -c "import torch; print(torch.cuda.is_available()); print(torch.cuda.device_count()); print(torch.__version__)"

- run:
name: Get torch-tensorrt version information
Expand Down Expand Up @@ -946,7 +946,7 @@ parameters:
# Nightly platform config
torch-build:
type: string
default: "1.13.0.dev20220921+cu116"
default: "1.14.0.dev20221114+cu116"
torch-build-index:
type: string
default: "https://download.pytorch.org/whl/nightly/cu116"
Expand Down
8 changes: 4 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ new_local_repository(
http_archive(
name = "libtorch",
build_file = "@//third_party/libtorch:BUILD",
sha256 = "486106ddc5b5ad532f030f447940a571b924da821b9534d25c0cef5503cdfaea",
sha256 = "b565c662435fd58ec295fa0791388ea52ad0f5fd33517b2d7c0fdcc91b6db531",
strip_prefix = "libtorch",
urls = ["https://download.pytorch.org/libtorch/nightly/cu116/libtorch-cxx11-abi-shared-with-deps-1.13.0.dev20220921%2Bcu116.zip"],
urls = ["https://download.pytorch.org/libtorch/nightly/cu116/libtorch-cxx11-abi-shared-with-deps-1.14.0.dev20221114%2Bcu116.zip"],
)

http_archive(
name = "libtorch_pre_cxx11_abi",
build_file = "@//third_party/libtorch:BUILD",
sha256 = "b304ebf26effcbbefcec99134bcfb0127c499306343fbe2e2cd127213448a4a6",
sha256 = "fbb37446c33b05c1e26256c09f6ffb46cea1f6ff9ee2ad5b79b146d09023b0c1",
strip_prefix = "libtorch",
urls = ["https://download.pytorch.org/libtorch/nightly/cu116/libtorch-shared-with-deps-1.13.0.dev20220921%2Bcu116.zip"],
urls = ["https://download.pytorch.org/libtorch/nightly/cu116/libtorch-shared-with-deps-1.14.0.dev20221114%2Bcu116.zip"],
)

# Download these tarballs manually from the NVIDIA website
Expand Down
4 changes: 2 additions & 2 deletions core/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ cc_library(
"//core/util/logging",
"@tensorrt//:nvinfer",
] + select({
":use_pre_cxx11_abi": ["@libtorch_pre_cxx11_abi//:libtorch"],
"//conditions:default": ["@libtorch//:libtorch"],
":use_pre_cxx11_abi": ["@libtorch_pre_cxx11_abi//:libtorch", "@libtorch_pre_cxx11_abi//:c10_cuda"],
"//conditions:default": ["@libtorch//:libtorch", "@libtorch//:c10_cuda"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you forget to mention in the diagnosis that we also need to link with c10_cuda? :-)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't need that. But it doesn't hurt.

}),
alwayslink = True,
)
Expand Down
6 changes: 3 additions & 3 deletions core/runtime/TRTEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ TRTEngine::TRTEngine(
num_io = std::make_pair(inputs, outputs);
}

#ifndef NDEBUG
this->enable_profiling();
#endif
#ifndef NDEBUG
this->enable_profiling();
#endif
LOG_DEBUG(*this);
}

Expand Down
6 changes: 3 additions & 3 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ target_sources(${lib_name}

target_link_libraries(${lib_name}
PUBLIC
torch
"${TORCH_LIBRARIES}"
TensorRT::nvinfer
core
)
Expand Down Expand Up @@ -71,7 +71,7 @@ target_sources(${torchtrt_lib_name}
target_link_libraries(${torchtrt_lib_name}
PUBLIC
TensorRT::TensorRT
torch
"${TORCH_LIBRARIES}"
PRIVATE
torch_tensorrt
core
Expand Down Expand Up @@ -111,7 +111,7 @@ target_sources(${runtime_lib_name}
target_link_libraries(${runtime_lib_name}
PUBLIC
TensorRT::TensorRT
torch
"${TORCH_LIBRARIES}"
PRIVATE
core_runtime
core_plugins
Expand Down
2 changes: 1 addition & 1 deletion py/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
numpy
pybind11==2.6.2
--extra-index-url https://download.pytorch.org/whl/nightly/cu116
torch==1.13.0.dev20220921+cu116
torch==1.14.0.dev20221114+cu116
torchvision==0.14.0.dev20220921+cu116
--extra-index-url https://pypi.ngc.nvidia.com
nvidia-tensorrt==8.4.3.1
2 changes: 1 addition & 1 deletion py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def run(self):
long_description=long_description,
ext_modules=ext_modules,
install_requires=[
"torch>=1.13.0.dev0,<1.14.0",
"torch>=1.14.0.dev0",
],
setup_requires=[],
cmdclass={
Expand Down
2 changes: 1 addition & 1 deletion py/torch_tensorrt/_TRTModuleNext.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TRTModuleNext(torch.nn.Module):

def __init__(
self,
serialized_engine: bytearray,
serialized_engine: bytearray = bytearray(),
name: str = "",
input_binding_names: List[str] = [],
output_binding_names: List[str] = [],
Expand Down