[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>
This commit is contained in:
chowdmia
2026-10-02 10:01:07 +08:00
committed by GitHub
co-authored by Miajan Chowdhury Robert Shaw mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 4caa060053
commit 6660926d92
+21 -7
View File
@@ -2306,21 +2306,35 @@ std::tuple<at::Tensor, at::Tensor> chunk_gated_delta_rule_cpu(
chunk_gated_delta_rule_fwd_intra<CHUNK_SIZE>(key_, value, g_, beta, cu_seqlens, chunk_indices);
// fused `chunk_gated_delta_rule_fwd_h` + `chunk_fwd_o`
auto launch_inter = [&](auto state_tag) {
auto launch_inter = [local_query = query_,
local_key = key_,
local_w = w,
local_u = u,
local_decay_mask = decay_mask,
local_chunk_offsets = chunk_offsets,
g_,
initial_state,
output_final_state,
cu_seqlens,
initial_state_indices](auto state_tag) {
using state_t = decltype(state_tag);
return chunk_gated_delta_rule_fwd_inter<state_t, CHUNK_SIZE>(
query_,
key_,
w,
u,
local_query,
local_key,
local_w,
local_u,
g_,
decay_mask,
local_decay_mask,
initial_state,
output_final_state,
cu_seqlens,
chunk_offsets,
local_chunk_offsets,
initial_state_indices);
};
auto output_and_state =
initial_state.scalar_type() == at::kFloat
? launch_inter(float{})