-
Notifications
You must be signed in to change notification settings - Fork 67
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
Improve config handling in cpp and python #644
base: branch-25.04
Are you sure you want to change the base?
Improve config handling in cpp and python #644
Conversation
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
b8146e0
to
f5652ea
Compare
/ok to test |
1 similar comment
/ok to test |
Forgot about cuFile's |
/ok to test |
/ok to test |
2 similar comments
/ok to test |
/ok to test |
# TODO: Wrap nicely, maybe as a dataclass? | ||
# <https://github.com/rapidsai/kvikio/issues/526> | ||
DriverProperties = cufile_driver.DriverProperties | ||
properties = cufile_driver.DriverProperties() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having an instance of DriverProperties()
would suffice. So now the settable properties in cufile driver can be set in the following ways:
kvikio.cuda_driver.properties.<prop> = <value>
kvikio.cuda_driver.set("<prop>", <value>) # Can also be used in a "with" statement
kvikio.cuda_driver.set({"<prop>": <value>}) # Can also be used in a "with" statement
Let me know if this looks good enough to you @madsbk
55e849c
to
33b133e
Compare
Closes #642
Closes #526
This PR allows the properties in
kvikio.defaults
andkvikio.cufile_driver
to be set in a friendly Pythonic way (C++ interface has also been changed). The expression below can appear standalone which sets the properties globally, or in awith
statement which sets the properties via a context manager.