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
Refactor compile_engine to introduce TETranslator #6888
Conversation
Change-Id: Icd500c7372f73dba592ac358911067b9faa3a304
Change-Id: I10c68fc8db95cc855cf6d95cf5c539e9cdf54feb
Change-Id: I94a5028bbe122543cc9f157b58245852ec675bb2
ed4cedc
to
8844fe0
Compare
Change-Id: I509a45767d3359bbc828294a9528ba7ca06ab5eb
Change-Id: Ibecb41267450b437ebd47b4b8c237e4b117be065
In this implementation we need to call lower twice, which I think would introduce unnecessary overheads to the
To achieve your goal, maybe we simply set In addition, the name "translate_to_te" is misleading to me. First, Relay and TE are not at the same IR level, so "lower" would be more proper than "translate". Second, if you prefer just provide an API to "lower a Relay function to a TE compute with an initial schedule" instead of "any possbile schedule (i.e., TOPI schedule or auto_scheduler shcedule)", then this API should be like |
I agree that just having a default schedule be produced is one such workaround (and it's actually the initial workaround I used). What I didn't like though was how much of a 'hack' it appeared. Doing a trick with the autoscheduler looks like another one of these hacks that will further decrease the readability of the compile_engine. I have been working on a more extensive refactor to split lower_call into a part that gets the compute and a part that gets the schedule. However, given you need to query OpImplementation for both cases this seems like a fairly arbitrary distinction to make. I agree that |
Also with the CI failure, it's failing in a CUDA test and I don't currently have access to a machine that can run it. I'll have a go at debugging it blind to begin with, but otherwise it may be a while before I can get access to the necessary hardware. |
This won't be too hacky to me, because what auto_scheduler needs is exactly a compute. We may just need to change
Understood. it's not straightforward to separate |
Given the existing two scheduling strategies (AutoTVM/Ansor) can't make particularly good use of this refactor, I'll close this for now and just make it a standalone pass for my use-case. |
This PR refactors the compile_engine to expose a Relay -> TE translator as a standalone component. See the RFC here.
TODO