You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support linking code for device functions in declaration (#124)
Allows specifying files to link in the `cuda.declare_device()` declaration, so that it's no longer required for the user to know which files to link.
Changes consist of:
- Adding the `link` kwarg to the `declare_device` function, and automatically linking in any linkable items when the declared function is used.
- Updating the documentation to describe this mechanism, and reflect that it's the recommended way to specify what to link.
- Documents the `LinkableCode` classes, which were previously undocumented.
- Removes some obsolete notices about needing the NVIDIA bindings for linking C/C++ code.
- Adds cffi to the test environment, as it's used by one of the new tests (it should have already been present, really).
I decided to not tackle #67 in its entirety, which also requests that a callback function can be used to generate the implementation, for a couple of reasons:
- I think the existing implementation is of immediate value for Numbast, and all other FFI-calling implementations.
- There is some thought needed about how to handle typing when a callback function is used - for example, whether it's necessary to generalize the typing beyond just the single signature that `declare_device()` presently accepts.
0 commit comments