Skip to content

Commit 57385fc

Browse files
committed
dla check bugfix
1 parent 36656b6 commit 57385fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch2trt/torch2trt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def _configure_layer(self, layer):
372372
device_type = self._ctx.current_device_type()
373373
self._ctx.builder_config.set_device_type(layer, device_type)
374374
orig_device_type = device_type
375-
if not self._ctx.builder_config.can_run_on_DLA(layer) and device_type == trt.DeviceType.DLA:
375+
if device_type == trt.DeviceType.DLA and not self._ctx.builder_config.can_run_on_DLA(layer):
376376
if self._ctx.torch2trt_kwargs['gpu_fallback']:
377377
device_type = trt.DeviceType.GPU # layer will fall back to GPU
378378

0 commit comments

Comments
 (0)