Skip to content
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

Refactoring kernel code into .cu/.c files #375

Open
jakirkham opened this issue Aug 2, 2022 · 1 comment
Open

Refactoring kernel code into .cu/.c files #375

jakirkham opened this issue Aug 2, 2022 · 1 comment
Labels
improvement Improves an existing functionality

Comments

@jakirkham
Copy link
Member

In a few cases, we have needed to include kernel code in strings in Python. It would be good to start refactoring this out into separate .cu/.c files that we load instead. This has the benefit that .cu/.c files are more familiar to developers and various tooling (linters/compilers/etc.). Also it can potentially be used in C/C++ code directly. Making this change could help with general maintainability & usability of the codebase going forward.

Originally posted by @jakirkham in #317 (comment)

@jakirkham
Copy link
Member Author

jakirkham commented Nov 30, 2022

As one example of this kind of change, please see commit ( 2608b2e ). There are some other CUDA or C/C++ codes in Python strs. It would likely be simple to refactor these out into .cu or .c/.cpp.

A separate, but related question would be how we would like to use these on the C++ side.

Edit: Here are a few more examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improves an existing functionality
Projects
Status: No status
Development

No branches or pull requests

1 participant