@@ -80,9 +80,8 @@ static __global__ void mul_mat_vec_f(
8080 gate_x += int64_t (sample_x) *stride_sample_x + channel_x *stride_channel_x + row*stride_row;
8181 }
8282
83- const int channel_bias = ids ? channel_x : channel_dst;
84-
8583 if constexpr (has_fusion) {
84+ const int channel_bias = ids ? channel_x : channel_dst;
8685 if (use_bias) {
8786 x_bias += int64_t (sample_dst)*stride_sample_dst + channel_bias*stride_channel_dst;
8887 }
@@ -95,7 +94,7 @@ static __global__ void mul_mat_vec_f(
9594
9695 extern __shared__ char data_mmv[];
9796 float * buf_iw = (float *) data_mmv;
98- float * buf_iw_gate = nullptr ;
97+ [[maybe_unused]] float * buf_iw_gate = nullptr ;
9998 if constexpr (has_fusion) {
10099 buf_iw_gate = (float *) (data_mmv + warp_size*sizeof (float ));
101100 }
@@ -123,7 +122,7 @@ static __global__ void mul_mat_vec_f(
123122
124123 if constexpr (std::is_same_v<T, float >) {
125124 const float2 * x2 = (const float2 *) x;
126- const float2 * gate_x2 = nullptr ;
125+ [[maybe_unused]] const float2 * gate_x2 = nullptr ;
127126 if constexpr (has_fusion) {
128127 if (use_gate) {
129128 gate_x2 = (const float2 *) gate_x;
@@ -155,7 +154,7 @@ static __global__ void mul_mat_vec_f(
155154 }
156155 } else if constexpr (std::is_same_v<T, half>) {
157156 const half2 * x2 = (const half2 *) x;
158- const half2 * gate_x2 = nullptr ;
157+ [[maybe_unused]] const half2 * gate_x2 = nullptr ;
159158 if constexpr (has_fusion) {
160159 if (use_gate) {
161160 gate_x2 = (const half2 *) gate_x;
@@ -266,15 +265,15 @@ static __global__ void mul_mat_vec_f(
266265 }
267266#else
268267 const nv_bfloat162 * x2 = (const nv_bfloat162 *) x;
269- const nv_bfloat162 * gate_x2 = nullptr ;
268+ [[maybe_unused]] const nv_bfloat162 * gate_x2 = nullptr ;
270269 if constexpr (has_fusion) {
271270 if (use_gate) {
272271 gate_x2 = (const nv_bfloat162 *) gate_x;
273272 }
274273 }
275274 for (int col2 = tid; col2 < ncols2; col2 += block_size) {
276275 const nv_bfloat162 tmpx = x2[col2];
277- nv_bfloat162 tmpx_gate;
276+ [[maybe_unused]] nv_bfloat162 tmpx_gate;
278277 if constexpr (has_fusion) {
279278 if (use_gate) {
280279 tmpx_gate = gate_x2[col2];
0 commit comments