File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 1212TRUNCATE_LONG_AND_DOUBLE = False
1313USE_PYTHON_RUNTIME = False
1414USE_FAST_PARTITIONER = True
15- DEVICE = Device . _current_device ( )
15+ DEVICE = Device ( gpu_id = torch . cuda . current_device () )
Original file line number Diff line number Diff line change @@ -182,14 +182,11 @@ def parse_dynamo_kwargs(kwargs: Any) -> CompilationSettings:
182182 settings .device = to_torch_tensorrt_device (settings .device )
183183
184184 # Check and update device settings
185- default_torch_gpu_idx = torch .cuda .default_stream ().device .index
186- if "device" not in kwargs and default_torch_gpu_idx != settings .device .gpu_id :
187- logger .warning (
188- f"No device specified, detected differing gpu IDs for CUDA default: { settings .device .gpu_id } "
189- f"and Torch default: { default_torch_gpu_idx } . Using Torch default gpu ID: { default_torch_gpu_idx } . "
185+ if "device" not in kwargs :
186+ logger .info (
187+ f"Device not specified, using Torch default current device - cuda:{ settings .device .gpu_id } . "
190188 "If this is incorrect, please specify an input device, via the device keyword."
191189 )
192- settings .device = Device (gpu_id = default_torch_gpu_idx )
193190
194191 logger .debug (f"Compiling with Settings:\n { settings } " )
195192
You can’t perform that action at this time.
0 commit comments