Skip to content
Merged
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
14 changes: 13 additions & 1 deletion py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,19 @@ def aten_ops_sigmoid(
)


@dynamo_tensorrt_converter(torch.ops.aten.index.Tensor)
def index_dtype_validator(node: Node) -> bool:
index = node.args[1]
for ind in index:
if ind is not None:
val = ind.meta.get("val")
if val is not None and val.dtype != torch.int32:
return False
return True


@dynamo_tensorrt_converter(
torch.ops.aten.index.Tensor, capability_validator=index_dtype_validator
)
@enforce_tensor_types(
{
0: (TRTTensor,),
Expand Down