Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more descriptive error message to torch_ods_gen.py. (#3108)
Added error message when adding new torch op to [torch_ods_gen.py](https://github.com/llvm/torch-mlir/compare/main...IanWood1:torch-mlir:ods_gen_error_message?expand=1#diff-889b60b904ed67a5065a14e8de6fc89e00e199577e4d2bfa134ac4d1c89832d2). New message displays which op key is failing and possible matches in the torch `Registry`. ```Op does not match any Torch ops in 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.
- Loading branch information