diff --git a/.circleci/config.yml b/.circleci/config.yml index 7e02b9cf3e..a2a200fcca 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -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" diff --git a/WORKSPACE b/WORKSPACE index f5551a1037..ff892bece4 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -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 diff --git a/core/BUILD b/core/BUILD index d802a8eff6..599a965733 100644 --- a/core/BUILD +++ b/core/BUILD @@ -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"], }), alwayslink = True, ) diff --git a/core/runtime/TRTEngine.cpp b/core/runtime/TRTEngine.cpp index a17bc38da3..d1d3280798 100644 --- a/core/runtime/TRTEngine.cpp +++ b/core/runtime/TRTEngine.cpp @@ -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); } diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 6b760728d8..0c0e5a43f0 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -24,7 +24,7 @@ target_sources(${lib_name} target_link_libraries(${lib_name} PUBLIC - torch + "${TORCH_LIBRARIES}" TensorRT::nvinfer core ) @@ -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 @@ -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 diff --git a/py/requirements.txt b/py/requirements.txt index 589d991e4a..576512e768 100644 --- a/py/requirements.txt +++ b/py/requirements.txt @@ -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 diff --git a/py/setup.py b/py/setup.py index 2b031f06e5..3dd54d9720 100644 --- a/py/setup.py +++ b/py/setup.py @@ -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={ diff --git a/py/torch_tensorrt/_TRTModuleNext.py b/py/torch_tensorrt/_TRTModuleNext.py index bc13e0d4de..ca77c5bd06 100644 --- a/py/torch_tensorrt/_TRTModuleNext.py +++ b/py/torch_tensorrt/_TRTModuleNext.py @@ -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] = [],