Skip to content

Conversation

@isVoid
Copy link
Collaborator

@isVoid isVoid commented Nov 20, 2025

This is an integrated improvement branch that implements gaps needed for Numba-CUDA FP8 Binding Generation. I'll cherry-pick out the individual features and submit them in separate PRs.

isVoid added a commit that referenced this pull request Dec 2, 2025
This is a sub-issue from #247 . Previously we have prefix removal
feature for standalone functions. This PR expands the feature to Struct
and Enums. Assuming a prefix named `_prefix_` is to be removed, a struct
named `_prefix_Foo` is named `Foo` in python. A enum defined below:

```c++
enum _prefix_Fruit {
     _prefix_Apple,
     _prefix_Banana
};
```

will be exported as:

```Python
Fruit(IntEnum):
    Apple = 0
    Banana = 1
```
in python. This is to say that the prefix removal is applicable to both
enum name as well as the members.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Configurable prefix removal for enums, structs, and functions so
exported Python names omit configured prefixes.
* Enum symbol list is now exposed in module exports for easier
discovery.

* **Refactor**
* Centralized prefix-removal and unified Python-facing name handling
across binding generation and symbol registration.
  * Rendering internals now propagate Python-visible names consistently.

* **Tests**
* Added/updated tests to verify prefix removal and symbol exposure;
tests invoke kernels directly and reset renderer/function caches.

* **Documentation**
  * Clarified enum registration docstring.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Michael Wang <[email protected]>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant