-
Notifications
You must be signed in to change notification settings - Fork 47
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
More advanced Rust binding examples #1621
Comments
Such examples don't exist currently. I do want to make some but it hasn't bubbled to the top of my list yet |
On a related note: |
That's correct, at this time only QFunctions written in C can be used via the Rust interface on the device (QFunctions created from the 'gallery'). QFunction source written in Rust can only be run by the CPU backends. The Julia wrapper can compile user QFunction code for CUDA backends but we haven't figured out something similar for Rust yet. |
Thanks - do I then understand correctly that it is possible to get full device acceleration with the Rust bindings if the QFunction is written in C, with everything else using the bindings? What would be the correct way to do this? I have similar questions about the practical limitations of the PETSc bindings, but those are probably better kept in a petsc-rs issue. |
So currently we don't have the ability to make a new QFunction in C from the Rust interface and pass it to the GPU backends, but that should be relatively straightforward to set up if you would like that. Only the current QFunctions available here can be used on the GPU from Rust: https://github.com/CEED/libCEED/tree/main/gallery https://docs.rs/libceed/latest/libceed/qfunction/struct.QFunctionByName.html Wrapping a libCEED operator in a MatShell in Rust is probably the other missing piece you need. I don't have an example of that due to getting lost with lifelines being tangled |
No worries. Thank you for all the information provided so far! |
It's incomplete but here's as far as I got with using the two Rust wrappers together |
Note to me - merging MatCEED upstream will help with those timelines I think |
Hi,
I'm wondering whether there are any more advanced examples or, even better, research codes using the Rust bindings outside of the libceed repository that go into more depth than just a mass or stiffness matrix. I'm especially looking for some example codes that use the libceed bindings, as well as petsc-rs (and possibly rsmpi) bindings, just showing how the different binding APIs of libceed and petsc-rs interact. Does anything like this exist?
Thanks!
The text was updated successfully, but these errors were encountered: