-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Relay] Mutual Recursion Support #5881
Conversation
Sorry I meant to review this a long time ago and just got sidetracked by lots of things. I'm currently working on refactoring the type inferencer to use the new diagnostics. I should have a branch out by next week, could you potentially rebase on top of that and land these tests? |
ada67f2
to
348573e
Compare
ready for review cc: @MarisaKirisame @jroesch @slyubomirsky @joshpoll @tqchen @wweic @weberlo |
I'll try to take a pass today |
Please rebase. |
6784694
to
4dc95fc
Compare
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.
please remove the change to type relation, and fix/remove the test.
Can we hold off on merging this until #6274 lands? This heavily changes the way the type inferencer works. |
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.
Let's put this on top of the new type inferencer changes in #6274
@hypercubestart sorry to put this on hold, but IMHO 6274 is an essential PR and we should focus on it with stronger priority. everything is good and we will merge this after 6274. |
@@ -87,6 +87,10 @@ def _add(self, var, val, update=False): | |||
var = _ty.GlobalTypeVar(var) | |||
_ffi_api.Module_AddDef(self, var, val, update) | |||
|
|||
def add_unchecked(self, var, val): |
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.
add a doc string
@@ -98,6 +98,8 @@ def InferType(): | |||
""" | |||
return _ffi_api.InferType() | |||
|
|||
def InferTypeAll(): |
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.
Add a doc string
src/relay/analysis/type_solver.h
Outdated
@@ -65,6 +65,9 @@ class TypeSolver { | |||
public: | |||
TypeSolver(const GlobalVar& current_func, const IRModule& _mod, ErrorReporter* err_reporter); | |||
~TypeSolver(); | |||
|
|||
void SetCurrentFunc(GlobalVar current_func) { this->current_func = current_func; } |
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.
add a comment
} | ||
|
||
void Solve(); | ||
Expr ResolveType(Expr expr); |
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.
add a comment.
Working on adding mutual recursion to as a relay pass.
cc for help and advice: @MarisaKirisame @jroesch