You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/06/09 21:21:04 UTC

[GitHub] [tvm] AndrewZhaoLuo opened a new issue, #11656: [Bug] PassContext should be inherited in tuning

AndrewZhaoLuo opened a new issue, #11656:
URL: https://github.com/apache/tvm/issues/11656

   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 ](https://github.com/AndrewZhaoLuo/TVM-Sandbox/blob/3440b463b49b5a41d7fb2926017e72ab11a5787d/autoscheduler/pass_context_not_preserved.py#L117)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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] PassContext should be inherited in tuning [tvm]

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen closed issue #11656: [Bug] PassContext should be inherited in tuning 
URL: https://github.com/apache/tvm/issues/11656


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] PhilippvK commented on issue #11656: [Bug] PassContext should be inherited in tuning

Posted by "PhilippvK (via GitHub)" <gi...@apache.org>.
PhilippvK commented on issue #11656:
URL: https://github.com/apache/tvm/issues/11656#issuecomment-1479511245

   @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: https://github.com/apache/tvm/commit/f82ad67ce4c927cadeec23a9efe11398b35bfcc3), 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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] AndrewZhaoLuo commented on issue #11656: [Bug] PassContext should be inherited in tuning

Posted by "AndrewZhaoLuo (via GitHub)" <gi...@apache.org>.
AndrewZhaoLuo commented on issue #11656:
URL: https://github.com/apache/tvm/issues/11656#issuecomment-1481566883

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org