You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps this is best described as feature request, regardless it is a little bit unintuitive.
For both autoscheduler and autotvm, POpenPool is used extensively in building and measuring. Unfortunately, these spawn new processes so some state is lost in translation.
Of particular note are PassContexts which can control how things are lowered and have instrumentation to grab useful information along the lowering process. This also makes it impossible to change the pass settings for tuning easily I believe.
Expected behavior
PassContext's should be respected for tuning. As we deal with processes, PassContexts and all their children need to be serialized. Documentation should also be improved to specify the behavior in these cases.
PassInstrumentation might be a little difficult to handle all use cases as these can be used to pass and modify state which might be difficult across process boundaries in an intuitive way.
Actual behavior
PassContext's configuration information is ignored for tuning.
Environment
This is a problem with TVM itself, the below script should do things.
Steps to reproduce
In this script we have simple pass instrumentation which prints out a bunch of '*' after a pass is called. During tuning nothing is printed because the instrument is ignored, during building the final module however it is applied.
The text was updated successfully, but these errors were encountered:
@AndrewZhaoLuo Thank you for raising that issue. I recently ran into the described problem that POpenPools do not properly propagate Pass contexts to the build functions running in the subprocesses.
While I am am aware of #11632, it does not seem to solve the issue when using the LocalRunner for AutoTVM and AutoScheduler. Is there any workaround that I am not aware of?
For AutoTVM I was able to just just pass the current pass context as an argument (see proof of concept: f82ad67), but I would imagine that this did only work because AutoTVM is solely based on Python. For AutoSchedule which heavily relies on C++ we would probably need to implement the serialization of the PassContext as described above.
@PhilippvK . It has been a while since I've dealt with autotvm / autoschedule but if there is an issue, i would encourage you to make a contribution. Not sure what the POpenPool issue is exactly but perhaps it is just a matter of properly piping things through system. If you give a short script with behavior different from you'd expect i would be glad to take a quick look.
For autoschedule being c++, the nice thing is the TVM object system does allow for easy interaction between python via some decorators (and also vice versa).
Perhaps this is best described as feature request, regardless it is a little bit unintuitive.
For both autoscheduler and autotvm, POpenPool is used extensively in building and measuring. Unfortunately, these spawn new processes so some state is lost in translation.
Of particular note are PassContexts which can control how things are lowered and have instrumentation to grab useful information along the lowering process. This also makes it impossible to change the pass settings for tuning easily I believe.
Expected behavior
PassContext's should be respected for tuning. As we deal with processes, PassContexts and all their children need to be serialized. Documentation should also be improved to specify the behavior in these cases.
PassInstrumentation might be a little difficult to handle all use cases as these can be used to pass and modify state which might be difficult across process boundaries in an intuitive way.
Actual behavior
PassContext's configuration information is ignored for tuning.
Environment
This is a problem with TVM itself, the below script should do things.
Steps to reproduce
In this script we have simple pass instrumentation which prints out a bunch of '*' after a pass is called. During tuning nothing is printed because the instrument is ignored, during building the final module however it is applied.
The text was updated successfully, but these errors were encountered: