Skip to content

Commit

Permalink
chore: trt 10 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
peri044 committed Mar 20, 2024
1 parent 6b86917 commit 8faf7ec
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion py/torch_tensorrt/dynamo/_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def convert_module_to_trt_engine(
import io

with io.BytesIO() as engine_bytes:
engine_bytes.write(interpreter_result.engine.serialize())
engine_bytes.write(interpreter_result.engine)
engine_bytearray = engine_bytes.getvalue()

return engine_bytearray
2 changes: 1 addition & 1 deletion py/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def run(

if version.parse(trt.__version__) >= version.parse("8.2"):
builder_config.profiling_verbosity = (
trt.ProfilingVerbosity.VERBOSE
trt.ProfilingVerbosity.DETAILED
if self.compilation_settings.debug
else trt.ProfilingVerbosity.LAYER_NAMES_ONLY
)
Expand Down
11 changes: 0 additions & 11 deletions py/torch_tensorrt/dynamo/conversion/impl/elementwise/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,6 @@ def convert_binary_elementwise(
ctx, rhs_val, trt_promoted_type, name, target, source_ir
)

# Check the limitation in the doc string.
if ctx.net.has_implicit_batch_dimension:
if is_lhs_trt_tensor and not is_rhs_trt_tensor:
assert len(lhs_val.shape) >= len(
rhs_val.shape
), f"{lhs_val.shape} >= {rhs_val.shape}"
elif not is_lhs_trt_tensor and is_rhs_trt_tensor:
assert len(rhs_val.shape) >= len(
lhs_val.shape
), f"{rhs_val.shape} >= {lhs_val.shape}"

lhs_val, rhs_val = broadcast(
ctx.net, lhs_val, rhs_val, f"{name}_lhs", f"{name}_rhs"
)
Expand Down

0 comments on commit 8faf7ec

Please sign in to comment.