rich7420 commented on code in PR #751:
URL: https://github.com/apache/mahout/pull/751#discussion_r2646940770


##########
qdp/qdp-core/src/gpu/pipeline.rs:
##########
@@ -194,39 +216,40 @@ where
             e,
         ))?;
 
+        // Acquire pinned staging buffer and populate it with the current chunk
+        let mut pinned_buf = pinned_pool.acquire();
+        pinned_buf.as_slice_mut()[..chunk.len()].copy_from_slice(chunk);

Review Comment:
   maybe we could add a check here.
   like: `chunk.len() > CHUNK_SIZE_ELEMENTS`



##########
qdp/qdp-core/src/gpu/memory.rs:
##########
@@ -134,6 +136,78 @@ pub(crate) fn map_allocation_error(
     }
 }
 
+/// Page-locked host buffer used to enable true async DMA for H2D copies.
+#[cfg(target_os = "linux")]
+pub struct PinnedBuffer<'a, T> {

Review Comment:
   nits: It seems not been used in any other files.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to