-
Notifications
You must be signed in to change notification settings - Fork 365
add feature gate for tensorrt plugin #3518
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
base: main
Are you sure you want to change the base?
Conversation
import tensorrt.plugin as trtp | ||
|
||
assert trtp | ||
_TENSORRT_PLUGIN_AVAIL = True |
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.
Can we call this QDP_PLUGIN?
) | ||
|
||
|
||
def _enabled_features_str() -> str: | ||
enabled = lambda x: "ENABLED" if x else "DISABLED" | ||
out_str: str = f"Enabled Features:\n - Dynamo Frontend: {enabled(_DYNAMO_FE_AVAIL)}\n - Torch-TensorRT Runtime: {enabled(_TORCHTRT_RT_AVAIL)}\n - FX Frontend: {enabled(_FX_FE_AVAIL)}\n - TorchScript Frontend: {enabled(_TS_FE_AVAIL)}\n" # type: ignore[no-untyped-call] | ||
out_str: str = f"Enabled Features:\n - Dynamo Frontend: {enabled(_DYNAMO_FE_AVAIL)}\n - Torch-TensorRT Runtime: {enabled(_TORCHTRT_RT_AVAIL)}\n - FX Frontend: {enabled(_FX_FE_AVAIL)}\n - TorchScript Frontend: {enabled(_TS_FE_AVAIL)}\n - TensorRT Plugin: {enabled(_TENSORRT_PLUGIN_AVAIL)}\n" # type: ignore[no-untyped-call] |
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 refit got skipped, can we add that as well>
) | ||
else: | ||
|
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.
Instead of a giant if else, take a look at
@for_all_methods(needs_torch_tensorrt_runtime) |
TensorRT/py/torch_tensorrt/_features.py
Line 53 in c3ad86c
def needs_torch_tensorrt_runtime(f: Callable[..., Any]) -> Callable[..., Any]: |
supports_dynamic_shapes=supports_dynamic_shapes, | ||
requires_output_allocator=requires_output_allocator, | ||
assert trtp | ||
except ImportError as e: |
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.
Same here
+1 My environment jetpack 6.2 $ python3 -c "import torch_tensorrt" |
@shchoi00 yes this is support of Jetson as part of our build system overhaul |
Description
Tensorrt 10.3.0 does not support tensorrt plugin which causing failures.
Fixes # (issue)
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: