Go to the source code of this file.
Functions | |
| static int | ck_ir_v2_lower_copy_buffers (const CKIRV2Graph *input, CKIRV2Graph *output) |
| static int | ck_ir_v2_lower_copy_nodes (const CKIRV2Graph *input, CKIRV2LowerMode mode, CKIRV2Graph *output) |
| int | ck_ir_v2_lower_emit_json (const CKIRV2Graph *input, CKIRV2LowerMode mode, const char *path) |
| int | ck_ir_v2_lower_graph (const CKIRV2Graph *input, CKIRV2LowerMode mode, CKIRV2Graph *output, CKMemPlan *plan) |
| int | ck_ir_v2_lower_mode_from_string (const char *name, CKIRV2LowerMode *out_mode) |
| const char * | ck_ir_v2_lower_mode_name (CKIRV2LowerMode mode) |
| static int | ck_ir_v2_lower_node_enabled (const CKIRV2Node *node, CKIRV2LowerMode mode) |
| static char * | ck_ir_v2_lower_strdup (const char *s) |
|
static |
Definition at line 107 of file ckernel_ir_v2_lower.c.
References CKIRV2Buffer::alias_of, CKIRV2Graph::buffers, ck_ir_v2_lower_strdup(), CKIRV2Buffer::condition, CKIRV2Buffer::dtype, CKIRV2Buffer::name, CKIRV2Graph::num_buffers, CKIRV2Buffer::optional, CKIRV2Buffer::role, CKIRV2Buffer::scope, and CKIRV2Buffer::shape.
Referenced by ck_ir_v2_lower_graph().
|
static |
Definition at line 129 of file ckernel_ir_v2_lower.c.
References CKIRV2Binding::arg, CKIRV2Node::bindings, CKIRV2Binding::buffer, CK_IR_V2_LOWER_BACKWARD, ck_ir_v2_lower_node_enabled(), ck_ir_v2_lower_strdup(), CK_IR_V2_NODE_INFERENCE_ONLY, CKIRV2Node::condition, CKIRV2Node::flags, CKIRV2Node::inputs, CKIRV2Node::kernel, CKIRV2Node::kernel_dtype, CKIRV2Node::layer, CKIRV2Node::n_bindings, CKIRV2Node::n_inputs, CKIRV2Node::n_outputs, CKIRV2Graph::nodes, CKIRV2Graph::num_nodes, CKIRV2Node::op, and CKIRV2Node::outputs.
Referenced by ck_ir_v2_lower_graph().
| int ck_ir_v2_lower_emit_json | ( | const CKIRV2Graph * | input, |
| CKIRV2LowerMode | mode, | ||
| const char * | path | ||
| ) |
Definition at line 219 of file ckernel_ir_v2_lower.c.
References ck_ir_v2_free(), CK_IR_V2_LOWER_DECODE, ck_ir_v2_lower_graph(), ck_ir_v2_lower_mode_name(), ck_ir_v2_serialize_json_with_plan(), ck_mem_plan_free(), CKIRV2Graph::config, and CKModelConfig::context_window.
Referenced by main().
| int ck_ir_v2_lower_graph | ( | const CKIRV2Graph * | input, |
| CKIRV2LowerMode | mode, | ||
| CKIRV2Graph * | output, | ||
| CKMemPlan * | plan | ||
| ) |
Definition at line 177 of file ckernel_ir_v2_lower.c.
References ck_ir_v2_free(), CK_IR_V2_LOWER_BACKWARD, ck_ir_v2_lower_copy_buffers(), ck_ir_v2_lower_copy_nodes(), CK_IR_V2_LOWER_DECODE, ck_mem_plan_build_inference_with_tokens(), ck_mem_plan_build_training_with_tokens(), CK_MEM_PLAN_DEFAULT_ALIGN, ck_mem_plan_free(), CKIRV2Graph::config, CKIRV2Graph::fused_qkv, CKIRV2Graph::gated_mlp, CKIRV2Graph::has_pos_emb, and CKIRV2Graph::tie_word_embeddings.
Referenced by ck_ir_v2_lower_emit_json().
| int ck_ir_v2_lower_mode_from_string | ( | const char * | name, |
| CKIRV2LowerMode * | out_mode | ||
| ) |
Definition at line 36 of file ckernel_ir_v2_lower.c.
References CK_IR_V2_LOWER_BACKWARD, CK_IR_V2_LOWER_DECODE, and CK_IR_V2_LOWER_PREFILL.
Referenced by ck_ir_v2_lower_node_enabled(), and main().
| const char* ck_ir_v2_lower_mode_name | ( | CKIRV2LowerMode | mode | ) |
Definition at line 22 of file ckernel_ir_v2_lower.c.
References CK_IR_V2_LOWER_BACKWARD, CK_IR_V2_LOWER_DECODE, and CK_IR_V2_LOWER_PREFILL.
Referenced by ck_ir_v2_lower_emit_json(), and main().
|
static |
Definition at line 56 of file ckernel_ir_v2_lower.c.
References CK_IR_V2_LOWER_BACKWARD, CK_IR_V2_LOWER_DECODE, ck_ir_v2_lower_mode_from_string(), CK_IR_V2_LOWER_PREFILL, and CKIRV2Node::condition.
Referenced by ck_ir_v2_lower_copy_nodes().
|
static |
Definition at line 7 of file ckernel_ir_v2_lower.c.
Referenced by ck_ir_v2_lower_copy_buffers(), and ck_ir_v2_lower_copy_nodes().