Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions py/torch_tensorrt/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,22 @@ def check_cross_compile_trt_win_lib() -> bool:
return False


def is_tensorrt_rtx_version_supported(min_version: str) -> bool:
"""
Check if the installed TensorRT-RTX version supports the specified minimum version.
Args:
min_version (str): Minimum required TensorRT-RTX version
Returns:
bool: True if TensorRT-RTX version is >= min_version, False otherwise
"""
if trt._package_name != "tensorrt_rtx":
return True

from packaging.version import Version

return bool(Version(trt.__version__) >= Version(min_version))


def is_tensorrt_version_supported(min_version: str) -> bool:
"""
Check if the installed TensorRT version supports the specified minimum version.
Expand Down
6 changes: 6 additions & 0 deletions py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -4086,6 +4086,12 @@ def aten_ops_linear(
def scaled_dot_product_attention_validator(
node: Node, settings: Optional[CompilationSettings] = None
) -> bool:
attn_mask = args_bounds_check(node.args, 3, None)
is_causal = args_bounds_check(node.args, 5, False)
if is_causal and attn_mask is not None:
_LOGGER.debug("Explicit attn_mask should not be set when is_causal=True.")
return False

enable_gqa = node.kwargs.get("enable_gqa", False)

query_shape, key_shape, value_shape = None, None, None
Expand Down
Loading
Loading