LLM inference in C/C++
C++ ggml
ggml-cuda : remove unused vars (#28235)
Adrien Gallouët3d3d7c818130
diff --git a/ggml/src/ggml-cuda/mmq-vec-dot.cuh b/ggml/src/ggml-cuda/mmq-vec-dot.cuhindex d573433865..4d1c398fc5 100644--- a/ggml/src/ggml-cuda/mmq-vec-dot.cuh+++ b/ggml/src/ggml-cuda/mmq-vec-dot.cuh@@ -148,7 +148,6 @@ static __device__ __forceinline__ void ggml_cuda_mmq_vec_dot_q8_0_q8_1_mma(typedef tile<16, 8, int, input_layout> tile_B;typedef tile<16, 16, int, DATA_LAYOUT_J_MAJOR> tile_C;- constexpr int I = ggml_cuda_mmq_get_I(type, J, fallback);constexpr int sram_stride = ggml_cuda_mmq_get_sram_stride(type, J, fallback);constexpr int rows_per_warp = ggml_cuda_mmq_get_rows_per_warp(type, J, fallback);constexpr int ntx = rows_per_warp/tile_C::I; // Number of x minitiles per warp.@@ -204,7 +203,6 @@ static __device__ __forceinline__ void ggml_cuda_mmq_vec_dot_q8_0_q8_1_mma(typedef tile< 8, 8, int> tile_B;typedef tile<16, 8, int> tile_C;- constexpr int I = ggml_cuda_mmq_get_I(type, J, fallback);constexpr int sram_stride = ggml_cuda_mmq_get_sram_stride(type, J, fallback);constexpr int rows_per_warp = ggml_cuda_mmq_get_rows_per_warp(type, J, fallback);constexpr int ntx = rows_per_warp/tile_C::I; // Number of x minitiles per warp.@@ -320,7 +318,6 @@ template <ggml_type type, int J, bool fallback> static __device__ __forceinline_typedef tile<16, 8, int, input_layout> tile_B;typedef tile<16, 16, int, DATA_LAYOUT_J_MAJOR> tile_C;- constexpr int I = ggml_cuda_mmq_get_I(type, J, fallback);constexpr int sram_stride = ggml_cuda_mmq_get_sram_stride(type, J, fallback);constexpr int rows_per_warp = ggml_cuda_mmq_get_rows_per_warp(type, J, fallback);constexpr int ntx = rows_per_warp/tile_C::I; // Number of x minitiles per warp.@@ -371,7 +368,6 @@ template <ggml_type type, int J, bool fallback> static __device__ __forceinline_typedef tile< 8, 8, int> tile_B;typedef tile<16, 8, int> tile_C;- constexpr int I = ggml_cuda_mmq_get_I(type, J, fallback);constexpr int sram_stride = ggml_cuda_mmq_get_sram_stride(type, J, fallback);constexpr int rows_per_warp = ggml_cuda_mmq_get_rows_per_warp(type, J, fallback);constexpr int ntx = rows_per_warp/tile_C::I; // Number of x minitiles per warp.@@ -486,7 +482,6 @@ template <ggml_type type, int J, bool fallback> static __device__ __forceinline_typedef tile<16, 4, int, input_layout> tile_B;typedef tile<16, 16, int, DATA_LAYOUT_J_MAJOR> tile_C;- constexpr int I = ggml_cuda_mmq_get_I(type, J, fallback);constexpr int sram_stride = ggml_cuda_mmq_get_sram_stride(type, J, fallback);constexpr int rows_per_warp = ggml_cuda_mmq_get_rows_per_warp(type, J, fallback);constexpr int ntx = rows_per_warp/tile_C::I; // Number of x minitiles per warp.@@ -537,7 +532,6 @@ template <ggml_type type, int J, bool fallback> static __device__ __forceinline_typedef tile< 8, 4, int> tile_B;typedef tile<16, 8, int> tile_C;- constexpr int I = ggml_cuda_mmq_get_I(type, J, fallback);constexpr int sram_stride = ggml_cuda_mmq_get_sram_stride(type, J, fallback);constexpr int rows_per_warp = ggml_cuda_mmq_get_rows_per_warp(type, J, fallback);constexpr int ntx = rows_per_warp/tile_C::I; // Number of x minitiles per warp.@@ -686,7 +680,6 @@ template <ggml_type type, int J, bool fallback> static __device__ __forceinline_typedef tile<16, 4, int, input_layout> tile_B;typedef tile<16, 16, int, DATA_LAYOUT_J_MAJOR> tile_C;- constexpr int I = ggml_cuda_mmq_get_I(type, J, fallback);constexpr int sram_stride = ggml_cuda_mmq_get_sram_stride(type, J, fallback);constexpr int rows_per_warp = ggml_cuda_mmq_get_rows_per_warp(type, J, fallback);constexpr int ntx = rows_per_warp/tile_C::I; // Number of x minitiles per warp.@@ -756,7 +749,6 @@ template <ggml_type type, int J, bool fallback> static __device__ __forceinline_typedef tile< 8, 4, int> tile_B;typedef tile<16, 8, int> tile_C;- constexpr int I = ggml_cuda_mmq_get_I(type, J, fallback);constexpr int sram_stride = ggml_cuda_mmq_get_sram_stride(type, J, fallback);constexpr int rows_per_warp = ggml_cuda_mmq_get_rows_per_warp(type, J, fallback);constexpr int ntx = rows_per_warp/tile_C::I; // Number of x minitiles per warp.@@ -1023,7 +1015,6 @@ template <ggml_type type, int J, bool fallback> static __device__ __forceinline_typedef tile<16, 4, int, input_layout> tile_B;typedef tile<16, 16, int, DATA_LAYOUT_J_MAJOR> tile_C;- constexpr int I = ggml_cuda_mmq_get_I(type, J, fallback);constexpr int sram_stride = ggml_cuda_mmq_get_sram_stride(type, J, fallback);constexpr int rows_per_warp = ggml_cuda_mmq_get_rows_per_warp(type, J, fallback);constexpr int ntx = rows_per_warp/tile_C::I; // Number of x minitiles per warp.@@ -1075,7 +1066,6 @@ template <ggml_type type, int J, bool fallback> static __device__ __forceinline_typedef tile< 8, 4, int> tile_B;typedef tile<16, 8, int> tile_C;- constexpr int I = ggml_cuda_mmq_get_I(type, J, fallback);constexpr int sram_stride = ggml_cuda_mmq_get_sram_stride(type, J, fallback);constexpr int rows_per_warp = ggml_cuda_mmq_get_rows_per_warp(type, J, fallback);constexpr int ntx = rows_per_warp/tile_C::I; // Number of x minitiles per warp.@@ -1190,7 +1180,6 @@ template <ggml_type type, int J, bool fallback> static __device__ __forceinline_typedef tile<8, 8, int> tile_B;typedef tile<16, 8, float> tile_C;- constexpr int I = ggml_cuda_mmq_get_I(type, J, fallback);constexpr int sram_stride = ggml_cuda_mmq_get_sram_stride(type, J, fallback);constexpr int rows_per_warp = ggml_cuda_mmq_get_rows_per_warp(type, J, fallback);constexpr int ntx = rows_per_warp / tile_C::I;diff --git a/ggml/src/ggml-cuda/mmq.cuh b/ggml/src/ggml-cuda/mmq.cuhindex c978b4421c..b4a747720f 100644--- a/ggml/src/ggml-cuda/mmq.cuh+++ b/ggml/src/ggml-cuda/mmq.cuh@@ -481,9 +481,6 @@ static __device__ __forceinline__ void ggml_cuda_mmq_write_back_mma(typedef tile<16, 8, int> tile_C;#endif // defined(AMD_MFMA_AVAILABLE) || defined(AMD_WMMA_AVAILABLE)- constexpr int warp_size = ggml_cuda_get_physical_warp_size();- constexpr int nwarps = ggml_cuda_mmq_get_nthreads(type, J, fallback) / warp_size;- constexpr int I = ggml_cuda_mmq_get_I(type, J, fallback);constexpr int rows_per_warp = ggml_cuda_mmq_get_rows_per_warp(type, J, fallback);constexpr int ntx = rows_per_warp/tile_C::I; // Number of x minitiles per warp.@@ -540,8 +537,6 @@ struct ggml_cuda_mmq_util_funcs {template <ggml_type type, int J, bool fallback>static constexpr __device__ ggml_cuda_mmq_util_funcs ggml_cuda_mmq_get_util_funcs() {- constexpr int I = ggml_cuda_mmq_get_I(type, J, fallback);-if (!ggml_cuda_mmq_get_config(type, J, fallback).use_mma_data_layout()) {switch (type) {case GGML_TYPE_Q1_0: