Skip to content

Commit

Permalink
moving the error output to validator
Browse files Browse the repository at this point in the history
  • Loading branch information
apbose committed Feb 26, 2024
1 parent 9b24cd6 commit 13a6f94
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions py/torch_tensorrt/dynamo/conversion/ops_evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ def aten_ops_randn(
def randperm_validator(randperm_node: Node) -> bool:
dtype = randperm_node.kwargs.get("dtype", None)
layout = randperm_node.kwargs.get("layout", None)
input = randperm_node.args[0]
if not isinstance(input, int):
_LOGGER.error(f"Input should be of type int.")
return False
if dtype is not None:
_LOGGER.debug(
f"Currently we don't support specifying output dtype, got {dtype}."
Expand Down

0 comments on commit 13a6f94

Please sign in to comment.