-
Notifications
You must be signed in to change notification settings - Fork 13k
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
nvptx "ptx-kernel" ABI (feature: abi_ptx) uses PassMode::Direct for Aggregates #117271
Comments
@rustbot label +O-NVPTX |
This comment is an important part of that argument as well. |
Would it be possible to use rust/compiler/rustc_codegen_llvm/src/type_of.rs Lines 15 to 140 in 3d1dba8
PassMode::Direct arguments are passed currently)
|
@kjetilkjeka @RDambrosio016 do you think the above is feasible? Is there any documentation about what kinds of types |
Sorry! The first message slipped my mind before I had a chance to sit down and understand it.
I have heard that it's possible to achieve the same thing with
I think the interop guidelines is a good place to start.
Primitive types, vectors and structs should cover it for now. I suspect there's some "problematic" cases of depending on the slice repr. I originally made it pass slices as two seperate argument in an attempt of being compatible with In the future I believe we want to provide some support for using enums, tuples, etc when calling Rust kernels from Rust host code using the same compiler. That will require design work and RFCs and is neither possible (due to building on more basic features) or a priority right now. |
Yes
Verifying that my PR is correct is enough for now. |
It produces seemingly correct behavior. However, it needs to be switched over to a less fragile ABI handling (rust-lang/compiler-team#672) before stabilization may happen.
@RalfJung's comment explains the problem and why it is considered harmless enough to allow this exception until a better solution is found.
The text was updated successfully, but these errors were encountered: