Skip to content

Commit 19624b3

Browse files
committed
fix: Input stream number
1 parent 62e7b82 commit 19624b3

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

WORKSPACE

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ http_archive(
101101
],
102102
)
103103

104-
105-
106104
####################################################################################
107105
# Locally installed dependencies (use in cases of custom dependencies or aarch64)
108106
####################################################################################

py/torch_tensorrt/dynamo/runtime/_PythonTorchTensorRTModule.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,8 @@ def forward(self, *inputs: torch.Tensor) -> torch.Tensor | Tuple[torch.Tensor, .
218218
if cudagraphs_enabled:
219219
# If cudagraphs is enabled, this memory is reserved for future cudagraph runs
220220
# Clone is required to avoid re-using user-provided GPU memory
221-
contiguous_inputs = [
222-
i.contiguous().clone() for i in contiguous_inputs
223-
]
224-
else:
225-
contiguous_inputs = [i.contiguous() for i in contiguous_inputs]
221+
contiguous_inputs = [i.clone() for i in contiguous_inputs]
222+
226223
bindings = []
227224
for i, input_name in enumerate(self.input_names):
228225
if not contiguous_inputs[i].is_cuda:
@@ -317,7 +314,7 @@ def forward(self, *inputs: torch.Tensor) -> torch.Tensor | Tuple[torch.Tensor, .
317314
):
318315

319316
if not cudagraphs_enabled:
320-
self.context.execute_async_v3(self.active_stream)
317+
self.context.execute_async_v3(self.active_stream.cuda_stream) # type: ignore
321318

322319
elif need_cudagraphs_record:
323320
self.input_buffers = list(contiguous_inputs)

0 commit comments

Comments
 (0)