guan404ming commented on code in PR #706:
URL: https://github.com/apache/mahout/pull/706#discussion_r2610438353


##########
qdp/qdp-core/src/gpu/encodings/amplitude.rs:
##########
@@ -65,6 +69,7 @@ impl QuantumEncoder for AmplitudeEncoder {
             // For small data (< 1MB), use synchronous path to avoid stream 
overhead
             // For large data, use dual-stream async pipeline for maximum 
throughput
             const ASYNC_THRESHOLD: usize = 1024 * 1024 / 
std::mem::size_of::<f64>(); // 1MB threshold
+            const GPU_NORM_THRESHOLD: usize = 4096; // heuristic: amortize 
kernel launch

Review Comment:
   nit: maybe we could do more test to find the optimized one in the future.



##########
qdp/qdp-core/src/gpu/encodings/amplitude.rs:
##########
@@ -65,6 +69,7 @@ impl QuantumEncoder for AmplitudeEncoder {
             // For small data (< 1MB), use synchronous path to avoid stream 
overhead
             // For large data, use dual-stream async pipeline for maximum 
throughput
             const ASYNC_THRESHOLD: usize = 1024 * 1024 / 
std::mem::size_of::<f64>(); // 1MB threshold
+            const GPU_NORM_THRESHOLD: usize = 4096; // heuristic: amortize 
kernel launch

Review Comment:
   Or even more dynamically determine this one.



-- 
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