Add Ruff Linter run to generated bindings#108
Closed
isVoid wants to merge 3 commits intoNVIDIA:mainfrom
Closed
Conversation
Merged
isVoid
added a commit
that referenced
this pull request
May 5, 2025
- The linkable code object that contains the shim functions are added to `active_linking_library` in python. - Streamed Shim Function Writes. The shim functions are written to a string stream at lowering time using a special class named `KeyedStringIO` that prevents double write of the same shim function. - Ruff formatting generated code (with import sort): #108 - Generation metadata added to binding: #116 - Allow user to specify entry point and retain file list in config file using relative path d1e7aa2 - Allow user to add additional imports via `Additional Import` config item 8f7bd22 - Allow user to override the include line in shim function via `Shim Include Override` config item 8f7bd22 - Allow user to specify whether to include check in the binding to assert existence of pynvjitlink [bad0c69](bad0c69) - Allow user to specify a custom macro, which dictates both how clangTooling parses the header file, as well as how the shim function is compiled with NVRTC. [0f0ee9c](0f0ee9c) [ORIGINAL] This PR supercedes #102, which hand picked the parts where only lowering modifications are involved. In essence, this PR uses a new attribute in Numba-cuda target context named `_external_linkage`. By inserting the correct external linkables in the context, this PR hides the shim function usage to user, therefore eliminating the need for `c_ext_shim_func` variable. Additionally, since each shim function is isolated into the sub scope inside each function lowering, the monolithic shim function block no longer exists. This should presumably speedup compilation due to reduced IO burden on the size of the shim function being parsed by the RTC. ~~depends on NVIDIA/numba-cuda#165 Jointly in work with NVIDIA/numba-cuda#166 Includes changes from #116, #108 --------- Co-authored-by: isVoid <isVoid@users.noreply.github.com> Co-authored-by: Yevhenii Havrylko <yhavrylko@nvidia.com>
Collaborator
Author
|
Handled by #106 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.