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

Better error message for illegal opcode #19

Open
seanmcl opened this issue Oct 9, 2024 · 0 comments
Open

Better error message for illegal opcode #19

seanmcl opened this issue Oct 9, 2024 · 0 comments

Comments

@seanmcl
Copy link
Contributor

seanmcl commented Oct 9, 2024

When we give sherloc an illegal op, we get error messages downstream that are not as helpful as they could be. For example,

Parsing error line 5, column 23 : expected op code but found "(%0,

for the StableHLO fragment

"stablehlo.doesnt_exist"(%0, %weights)

This could be something like "stablehlo.doesnt_exist" is not a known operator.

seanmcl added a commit to seanmcl/SHerLOC that referenced this issue Oct 9, 2024
Attempts to address leanprover#19
Currently reports the column of the closing quote of the operator.
Not amazing, but also not clear how to get the starting column.
Perhaps it's embedded in the hd of `state.trace` but I haven't
grokked the parser enough yet to know.

Definitely open to feedback on this one!
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

No branches or pull requests

1 participant