You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "viiccwen (via GitHub)" <gi...@apache.org> on 2026/01/25 08:48:07 UTC

[I] [Bug] Misaligned double2 vector loads in batched L2norm kernel when the length of sample is odd [mahout]

viiccwen opened a new issue, #940:
URL: https://github.com/apache/mahout/issues/940

   ### Description
   
   The current batched L2 norm CUDA kernel performs vectorized loads starting from input_batch + base, where:
   
   https://github.com/apache/mahout/blob/d5fc18bd01bd4fbaa6c947252b142f38c9d8b720/qdp/qdp-kernels/src/amplitude.cu#L367C5-L367C49
   
   When sample_len is odd and sample_idx is also odd, base becomes odd, meaning input_batch + base is only 8-byte aligned. This violates the alignment requirements of vectorized loads: double2 requires 16-byte alignment.
   
   Although this does not cause incorrect results, it introduces avoidable performance penalties and makes the kernel’s memory access behavior architecture-dependent.
   
   reference: [comment](https://github.com/apache/mahout/pull/918#discussion_r2724245973)


-- 
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: dev-unsubscribe@mahout.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Misaligned double2 vector loads in batched L2norm kernel when the length of sample is odd [mahout]

Posted by "viiccwen (via GitHub)" <gi...@apache.org>.
viiccwen closed issue #940: [Bug] Misaligned double2 vector loads in batched L2norm kernel when the length of sample is odd
URL: https://github.com/apache/mahout/issues/940


-- 
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: issues-unsubscribe@mahout.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org