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


##########
qdp/qdp-core/src/gpu/encodings/angle.rs:
##########
@@ -231,3 +245,69 @@ impl QuantumEncoder for AngleEncoder {
         "Angle encoding: per-qubit rotations into a product state"
     }
 }
+
+impl AngleEncoder {

Review Comment:
   Missing explicit tests for the new async angle path and alignment behavior.
   Plz add one.



##########
qdp/qdp-core/src/gpu/encodings/angle.rs:
##########
@@ -152,6 +154,18 @@ impl QuantumEncoder for AngleEncoder {
 
         let state_len = 1 << num_qubits;
 
+        const ASYNC_THRESHOLD_ELEMENTS: usize = 1024 * 1024 / 
std::mem::size_of::<f64>(); // 1MB

Review Comment:
   The async threshold is a fixed 1MB now. Maybe we  consider making it 
configurable or scaling by sample_size/state_len to avoid switching to async 
for batches that are still too small to amortize transfer overhead.



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