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 more descriptive error message to torch_ods_gen.py. #3108

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

IanWood1
Copy link
Contributor

@IanWood1 IanWood1 commented Apr 4, 2024

Added error message when adding new torch op to torch_ods_gen.py.

New message displays which op key is failing and possible matches in the torch Registry.

Given op: 
    "aten::hardtanh_wrong : (Tensor, Scalar) -> (Tensor)" 
Possible matches: 
    "aten::hardshrink : (Tensor, Scalar) -> (Tensor)" 
    "aten::hardtanh_ : (Tensor, Scalar, Scalar) -> (Tensor)" 
    "aten::hardtanh : (Tensor, Scalar, Scalar) -> (Tensor)"
    "aten::clamp_min : (Tensor, Scalar) -> (Tensor)" 
    "aten::linalg_cond : (Tensor, Scalar?) -> (Tensor)"```



Also, ran black formatting on file. Based on LLVM style guides this seems to be correct, but I can revert the formatting if needed.

@IanWood1
Copy link
Contributor Author

IanWood1 commented Apr 4, 2024

Removed formatting.

@renxida renxida self-requested a review April 5, 2024 17:47
Copy link
Collaborator

@renxida renxida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an awesome catch. always love err msg improvements.

@renxida renxida merged commit 8ff2852 into llvm:main Apr 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants