[Bugfix][CPU] Fix macOS build on Apple Clang < 17: structured binding… (#58932)
Signed-off-by: Miajan Chowdhury <chowdhurymiajan@gmail.com> Co-authored-by: Miajan Chowdhury <chowdhurymiajan@gmail.com> Co-authored-by: Robert Shaw <114415538+robertgshaw2-redhat@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
chowdmia committed
Oct 1, 2026 at 19:01 UTC
6660926d920bc6f5bc0c5d018182ffe45fd1a744
1 file changed
+21
-7
csrc/cpu/sgl-kernels/fla.cpp
+21
-7
@@ -2306,21 +2306,35 @@ std::tuple<at::Tensor, at::Tensor> chunk_gated_delta_rule_cpu(
2306
chunk_gated_delta_rule_fwd_intra<CHUNK_SIZE>(key_, value, g_, beta, cu_seqlens, chunk_indices);
2307
2308
// fused `chunk_gated_delta_rule_fwd_h` + `chunk_fwd_o`
2309
- auto launch_inter = [&](auto state_tag) {
2309
+ auto launch_inter = [local_query = query_,
2310
+ local_key = key_,
2311
+ local_w = w,
2312
+ local_u = u,
2313
+ local_decay_mask = decay_mask,
2314
+ local_chunk_offsets = chunk_offsets,
2315
+ g_,
2316
+ initial_state,
2317
+ output_final_state,
2318
+ cu_seqlens,
2319
+ initial_state_indices](auto state_tag) {
2320
using state_t = decltype(state_tag);
2321
return chunk_gated_delta_rule_fwd_inter<state_t, CHUNK_SIZE>(
2312
- query_,
2313
- key_,
2314
- w,
2315
- u,
2322
+ local_query,
2323
+ local_key,
2324
+ local_w,
2325
+ local_u,
2326
g_,
2317
- decay_mask,
2327
+ local_decay_mask,
2328
initial_state,
2329
output_final_state,
2330
cu_seqlens,
2321
- chunk_offsets,
2331
+ local_chunk_offsets,
2332
initial_state_indices);
2333
};
2334
+
2335
+
2336
+
2337
+
2338
auto output_and_state =
2339
initial_state.scalar_type() == at::kFloat
2340
? launch_inter(float{})