10 | const int tid,
| ^~~~~~~~~~~~~~
11 | const int normalized_size,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
12 | const int blockDim_x,
| ~~~~~~~~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:10:15: note: the first parameter in the range is 'tid'
10 | const int tid,
| ^~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:12:15: note: the last parameter in the range is 'blockDim_x'
12 | const int blockDim_x,
| ^~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:13:5: warning: 2 adjacent parameters of 'compute_statistics' of similar type ('accscalar_t &') are easily swapped by mistake [bugprone-easily-swappable-parameters]
13 | accscalar_t& local_sum,
| ^~~~~~~~~~~~~~~~~~~~~~~
14 | accscalar_t& local_sum_sq) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:13:18: note: the first parameter in the range is 'local_sum'
13 | accscalar_t& local_sum,
| ^~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:14:18: note: the last parameter in the range is 'local_sum_sq'
14 | accscalar_t& local_sum_sq) {
| ^~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:47:5: warning: 2 adjacent parameters of 'reduce_statistics' of similar type ('accscalar_t *') are easily swapped by mistake [bugprone-easily-swappable-parameters]
47 | accscalar_t* s_sum,
| ^~~~~~~~~~~~~~~~~~~
48 | accscalar_t* s_sum_sq,
| ~~~~~~~~~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:47:18: note: the first parameter in the range is 's_sum'
47 | accscalar_t* s_sum,
| ^~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:48:18: note: the last parameter in the range is 's_sum_sq'
48 | accscalar_t* s_sum_sq,
| ^~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:49:5: warning: 2 adjacent parameters of 'reduce_statistics' of similar type ('const int') are easily swapped by mistake [bugprone-easily-swappable-parameters]
49 | const int tid,
| ^~~~~~~~~~~~~~
50 | const int blockDim_x) {
| ~~~~~~~~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:49:15: note: the first parameter in the range is 'tid'
49 | const int tid,
| ^~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:50:15: note: the last parameter in the range is 'blockDim_x'
50 | const int blockDim_x) {
| ^~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:63:5: warning: 3 adjacent parameters of 'compute_normalized_output' of similar type ('const scalar_t *__restrict') are easily swapped by mistake [bugprone-easily-swappable-parameters]
63 | const scalar_t* __restrict__ in_ptr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64 | const scalar_t* __restrict__ weight,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65 | const scalar_t* __restrict__ bias,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:63:34: note: the first parameter in the range is 'in_ptr'
63 | const scalar_t* __restrict__ in_ptr,
| ^~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:65:34: note: the last parameter in the range is 'bias'
65 | const scalar_t* __restrict__ bias,
| ^~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:69:5: warning: 3 adjacent parameters of 'compute_normalized_output' of similar type ('const int') are easily swapped by mistake [bugprone-easily-swappable-parameters]
69 | const int tid,
| ^~~~~~~~~~~~~~
70 | const int normalized_size,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | const int blockDim_x) {
| ~~~~~~~~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:69:15: note: the first parameter in the range is 'tid'
69 | const int tid,
| ^~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:71:15: note: the last parameter in the range is 'blockDim_x'
71 | const int blockDim_x) {
| ^~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:109:5: warning: 2 adjacent parameters of 'layernorm_forward_kernel_modular' of similar type ('const scalar_t *__restrict') are easily swapped by mistake [bugprone-easily-swappable-parameters]
109 | const scalar_t* __restrict__ input,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110 | const scalar_t* __restrict__ weight,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:109:34: note: the first parameter in the range is 'input'
109 | const scalar_t* __restrict__ input,
| ^~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:110:34: note: the last parameter in the range is 'weight'
110 | const scalar_t* __restrict__ weight,
| ^~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:116:30: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
116 | const int instance_idx = blockIdx.x;
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:117:21: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
117 | const int tid = threadIdx.x;
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:153:27: warning: narrowing conversion from 'int64_t' (aka 'long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
153 | int normalized_size = weight.numel();
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:154:22: warning: narrowing conversion from 'int64_t' (aka 'long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
154 | int outer_size = x.numel() / normalized_size;
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:159: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]
159 | AT_DISPATCH_FLOATING_TYPES(x.scalar_type(), "layernorm_forward_cuda", ([&] {
| ^
/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__, \
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:161:27: warning: performing an implicit widening conversion to type 'unsigned long' of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result]
161 | int shared_size = threads * 2 * sizeof(accscalar_t);
| ^
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:161:27: note: make conversion explicit to silence this warning
161 | int shared_size = threads * 2 * sizeof(accscalar_t);
| ^
| static_cast<unsigned long>(
/home/robert_sakana_ai/miniconda3/envs/llm2cuda/lib/python3.11/site-packages/torch/include/ATen/Dispatch.h:237:66: 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:44: 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:56: note: expanded from macro 'AT_DISPATCH_CASE'
74 | AT_PRIVATE_CASE_TYPE_USING_HINT(enum_type, scalar_t, __VA_ARGS__)
| ^~~~~~~~~~~
/home/robert_sakana_ai/miniconda3/envs/llm2cuda/lib/python3.11/site-packages/torch/include/ATen/Dispatch.h:70:12: note: expanded from macro 'AT_PRIVATE_CASE_TYPE_USING_HINT'
70 | return __VA_ARGS__(); \
| ^~~~~~~~~~~
/home/robert_sakana_ai/miniconda3/envs/llm2cuda/lib/python3.11/site-packages/torch/include/ATen/Dispatch.h:221:7: note: expanded from macro 'AT_DISPATCH_SWITCH'
221 | __VA_ARGS__ \
| ^~~~~~~~~~~
/home/robert_sakana_ai/llm_cuda/experiments/20250201_optimize_b10_s4_e0_sweep/level_1/task_40/b9_s2_layernorm_modular_base/base/base.cu:161:27: note: perform multiplication in a wider type
161 | int shared_size = threads * 2 * sizeof(accscalar_t);
| ^
| static_cast<long>(
/home/robert_sakana_ai/miniconda3/envs/llm2cuda/lib/python3.11/site-packages/torch/include/ATen/Dispatch.h:237:66: 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:44: 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:56: note: expanded from macro 'AT_DISPATCH_CASE'
74 | AT_PRIVATE_CASE_TYPE_USING_HINT(enum_type, scalar_t, __VA_ARGS__)
| ^~~~~~~~~~~
/home/robert_sakana_ai/miniconda3/envs/llm2cuda/lib/python3.11/site-packages/torch/include/ATen/Dispatch.h:70:12: note: expanded from macro 'AT_PRIVATE_CASE_TYPE_USING_HINT'
70 | return __VA_ARGS__(); \
| ^~~~~~~~~~~
/home/robert_sakana_ai/miniconda3/envs/llm2cuda/lib/python3.11/site-packages/torch/include/ATen/Dispatch.h:221:7: note: expanded from macro 'AT_DISPATCH_SWITCH'
221 | __VA_ARGS__ \
| ^~~~~~~~~~~