#pragma once
#include "ggml.h"
struct ggml_context;
struct ggml_tensor;
struct ggml_cgraph;
namespace transcribe::canary {
struct CanaryHParams;
struct CanaryWeights;
struct EncoderDumps {
ggml_tensor * mel_in = nullptr;
ggml_tensor * pre_encode_out = nullptr;
ggml_tensor * pos_emb = nullptr;
ggml_tensor * block0_out = nullptr;
ggml_tensor * block_mid_out = nullptr; ggml_tensor * block_last_out = nullptr; ggml_tensor * native_out = nullptr; ggml_tensor * final_out = nullptr; };
struct EncoderBuild {
ggml_tensor * mel_in = nullptr;
ggml_tensor * pos_emb_in = nullptr;
ggml_tensor * out = nullptr; EncoderDumps dumps{};
ggml_cgraph * graph = nullptr;
};
EncoderBuild build_encoder_graph(ggml_context * compute_ctx,
const CanaryWeights & weights,
const CanaryHParams & hp,
int n_mel_frames,
ggml_type kv_type = GGML_TYPE_COUNT,
bool use_flash = true,
const char * backend_name = "");
}