Uh oh!
There was an error while loading. Please reload this page.
ENH: Add support instantiating ObjectCode with path-like instances - #2123
Conversation
acosmicflamingo
commented
May 21, 2026
This could also be the updated documentation for the change: diff --git a/cuda_core/cuda/core/_module.pyx b/cuda_core/cuda/core/_module.pyx
index ea334aae07..b5b0b441aa 100644
--- a/cuda_core/cuda/core/_module.pyx+++ b/cuda_core/cuda/core/_module.pyx@@ -628,9 +628,10 @@ cdef class ObjectCode:
Parameters
----------
- module : Union[bytes, str]- Either a bytes object containing the in-memory cubin to load, or- a file path string pointing to the on-disk cubin to load.+ module : Union[bytes, str, os.PathLike]+ Either a bytes object containing the in-memory cubin to load,+ the file path pointing to the on-disk cubin to load,+ or the string representation of the file path
name : Optional[str]
A human-readable identifier representing this code object.
symbol_mapping : Optional[dict] |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
kkraus14
commented
May 22, 2026
/ok to test 837e70c |
acosmicflamingo
commented
May 22, 2026
Whoops, I expect tests to fail because |
acosmicflamingo
commented
May 22, 2026
/ok to test 6ed4a7f |
kkraus14
commented
May 22, 2026
/ok to test 6ed4a7f |
kkraus14
commented
May 22, 2026
We require maintainers to trigger CI 😄 |
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
kkraus14
commented
May 23, 2026
Thanks for the contribution @acosmicflamingo! |
This comment has been minimized.
This comment has been minimized.
acosmicflamingo
commented
May 23, 2026
Woohoo! Glad I could help out 😄 |
This comment has been minimized.
This comment has been minimized.
1 similar comment
|
Resolves#755
Before looking into addressing #663, I noticed @kkraus14 had pointed out missing pathlib-like support and figured I could give it a try it a go.
One improvement I could make to
_lazy_load_moduleis the ask-for-forgiveness approach to avoid checking module type twice. It would only require declaringpath_bytesbefore the try block: