[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:
co-authored by
Miajan Chowdhury
Robert Shaw
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
4caa060053
commit
6660926d92
@@ -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);
|
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`
|
// 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);
|
using state_t = decltype(state_tag);
|
||||||
return chunk_gated_delta_rule_fwd_inter<state_t, CHUNK_SIZE>(
|
return chunk_gated_delta_rule_fwd_inter<state_t, CHUNK_SIZE>(
|
||||||
query_,
|
local_query,
|
||||||
key_,
|
local_key,
|
||||||
w,
|
local_w,
|
||||||
u,
|
local_u,
|
||||||
g_,
|
g_,
|
||||||
decay_mask,
|
local_decay_mask,
|
||||||
initial_state,
|
initial_state,
|
||||||
output_final_state,
|
output_final_state,
|
||||||
cu_seqlens,
|
cu_seqlens,
|
||||||
chunk_offsets,
|
local_chunk_offsets,
|
||||||
initial_state_indices);
|
initial_state_indices);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auto output_and_state =
|
auto output_and_state =
|
||||||
initial_state.scalar_type() == at::kFloat
|
initial_state.scalar_type() == at::kFloat
|
||||||
? launch_inter(float{})
|
? launch_inter(float{})
|
||||||
|
|||||||
Reference in New Issue
Block a user