mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 07:48:45 +00:00
ling32: __align__(16) instead of __attribute__((aligned(16))) on the dynamic shared arrays (MSVC host side)
This commit is contained in:
1 parent
e093da4545
commit
11154bde5e
2 files changed
+3
-3
No files matched your search
@@ -574,7 +574,7 @@ __global__ void __launch_bounds__(2 * HD) kda_chunk_seq2_kernel(float* __restric
|
||||
static_assert(CH % 4 == 0 && HD % 8 == 0, "float4 tiles");
|
||||
constexpr int LD = HD + 4, NW = HD / 32, HH = HD / 2;
|
||||
const int tid = threadIdx.x, v = tid & (HD - 1), hf = tid / HD, h = blockIdx.x, C = H * HD, w = v >> 5, lane = v & 31, wid = tid >> 5;
|
||||
extern __shared__ __attribute__((aligned(16))) float dyn[];
|
||||
extern __shared__ __align__(16) float dyn[];
|
||||
float* kE_s = dyn;
|
||||
float* qE_s = kE_s + CH * LD;
|
||||
float* k_s = qE_s + CH * LD;
|
||||
|
||||
@@ -74,7 +74,7 @@ __global__ void mla_exph_qsplit_kernel(const float* __restrict__ q, __half* __re
|
||||
// accumulator element i of a lane is output row n = ..., key = lane % 16 (a store of a half-wave covers 16 consecutive keys: the transposed V is written coalesced). Each wave owns 32 weight rows.
|
||||
__global__ void __launch_bounds__(256) mla_exph_proj_kernel(const float* __restrict__ cache, int lat_stride, const uint16_t* __restrict__ wk16, const uint16_t* __restrict__ wv16,
|
||||
__half* __restrict__ Khi, __half* __restrict__ Klo, __half* __restrict__ Vthi, __half* __restrict__ Vtlo, int S, int k0, int nvalid) {
|
||||
extern __shared__ __attribute__((aligned(16))) unsigned char smem_raw[];
|
||||
extern __shared__ __align__(16) unsigned char smem_raw[];
|
||||
__half* Ah = reinterpret_cast<__half*>(smem_raw); // [64][72] hi plane of the latent rows
|
||||
__half* Al = Ah + kPBM * kPS; // lo plane
|
||||
__half* Ws = Al + kPBM * kPS; // [256][72]
|
||||
@@ -176,7 +176,7 @@ constexpr size_t kAttnSmem = (2 * kBK * kKS + 2 * kVD * kVS + kWarps * 2 * 16 *
|
||||
__global__ void __launch_bounds__(32 * kWarps) mla_exph_attn_kernel(const __half* __restrict__ Qhi, const __half* __restrict__ Qlo, const __half* __restrict__ Khi, const __half* __restrict__ Klo,
|
||||
const __half* __restrict__ Vthi, const __half* __restrict__ Vtlo, float* __restrict__ Oacc, float* __restrict__ ML, int N, int H,
|
||||
int pos0, int k0, int S, int nk_valid, int first, float scale) {
|
||||
extern __shared__ __attribute__((aligned(16))) unsigned char smem_raw[];
|
||||
extern __shared__ __align__(16) unsigned char smem_raw[];
|
||||
__half* Ksh = reinterpret_cast<__half*>(smem_raw); // hi [32][200]
|
||||
__half* Klsh = Ksh + kBK * kKS; // lo
|
||||
__half* Vsh = Klsh + kBK * kKS; // hi [128][40] (v rows, 32 keys + pad)
|
||||
|
||||
Reference in new issue
Block a user