-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Relay] Strict mode in pattern matching #3620
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
Conversation
|
Very good addition, thanks for doing it |
|
Should the match completeness and the fatal stuff be the same PR, though? There are more issues where fatal is involved:
|
|
We'll do fatal next time |
|
Thanks for removing fatal, I think this is in a good state now. |
slyubomirsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A nitpick about the comments, but otherwise LGTM.
Co-Authored-By: Steven S. Lyubomirsky <[email protected]>
Co-Authored-By: Steven S. Lyubomirsky <[email protected]>
tmoreau89
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* add fatal lint lint lint do make completeness check an error lint remove fatal * fix test * reset parser file * remove unneeded import * Update python/tvm/relay/adt.py Co-Authored-By: Steven S. Lyubomirsky <[email protected]> * Update include/tvm/relay/adt.h Co-Authored-By: Steven S. Lyubomirsky <[email protected]> * Eliminate trailing whitespace (my fault)
* add fatal lint lint lint do make completeness check an error lint remove fatal * fix test * reset parser file * remove unneeded import * Update python/tvm/relay/adt.py Co-Authored-By: Steven S. Lyubomirsky <[email protected]> * Update include/tvm/relay/adt.h Co-Authored-By: Steven S. Lyubomirsky <[email protected]> * Eliminate trailing whitespace (my fault)
the strict mode require that all pattern is exhausted. by default it is on, so one had to explicitly turn it off for hd, tl, foldl1, etc. This stop all the warning generated by the exhaust matcher, and enforce better coding style as partial function will be more explicit.