File tree 2 files changed +4
-7
lines changed
2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 12
12
TRUNCATE_LONG_AND_DOUBLE = False
13
13
USE_PYTHON_RUNTIME = False
14
14
USE_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:
182
182
settings .device = to_torch_tensorrt_device (settings .device )
183
183
184
184
# 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 } . "
190
188
"If this is incorrect, please specify an input device, via the device keyword."
191
189
)
192
- settings .device = Device (gpu_id = default_torch_gpu_idx )
193
190
194
191
logger .debug (f"Compiling with Settings:\n { settings } " )
195
192
You can’t perform that action at this time.
0 commit comments