-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add pass to annotate ops with on_device for non-BYOC heterogeneous #7428
Conversation
rkimball
commented
Feb 9, 2021
- Added pass AnnotateDevicePlacement which allows for per-Call op placement using on_device. This allows for heterogeneous execution of non-external compilers such as CPU and GPU.
- Added unit test for AnnotateDevicePlacement.
- Moved the on_device definition from an anonymous lambda to a c++ function so that it can be called directly from c++ instead of forcing the use of PackedFunction calls.
execution. Add unit test for pass.
Thanks for the PR. Regard to the current AnnotateTarget pass for BYOC, I have some questions/comments:
Also cc @zhiics |
I also have the same concern as @comaniac. Maybe we should slowly stop using the word "BYOC", it makes it sound "external". I think we can have a unified infra to dispatch IRModule --> runtime.Module compilation flows. I don't see an immediate concern why we cant use the current "BYOC" partitioning infra to generate the cpu, gpu targets as well. Love to hear thoughts on this and see the roadblocks of unifying these approaches. I guess that helps to have a unfied TargetRegistry as well. cc : @tqchen |
Thanks for the comments and input everyone, @zhiics any feedback on the annotation pass? Thanks! |
@comaniac and @manupa-arm to your questions
|
@rkimball Exactly. We should eliminate "external" and "internal" but just treat every target evenly. Meanwhile, the corresponding changes in compile engine have to be made to deal with built in targets, as you pointed out. While I still feel we should not have two mechanisms doing similar things, I'd suggest having an RFC to improve the BYOC flow so that it could be even more general. cc @zhiics |
This PR appears to be out of date, please feel free to reopen it if this is not the case. As part of the new year we are attempting to triage the project's open pull requests to ensure that code which Thanks again for your contribution, and feel free to reach out to discuss these changes. |