-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Require full compilation arg #3193
Conversation
@@ -107,6 +107,8 @@ def _pretraced_backend( | |||
torchtrt_inputs = prepare_inputs( | |||
torch_inputs, disable_memory_format_check=True | |||
) | |||
if settings.require_full_compilation: | |||
raise AssertionError("this argument is only applicable for ir=dynamo") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this isnt very clear since the backend will get called from torch.compile. You could instead throw a warning that requires_full_compilation
does nothing for the tensorrt backend for torch.compile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this to a warning. But should there be some additional logic to make this argument invalid for the backend = "torch_tensorrt" since it would still be passed to the same partitioning code, and error out in case of torch.compile if there is a graph break
a654911
to
191f20f
Compare
@@ -107,6 +107,10 @@ def _pretraced_backend( | |||
torchtrt_inputs = prepare_inputs( | |||
torch_inputs, disable_memory_format_check=True | |||
) | |||
if settings.require_full_compilation: | |||
logger.warning( | |||
"req_full_compilation arg is not applicable for torch.compile with backend='torch_tensorrt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the actual name of the argument require_full_compilation
add arg require_full_compilation
191f20f
to
e21852a
Compare
…2.5 (#3213) Co-authored-by: apbose <apbose694@gmail.com>
Addresses #3177