Skip to content

Commit 9c1569e

Browse files
committed
moving the error output to validator
1 parent ee09763 commit 9c1569e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

py/torch_tensorrt/dynamo/conversion/ops_evaluators.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ def aten_ops_randn(
106106
def randperm_validator(randperm_node: Node) -> bool:
107107
dtype = randperm_node.kwargs.get("dtype", None)
108108
layout = randperm_node.kwargs.get("layout", None)
109+
input = randperm_node.args[0]
110+
if not isinstance(input, int):
111+
_LOGGER.error(f"Input should be of type int.")
112+
return False
109113
if dtype is not None:
110114
_LOGGER.debug(
111115
f"Currently we don't support specifying output dtype, got {dtype}."

0 commit comments

Comments
 (0)