22 | const scalar_t* __restrict__ bn_weight, // BatchNorm scale, shape: [out_features]
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 | const scalar_t* __restrict__ bn_bias, // BatchNorm bias, shape: [out_features]
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:22:34: note: the first parameter in the range is 'bn_weight'
22 | const scalar_t* __restrict__ bn_weight, // BatchNorm scale, shape: [out_features]
| ^~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:23:34: note: the last parameter in the range is 'bn_bias'
23 | const scalar_t* __restrict__ bn_bias, // BatchNorm bias, shape: [out_features]
| ^~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:24:5: warning: 2 adjacent parameters of 'fused_bn_swish_opt_kernel' of similar type ('scalar_t *__restrict') are easily swapped by mistake [bugprone-easily-swappable-parameters]
24 | scalar_t* __restrict__ bn_running_mean, // Running mean, shape: [out_features]
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 | scalar_t* __restrict__ bn_running_var, // Running variance, shape: [out_features]
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:24:28: note: the first parameter in the range is 'bn_running_mean'
24 | scalar_t* __restrict__ bn_running_mean, // Running mean, shape: [out_features]
| ^~~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:25:28: note: the last parameter in the range is 'bn_running_var'
25 | scalar_t* __restrict__ bn_running_var, // Running variance, shape: [out_features]
| ^~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:27:5: warning: 5 adjacent parameters of 'fused_bn_swish_opt_kernel' of convertible types are easily swapped by mistake [bugprone-easily-swappable-parameters]
27 | const float bn_eps,
| ^~~~~~~~~~~~~~~~~~~
28 | const float bn_momentum,
| ~~~~~~~~~~~~~~~~~~~~~~~~
29 | const float divide_value,
| ~~~~~~~~~~~~~~~~~~~~~~~~~
30 | const int batch_size,
| ~~~~~~~~~~~~~~~~~~~~~
31 | const int out_features) {
| ~~~~~~~~~~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:27:17: note: the first parameter in the range is 'bn_eps'
27 | const float bn_eps,
| ^~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:31:15: note: the last parameter in the range is 'out_features'
31 | const int out_features) {
| ^~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:30:5: note: 'const float' and 'const int' may be implicitly converted: 'const float' (as 'float') -> 'const int' (as 'int'), 'const int' (as 'int') -> 'const float' (as 'float')
30 | const int batch_size,
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:34:19: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
34 | const int f = blockIdx.x;
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:36:21: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
36 | const int tid = threadIdx.x;
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:47:54: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
47 | for (int i = tid * vec_size; i < vec_limit; i += blockDim.x * vec_size) {
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:58:56: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
58 | for (int i = vec_limit + tid; i < batch_size; i += blockDim.x) {
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:75:26: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
75 | const int numWarps = blockDim.x / 32;
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:102:34: warning: narrowing conversion from 'int' to 'float' [bugprone-narrowing-conversions]
102 | float mean = total_sum / batch_size;
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:103:35: warning: narrowing conversion from 'int' to 'float' [bugprone-narrowing-conversions]
103 | float var = total_sumsq / batch_size - mean * mean;
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:122:54: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
122 | for (int i = tid * vec_size; i < vec_limit; i += blockDim.x * vec_size) {
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:137:56: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
137 | for (int i = vec_limit + tid; i < batch_size; i += blockDim.x) {
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:156:5: warning: 2 adjacent parameters of 'module_fn_cuda' of similar type ('torch::Tensor') are easily swapped by mistake [bugprone-easily-swappable-parameters]
156 | torch::Tensor bias,
| ^~~~~~~~~~~~~~~~~~~
157 | torch::Tensor bn_weight,
| ~~~~~~~~~~~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:156:19: note: the first parameter in the range is 'bias'
156 | torch::Tensor bias,
| ^~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:157:19: note: the last parameter in the range is 'bn_weight'
157 | torch::Tensor bn_weight,
| ^~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:177:24: warning: narrowing conversion from 'int64_t' (aka 'long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
177 | const int blocks = out_features;
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:179:36: warning: performing an implicit widening conversion to type 'unsigned long' of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result]
179 | const size_t shared_mem_size = 2 * (threads / 32) * sizeof(float);
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:179:36: note: make conversion explicit to silence this warning
11 | const size_t shared_mem_size = 2 * (threads / 32) * sizeof(float);
| ^~~~~~~~~~~~~~~~~~
| static_cast<unsigned long>( )
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:179:36: note: perform multiplication in a wider type
179 | const size_t shared_mem_size = 2 * (threads / 32) * sizeof(float);
| ^
| static_cast<long>( )
/home/robert_sakana_ai/llm_cuda/experiments/20250203_optimize_b10_s4_e0_sweep/level_2/task_97/b4_s1_fused_bn_swish_opt/base/base.cu:181:5: warning: inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly [bugprone-lambda-function-name]
181 | AT_DISPATCH_FLOATING_TYPES(x_linear.scalar_type(), "fused_bn_swish_opt_kernel", ([&] {
| ^
/home/robert_sakana_ai/miniconda3/envs/llm2cuda/lib/python3.11/site-packages/torch/include/ATen/Dispatch.h:237:34: note: expanded from macro 'AT_DISPATCH_FLOATING_TYPES'
237 | AT_DISPATCH_SWITCH(TYPE, NAME, AT_DISPATCH_CASE_FLOATING_TYPES(__VA_ARGS__))
| ^
/home/robert_sakana_ai/miniconda3/envs/llm2cuda/lib/python3.11/site-packages/torch/include/ATen/Dispatch.h:233:3: note: expanded from macro 'AT_DISPATCH_CASE_FLOATING_TYPES'
233 | AT_DISPATCH_CASE(at::ScalarType::Double, __VA_ARGS__) \
| ^
/home/robert_sakana_ai/miniconda3/envs/llm2cuda/lib/python3.11/site-packages/torch/include/ATen/Dispatch.h:74:3: note: expanded from macro 'AT_DISPATCH_CASE'
74 | AT_PRIVATE_CASE_TYPE_USING_HINT(enum_type, scalar_t, __VA_ARGS__)
| ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/home/robert_sakana_ai/miniconda3/envs/llm2cuda/lib/python3.11/site-packages/torch/include/ATen/Dispatch.h:58:7: note: expanded from macro 'AT_PRIVATE_CHECK_SELECTIVE_BUILD'
58 | AT_ERROR( \
| ^
/home/robert_sakana_ai/miniconda3/envs/llm2cuda/lib/python3.11/site-packages/torch/include/c10/util/Exception.h:711:32: note: expanded from macro 'AT_ERROR'
711 | C10_EXPAND_MSVC_WORKAROUND(TORCH_CHECK(false, ::c10::str(__VA_ARGS__))); \
| ^
/home/robert_sakana_ai/miniconda3/envs/llm2cuda/lib/python3.11/site-packages/torch/include/c10/util/Exception.h:536:9: note: expanded from macro 'TORCH_CHECK'
536 | __func__, \
| ^