Skip to content

Commit 348d21a

Browse files
cherry pick #3193: add req_full_compilation_arg from main to release/2.5 (#3213)
Co-authored-by: apbose <[email protected]>
1 parent 2468a42 commit 348d21a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

py/torch_tensorrt/dynamo/_compiler.py

+2
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ def contains_metadata(gm: torch.fx.GraphModule) -> bool:
375375
verbose=settings.debug,
376376
min_block_size=settings.min_block_size,
377377
torch_executed_ops=settings.torch_executed_ops,
378+
require_full_compilation=settings.require_full_compilation,
378379
)
379380
except torch.fx.passes.splitter_base.FxNetSplitterInternalError:
380381
logger.error(
@@ -393,6 +394,7 @@ def contains_metadata(gm: torch.fx.GraphModule) -> bool:
393394
verbose=settings.debug,
394395
min_block_size=settings.min_block_size,
395396
torch_executed_ops=settings.torch_executed_ops,
397+
require_full_compilation=settings.require_full_compilation,
396398
)
397399

398400
dryrun_tracker.unsupported_ops = supported_ops.unsupported_operators

py/torch_tensorrt/dynamo/backend/backends.py

+4
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ def _pretraced_backend(
107107
torchtrt_inputs = prepare_inputs(
108108
torch_inputs, disable_memory_format_check=True
109109
)
110+
if settings.require_full_compilation:
111+
logger.warning(
112+
"require_full_compilation arg is not applicable for torch.compile with backend='torch_tensorrt"
113+
)
110114
trt_compiled = compile_module(
111115
gm,
112116
torchtrt_inputs,

0 commit comments

Comments
 (0)