]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
CUDA: fix misaligned shared memory read (#8123)
authorJohannes Gäßler <redacted>
Wed, 26 Jun 2024 06:28:02 +0000 (08:28 +0200)
committerGitHub <redacted>
Wed, 26 Jun 2024 06:28:02 +0000 (08:28 +0200)
ggml-cuda/mma.cuh

index 0301a52f9ea719ad651a9a9e2ebd1a6b5e4895fe..5d87dd8e64c0aa2147ca03dd070e60431fffa8cf 100644 (file)
@@ -23,7 +23,7 @@ struct mma_int_A_I16K4 {
 
     __device__ __forceinline__ void load(const int * __restrict__ xs0, const int & stride) {
 #if defined(INT8_MMA_AVAILABLE)
-        const int * xs = xs0 + (threadIdx.x%I)*stride + (threadIdx.x/I)*(K/2);
+        const int * xs = xs0 + (threadIdx.x%I)*stride;
         asm("ldmatrix.sync.aligned.m8n8.x2.b16 {%0, %1}, [%2];"
             : "+r"(x[0]), "+r"(x[1])
             : "l"(xs));