Repository navigation
feat: Introduce StridedLayout, support wrapping external allocations in Buffer, add StridedMemoryView.from_buffer #1283
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
Changes from 1 commit
85d4a3a
23b35fe
2470617
cf7eff5
79010b8
4ca3567
acdd6f8
60a0d66
1fa43d4
67c6c5e
a96bec5
91387b0
91c0af9
b74ef2c
2c0343f
598a2f1
bbb227b
26dfe3b
3adae5c
7554164
68b7a79
edace66
9f86322
4335b2e
6568e27
cbf1d17
4767fbb
5765a22
7ec8961
db75aa0
639ee5f
9fb5dfb
3375b4d
66fc6e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: Kamil Tokarski <[email protected]>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,7 @@ from typing import TypeVar, Union | |
|
|
||
| from cuda.core.experimental._dlpack import DLDeviceType, make_py_capsule | ||
| from cuda.core.experimental._utils.cuda_utils import driver | ||
| from cuda.core.experimental._device import Device | ||
|
|
||
| __all__ = ['Buffer', 'MemoryResource'] | ||
|
|
||
|
|
@@ -377,7 +378,6 @@ cdef inline int _query_memory_attrs(unsigned int& memory_type, int & is_managed, | |
| if ret == cydriver.CUresult.CUDA_ERROR_NOT_INITIALIZED: | ||
| with cython.gil: | ||
| # Device class handles the cuInit call internally | ||
| from cuda.core.experimental import Device | ||
| Device() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we call
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Device has a lock around the cuInit call, so I wanted to stick to that single section handling the call. I guess calling cuInit more than once wouldn't hurt us either. Or I could move that part from
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my 2c is let's keep this for now, I don't have clever thoughts here 😅 |
||
| ret = cydriver.cuPointerGetAttributes(3, attrs, <void**>vals, ptr) | ||
| HANDLE_RETURN(ret) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.