-
Notifications
You must be signed in to change notification settings - Fork 14k
automate gpu offloading - part 1 #149170
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
base: main
Are you sure you want to change the base?
automate gpu offloading - part 1 #149170
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2a3a561 to
80e8fce
Compare
|
|
|
The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes. |
This comment has been minimized.
This comment has been minimized.
95a0037 to
519499d
Compare
519499d to
88ca3bc
Compare
| OS1.flush(); | ||
| auto MB = llvm::MemoryBuffer::getMemBufferCopy(Storage, "module.bc"); | ||
|
|
||
| SmallVector<char, 1024> BinaryData; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This buffer could be an argument provided by rustc and then rustc can do the file writing
Automates step 1 from the rustc-dev-guide offload section:
https://rustc-dev-guide.rust-lang.org/offload/usage.html#compile-instructions
"clang-offload-packager" "-o" "host.out" "--image=file=device.bc,triple=amdgcn-amd-amdhsa,arch=gfx90a,kind=openmp"Verified on an MI 250X
cc @jhuber6, @kevinsala, @jdoerfert, @Sa4dUs
r? oli-obk