-
Notifications
You must be signed in to change notification settings - Fork 118
cuda pinned buffer pool #6058
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: develop
Are you sure you want to change the base?
cuda pinned buffer pool #6058
Conversation
Signed-off-by: Onur Satici <onur@spiraldb.com>
Signed-off-by: Onur Satici <onur@spiraldb.com>
Signed-off-by: Onur Satici <onur@spiraldb.com>
Signed-off-by: Onur Satici <onur@spiraldb.com>
Signed-off-by: Onur Satici <onur@spiraldb.com>
Signed-off-by: Onur Satici <onur@spiraldb.com>
| offset: usize, | ||
| len: usize, | ||
| stream: Arc<CudaStream>, | ||
| completion: Arc<CudaEvent>, |
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.
you shouldn't need an extra event to check for completion, read/write events are set on the cudaslice when submitted as part of a kernel launch.
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.
#[derive(Debug)]
pub struct CudaSlice<T> {
pub(crate) cu_device_ptr: sys::CUdeviceptr,
pub(crate) len: usize,
pub(crate) read: Option<CudaEvent>,
pub(crate) write: Option<CudaEvent>,
pub(crate) stream: Arc<CudaStream>,
pub(crate) marker: PhantomData<*const T>,
}
| fn hash<H: Hasher>(&self, state: &mut H) { | ||
| (&raw const self.cuda_slice).hash(state); | ||
| fn copy_to_host(&self) -> VortexResult<ByteBuffer> { | ||
| let mut host = ByteBufferMut::with_capacity_aligned(self.len, Alignment::of::<u8>()); |
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.
This might end up underaligned?
Signed-off-by: Onur Satici <onur@spiraldb.com>
Signed-off-by: Onur Satici <onur@spiraldb.com>
everything in this PR will probably change