Explorar el Código

CUDA: fix misaligned shared memory read (#8123)

Johannes Gäßler hace 1 año
padre
commit
c8771ab5f8
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      ggml-cuda/mma.cuh

+ 1 - 1
ggml-cuda/mma.cuh

@@ -23,7 +23,7 @@ struct mma_int_A_I16K4 {
 
 
     __device__ __forceinline__ void load(const int * __restrict__ xs0, const int & stride) {
     __device__ __forceinline__ void load(const int * __restrict__ xs0, const int & stride) {
 #if defined(INT8_MMA_AVAILABLE)
 #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];"
         asm("ldmatrix.sync.aligned.m8n8.x2.b16 {%0, %1}, [%2];"
             : "+r"(x[0]), "+r"(x[1])
             : "+r"(x[0]), "+r"(x[1])
             : "l"(xs));
             : "l"(xs));