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.
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.