-
Notifications
You must be signed in to change notification settings - Fork 162
Implement device and context properties for Event #618
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
base: main
Are you sure you want to change the base?
Conversation
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
/ok to test |
self._device_id = int(handle_return(driver.cuCtxGetDevice())) | ||
self._ctx_handle = handle_return(driver.cuStreamGetCtx(self._mnff.handle)) |
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.
Let's avoid driver calls if possible to reduce overhead. The same info can be passed in from within the two public constructors (I think!) Device.create_event
and Stream.record
.
cuda_core/tests/test_event.py
Outdated
def test_event_device(init_cuda): | ||
event = Device().create_event(options=EventOptions()) | ||
device = event.device | ||
assert isinstance(device, Device) |
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.
The docstring ...
Return the :obj:`~_device.Device` singleton associated with this event.
mentions "singleton". → Could this be
device = Device()
event = device.create_event(options=EventOptions())
assert event.device is device
?
/ok to test |
|
/ok to test |
Description
closes #491
Checklist