[go: nahoru, domu]

Skip to content
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

Add support for TensorRT 10 #68715

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft
Prev Previous commit
Change TRT to default to use_dynamic_shape=True
- use_dynamic_shape=False is not supported since TensorRT 10.0.
- Also expands the related error message.
  • Loading branch information
benbarsdell committed May 28, 2024
commit 699a77b12fc9b061b05534a87468bf44c7206e55
3 changes: 2 additions & 1 deletion tensorflow/compiler/tf2tensorrt/kernels/trt_engine_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,8 @@ StatusOr<std::pair<EngineContext*, int>> TRTEngineOp::GetEngine(
}
#else
return errors::Internal(
"Implicit batch is not supported since TensorRT 10.0");
"Implicit batch is not supported since TensorRT 10.0. Pass "
"use_dynamic_shape=True to TrtGraphConverterV2 to avoid this error.");
#endif
}

Expand Down
4 changes: 2 additions & 2 deletions tensorflow/python/compiler/tensorrt/trt_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ def __init__(self,
input_saved_model_signature_key: the key of the signature to optimize the
graph for.
use_dynamic_shape: whether to enable dynamic shape support. None is
equivalent to False in the current implementation.
equivalent to True in the current implementation.
dynamic_shape_profile_strategy: one of the strings in
supported_profile_strategies(). None is equivalent to Range in the
current implementation.
Expand Down Expand Up @@ -1284,7 +1284,7 @@ def __init__(self,
self._calibrated = False

if use_dynamic_shape is None:
self._use_dynamic_shape = False
self._use_dynamic_shape = True
else:
self._use_dynamic_shape = use_dynamic_shape

Expand Down
Loading