mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 23:08:36 +00:00
ling32 CUDA: build for sm_61 (Pascal GTX 10) and sm_70 (Volta V100): the persistent MoE kernel spins without __nanosleep below sm_70
__nanosleep needs sm_70; the wait for the gate/up rows of an expert in the persistent MoE kernel is a plain spin on the volatile counter below it (the same pattern as fused_gr.cu / hy4). Audit of the rest of the Ling CUDA code for sm_61 / sm_70: __dp4a is sm_61+; no fp16 arithmetic or bf16 intrinsics in the decode kernels (the half2 decode is only in the tensor-core kernels, which the sm_75 guard of main already switches off for compute capability below 8, so it covers 6.x and 7.0); dynamic shared memory only in the tensor-core and KDA kernels (the KDA default 8-token chunks use 22-30 KB, within Pascal's 48 KB); cp.async / mma / ldmatrix have their sm_75 fallbacks. Checked: MSVC + CUDA 12.9 build with LING32_CUDA_ARCH="61;70;75" OK (jobq owner, build only); CUDA 13 dropped sm_61 / sm_70, so these architectures belong to the CUDA 12 packages. Real runs on a V100 and a GTX 1070 Ti follow.
This commit is contained in:
1 parent
be4a01a75b
commit
5df7db6133
1 file changed
+4
@@ -1398,7 +1398,11 @@ __global__ void __launch_bounds__(192) moe_experts_fused_kernel(const uint8_t* _
|
||||
if (!slab) continue;
|
||||
if (cur != p) { // the activation vector of this expert: wait for its gate/up rows, then the arithmetic of moe_act_kernel
|
||||
if (tid == 0) {
|
||||
#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 700 || defined(STRATA_USE_HIP)
|
||||
while (ld_volatile_int(&ctr[2 + p]) < u1) __nanosleep(64);
|
||||
#else
|
||||
while (ld_volatile_int(&ctr[2 + p]) < u1) {} // __nanosleep is sm_70+ (Pascal: plain spin on the volatile counter)
|
||||
#endif
|
||||
__threadfence();
|
||||
}
|
||||
__syncthreads();
|
||||
|
||||
Reference in new issue
Block a user