| 23471 | DS4_ROPE_YARN_BETA_SLOW, |
| 23472 | DS4_RMS_EPS) != 0; |
| 23473 | } |
| 23474 | if (!decode_q_norm_rope_fused) { |
| 23475 | if (ok) ok = ds4_gpu_head_rms_norm_tensor(metal_graph_q(g), 1, tp_heads, DS4_N_HEAD_DIM, DS4_RMS_EPS) != 0; |
| 23476 | if (ok) { |
| 23477 | metal_graph_debug_dump_tensor("Qnorm", metal_graph_q(g), q_dim, il, pos); |
| 23478 | } |
| 23479 | if (ok) ok = ds4_gpu_rope_tail_tensor(metal_graph_q(g), 1, tp_heads, DS4_N_HEAD_DIM, |
| 23480 | DS4_N_ROT, pos, |
| 23481 | compressed ? (uint32_t)DS4_ROPE_ORIG_CTX : 0, |
| 23482 | false, freq_base, freq_scale, ext_factor, attn_factor, |
| 23483 | DS4_ROPE_YARN_BETA_FAST, DS4_ROPE_YARN_BETA_SLOW) != 0; |
| 23484 | } |
| 23485 | DS4_METAL_PROFILE_DECODE_STAGE("q_path"); |
| 23486 | if (ok) { |
| 23487 | metal_graph_debug_dump_tensor("Qcur", metal_graph_q(g), q_dim, il, pos); |
| 23488 | } |
| 23489 | if (!qkv_rms_fused) { |
| 23490 | if (ok) ok = metal_graph_matmul_dense_quant_tensor(metal_graph_kv_raw(g), |
| 23491 | model, |
| 23492 | layer->attn_kv, |
| 23493 | DS4_N_EMBD, |
| 23494 | DS4_N_HEAD_DIM, |
| 23495 | metal_graph_attn_norm(g), |
| 23496 | 1); |
| 23497 | if (ok) { |
no test coverage detected