-
Notifications
You must be signed in to change notification settings - Fork 7
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
Overview about existing solutions and approaches #2
Comments
Intrinsics wise, pretty much every framework uses |
I've develop rust-accel/nvptx crate to build/link/compile rust crate into a PTX asm based on a accel-nvptx toolchain with my rust fork in order to
But I found it is too large work to handle by myself 😰 |
Some details about current
|
I think it would be nice if both accel and ptx-builder could leverage Also, in the long term, I'd be happy if we somehow merge |
I totally agree. I'd like to offload build/link part of accel. My motivation to create rust-accel/nvptx is to link libcore into PTX crate for |
So what are the pro's and cons of resolving linking in rustc vs the ptx-linker approach ? What does wasm do here? |
Focusing on the linking issue, there are two point we need to consider
The lowering process (LLVM bitcode -> PTX using llc) will obey the choise. Link in LLVM bitcodePros
Cons
Link in PTXPros
Cons
|
@termoshtt How do you think PTX linking can be implemented? We somehow need to emit the assembly with Also, we can always implement "alternative linker" that has the same CLI but does the job with the help CUDA toolchain (lower input bitcode into the PTX assembly per crate and then link them). |
Yes, this is a large merit, and we should use it until rustc gets its functionality.
The problem of xargo-like approach is that rustc skips the actual link phase. We should fix rustc to link compiled PTX into single PTX (or cubin) using "alternative linker" which based on CUDA toolchain. Since rustc already depends on external linkers (ld and linker.exe) on the system, it is not a critical problem. I thinks ptx-linker can be an "alternative linker" with a little modification, and had started to hacking rustc rust-accel/rust#7 (but I got little progress :<) IMO, this linking issue is unavoidable for focusing on making nvptx as tier-2 target. |
Let's collect information about existing solutions, their architecture, and wear or strong sides. Hopefully, this will help get an overview about the current state and next steps that have to be taken to improve CUDA experience. Also, we will be able to define crucial components that can be shared between the different approaches.
I'm going to post here an overview of
ptx-linker
andptx-builder
approach in next days.The text was updated successfully, but these errors were encountered: