Skip to content

Commit 8faf7ec

Browse files
committed
chore: trt 10 fixes
1 parent 6b86917 commit 8faf7ec

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

py/torch_tensorrt/dynamo/_compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ def convert_module_to_trt_engine(
634634
import io
635635

636636
with io.BytesIO() as engine_bytes:
637-
engine_bytes.write(interpreter_result.engine.serialize())
637+
engine_bytes.write(interpreter_result.engine)
638638
engine_bytearray = engine_bytes.getvalue()
639639

640640
return engine_bytearray

py/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def run(
172172

173173
if version.parse(trt.__version__) >= version.parse("8.2"):
174174
builder_config.profiling_verbosity = (
175-
trt.ProfilingVerbosity.VERBOSE
175+
trt.ProfilingVerbosity.DETAILED
176176
if self.compilation_settings.debug
177177
else trt.ProfilingVerbosity.LAYER_NAMES_ONLY
178178
)

py/torch_tensorrt/dynamo/conversion/impl/elementwise/base.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,6 @@ def convert_binary_elementwise(
147147
ctx, rhs_val, trt_promoted_type, name, target, source_ir
148148
)
149149

150-
# Check the limitation in the doc string.
151-
if ctx.net.has_implicit_batch_dimension:
152-
if is_lhs_trt_tensor and not is_rhs_trt_tensor:
153-
assert len(lhs_val.shape) >= len(
154-
rhs_val.shape
155-
), f"{lhs_val.shape} >= {rhs_val.shape}"
156-
elif not is_lhs_trt_tensor and is_rhs_trt_tensor:
157-
assert len(rhs_val.shape) >= len(
158-
lhs_val.shape
159-
), f"{rhs_val.shape} >= {lhs_val.shape}"
160-
161150
lhs_val, rhs_val = broadcast(
162151
ctx.net, lhs_val, rhs_val, f"{name}_lhs", f"{name}_rhs"
163152
)

0 commit comments

Comments
 (0)