A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 7, 22:45 UTC
[Bugfix] Gate 256-bit instructions to CUDA 12.9+ (#34791)
Signed-off-by: Huy Do <huydhn@gmail.com> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
Huy Do committed
Feb 21, 2026 at 04:48 UTC
272b535ab3315a2ed3cd1a5e9803df2b86da4f07
1 file changed
+4
-2
csrc/activation_kernels.cu
+4
-2
@@ -14,7 +14,8 @@ struct alignas(32) u32x8_t {
14
};
15
16
__device__ __forceinline__ void ld256(u32x8_t& val, const u32x8_t* ptr) {
17
-#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 1000
17
+#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 1000 && \
18
+ defined(CUDA_VERSION) && CUDA_VERSION >= 12090
19
asm volatile("ld.global.nc.v8.u32 {%0,%1,%2,%3,%4,%5,%6,%7}, [%8];\n"
20
: "=r"(val.u0), "=r"(val.u1), "=r"(val.u2), "=r"(val.u3),
21
"=r"(val.u4), "=r"(val.u5), "=r"(val.u6), "=r"(val.u7)
@@ -35,7 +36,8 @@ __device__ __forceinline__ void ld256(u32x8_t& val, const u32x8_t* ptr) {
36
}
37
38
__device__ __forceinline__ void st256(u32x8_t& val, u32x8_t* ptr) {
38
-#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 1000
39
+#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 1000 && \
40
+ defined(CUDA_VERSION) && CUDA_VERSION >= 12090
41
asm volatile("st.global.v8.u32 [%0], {%1,%2,%3,%4,%5,%6,%7,%8};\n"
42
:
43
: "l"(ptr), "r"(val.u0), "r"(val.u1), "r"(val.u2), "r"(val.u3),