-
Notifications
You must be signed in to change notification settings - Fork 201
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
[BUG] Cython memory resource classes duplicate C++ class default parameters #497
Comments
I'll look into this, but it looks there will have to be some redundancy, as we have to expose the actual default values of these parameters to Python users (either in the documentation or in the function signature) |
You don't need to expose sentinel values like |
Yup - agreed that for the sentinel values like What should we do about concrete values like the default block size of |
Default values shouldn't be duplicated because they can always change without warning. Cython/Python are free to define their own default values that get passed explicitly to the C++ ctors. |
In this case, that's what we're doing. |
I think we should define constants for the C++ side defaults that can be queried and used on the Python side, just like I did for the sentinels. Then the Python API doesn't need to pick its own (potentially bad) values, and when we decide there are better values to use for the C++ side they will propagate. |
That sounds like a good idea to me 🙂 |
This issue has been marked rotten due to no recent activity in the past 90d. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. |
This issue has been marked stale due to no recent activity in the past 30d. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be marked rotten if there is no activity in the next 60d. |
I think with #661, this will also be closed out. |
Still relevant and being worked in #662 |
Fixed by #662 |
Describe the bug
RMM's Cython
MemoryResource
classes such asPoolMemoryResource
should not duplicate (and hard code) default constructor parameters that are also defined at a lower level in C++device_memory_resource
classes.These hard-coded values duplicate the C++:
This duplication means two places to make changes, and can lead to bugs.
The text was updated successfully, but these errors were encountered: