6 | const float* __restrict__ x,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 | const float* __restrict__ weight,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 | const float* __restrict__ bias,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:6:31: note: the first parameter in the range is 'x'
6 | const float* __restrict__ x,
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:8:31: note: the last parameter in the range is 'bias'
8 | const float* __restrict__ bias,
| ^~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:10:5: warning: 3 adjacent parameters of 'unrolled_matmul_pool_kernel' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters]
10 | int B, // batch_size
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11 | int inF, // number of input features
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 | int outF, // number of output features
| ~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:10:9: note: the first parameter in the range is 'B'
10 | int B, // batch_size
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:12:9: note: the last parameter in the range is 'outF'
12 | int outF, // number of output features
| ^~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:13:5: warning: 2 adjacent parameters of 'unrolled_matmul_pool_kernel' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters]
13 | int kernel_size,
| ^~~~~~~~~~~~~~~~
14 | float scale_factor
| ~~~~~~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:13:9: note: the first parameter in the range is 'kernel_size'
13 | int kernel_size,
| ^~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:14:11: note: the last parameter in the range is 'scale_factor'
14 | float scale_factor
| ^~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:14:5: note: 'int' and 'float' may be implicitly converted
14 | float scale_factor
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:16:21: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
16 | const int tid = threadIdx.x;
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:17:19: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
17 | const int b = blockIdx.x;
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:26:38: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
26 | for (int j = tid; j < outF; j += blockDim.x) {
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:28:30: warning: result of multiplication in type 'int' is used as a pointer offset after an implicit widening conversion to type 'ptrdiff_t' [bugprone-implicit-widening-of-multiplication-result]
28 | const float* w_row = weight + j * inF;
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:28:39: note: make conversion explicit to silence this warning
4 | const float* w_row = weight + j * inF;
| ^~~~~~~
| static_cast<ptrdiff_t>( )
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:28:39: note: perform multiplication in a wider type
28 | const float* w_row = weight + j * inF;
| ^
| static_cast<ptrdiff_t>( )
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:29:30: warning: result of multiplication in type 'int' is used as a pointer offset after an implicit widening conversion to type 'ptrdiff_t' [bugprone-implicit-widening-of-multiplication-result]
29 | const float* x_row = x + b * inF;
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:29:34: note: make conversion explicit to silence this warning
29 | const float* x_row = x + b * inF;
| ^~~~~~~
| static_cast<ptrdiff_t>( )
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:29:34: note: perform multiplication in a wider type
29 | const float* x_row = x + b * inF;
| ^
| static_cast<ptrdiff_t>( )
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:52:50: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
52 | for (int seg = tid; seg < pooled_len; seg += blockDim.x) {
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:116:16: warning: the parameter 'x' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
116 | at::Tensor x,
| ^
| const &
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:119:16: warning: the parameter 'weight' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
119 | at::Tensor weight,
| ^
| const &
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:120:16: warning: the parameter 'bias' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
120 | at::Tensor bias
| ^
| const &
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:143:9: warning: narrowing conversion from 'int64_t' (aka 'long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
143 | B,
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:144:9: warning: narrowing conversion from 'int64_t' (aka 'long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
144 | inF,
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_55/b10_s1_unrolled_matmul_pool_base/base/base.cu:145:9: warning: narrowing conversion from 'int64_t' (aka 'long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
145 | outF,
| ^