| 97 | const core::TensorValue & q_heads, |
| 98 | const core::TensorValue & k_heads, |
| 99 | const core::TensorValue & v_heads, |
| 100 | int64_t dim, |
| 101 | const std::optional<core::TensorValue> & attention_mask, |
| 102 | core::BackendType backend_type) { |
| 103 | (void)backend_type; |
| 104 | return modules::ScaledDotProductAttentionModule({ |
| 105 | dim, |
| 106 | modules::ScaledDotProductAttentionLowering::Explicit, |
| 107 | GGML_PREC_F32, |
| 108 | }).build(ctx, q_heads, k_heads, v_heads, attention_mask); |
| 109 | } |
| 110 | |
| 111 | core::TensorValue build_attention( |
| 112 | core::ModuleBuildContext & ctx, |
no test coverage detected