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 16, 19:30 UTC
[Kernel] Squash a few more warnings (#6914)
Tyler Michael Smith committed
Jul 30, 2024 at 13:50 UTC
cbbc904470668b9420e71595edeef76d673a2d59
5 files changed
+8
-5
csrc/attention/attention_kernels.cu
+2
-2
@@ -706,7 +706,7 @@ void paged_attention_v1_launcher(
706
int kv_block_stride = key_cache.stride(0);
707
int kv_head_stride = key_cache.stride(1);
708
709
- int thread_group_size = MAX(WARP_SIZE / BLOCK_SIZE, 1);
709
+ [[maybe_unused]] int thread_group_size = MAX(WARP_SIZE / BLOCK_SIZE, 1);
710
assert(head_size % thread_group_size == 0);
711
712
// NOTE: alibi_slopes is optional.
@@ -865,7 +865,7 @@ void paged_attention_v2_launcher(
865
int kv_block_stride = key_cache.stride(0);
866
int kv_head_stride = key_cache.stride(1);
867
868
- int thread_group_size = MAX(WARP_SIZE / BLOCK_SIZE, 1);
868
+ [[maybe_unused]] int thread_group_size = MAX(WARP_SIZE / BLOCK_SIZE, 1);
869
assert(head_size % thread_group_size == 0);
870
871
// NOTE: alibi_slopes is optional.
csrc/quantization/aqlm/gemm_kernels.cu
-2
@@ -273,8 +273,6 @@ __global__ void Code2x8Dequant(
273
}
274
__syncthreads();
275
276
- float res = 0;
277
-
276
int iters = (prob_k / 8 - 1) / (8 * 32) + 1;
277
while (iters--) {
278
if (pred && a_gl_rd < a_gl_end) {
csrc/quantization/fp8/amd/quant_utils.cuh
+2
@@ -526,6 +526,7 @@ __inline__ __device__ Tout convert(const Tin& x) {
526
}
527
#endif
528
assert(false);
529
+ return {}; // Squash missing return statement warning
530
}
531
532
template <typename Tout, typename Tin, Fp8KVCacheDataType kv_dt>
@@ -536,6 +537,7 @@ __inline__ __device__ Tout scaled_convert(const Tin& x, const float scale) {
537
}
538
#endif
539
assert(false);
540
+ return {}; // Squash missing return statement warning
541
}
542
543
// The following macro is used to dispatch the conversion function based on
csrc/quantization/fp8/nvidia/quant_utils.cuh
+2
@@ -508,6 +508,7 @@ __inline__ __device__ Tout convert(const Tin& x) {
508
}
509
#endif
510
assert(false);
511
+ return {}; // Squash missing return statement warning
512
}
513
514
template <typename Tout, typename Tin, Fp8KVCacheDataType kv_dt>
@@ -520,6 +521,7 @@ __inline__ __device__ Tout scaled_convert(const Tin& x, const float scale) {
521
}
522
#endif
523
assert(false);
524
+ return {}; // Squash missing return statement warning
525
}
526
527
// The following macro is used to dispatch the conversion function based on
csrc/quantization/squeezellm/quant_cuda_kernel.cu
+2
-1
@@ -203,7 +203,8 @@ void squeezellm_gemm(torch::Tensor vec, torch::Tensor mat, torch::Tensor mul,
203
#endif
204
mat.data_ptr<int>(),
205
#ifndef USE_ROCM
206
- (half2*)mul.data<at::Half>(), (__half*)lookup_table.data_ptr<at::Half>(),
206
+ (half2*)mul.data_ptr<at::Half>(),
207
+ (__half*)lookup_table.data_ptr<at::Half>(),
208
#else
209
(float2*)mul.data_ptr<float>(),
210
(__half*)lookup_table.data_ptr<at::Half>(),