Skip to content

[AutoTVM][Autoscheduler] Default build funcs inherit PassContext - #11618

Closed
AndrewZhaoLuo wants to merge 1 commit into
mainfrom
aluo/build-funcs-inherit-passcontext
Closed

[AutoTVM][Autoscheduler] Default build funcs inherit PassContext#11618
AndrewZhaoLuo wants to merge 1 commit into
mainfrom
aluo/build-funcs-inherit-passcontext

Conversation

@AndrewZhaoLuo

@AndrewZhaoLuo AndrewZhaoLuo commented Jun 7, 2022

Copy link
Copy Markdown
Contributor

These funcs used building during the tuning process now inherit PassContext so we can inject things like pass instrumentation into the build process during tuning.

Note, due to the fact subprocesses are used for building by default, we can't naively do something like

with PassContext(...):
   tune()

since new processes will not inherit the parents context.

But what does allow us to do is wrap the existing build functions with new PassContexts and call those instead making it a little more extensible.

@areusch

areusch commented Jun 7, 2022

Copy link
Copy Markdown
Contributor

should we do something like assert if the PassContext changes between Tuner construction and calling tune()? would help reduce the confusion, i think.

@AndrewZhaoLuo

AndrewZhaoLuo commented Jun 8, 2022

Copy link
Copy Markdown
Contributor Author

Hmm, I don't think that would be super helpful since the issue comes from the fact that during tuning, the PassContext is ignored by the children processes which actually build stuff during tuning. So even if it does change, it doesn't really matter imo

I guess we can make it so PassContext is inherited instead, which I guess I'll take a look, it will make things even more transparent.

@AndrewZhaoLuo
AndrewZhaoLuo deleted the aluo/build-funcs-inherit-passcontext branch June 8, 2022 20:59
@AndrewZhaoLuo

Copy link
Copy Markdown
Contributor Author

Just noticed I accidently opened this on main repo instead of my own fork, moved to #11632

@AndrewZhaoLuo
AndrewZhaoLuo restored the aluo/build-funcs-inherit-passcontext branch June 9, 2022 16:27
@AndrewZhaoLuo
AndrewZhaoLuo deleted the aluo/build-funcs-inherit-passcontext branch June 9, 2022 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants