← Back to C-Kernel-Engine Docs Doxygen Source Documentation
 
Loading...
Searching...
No Matches
ckernel_ir_v2.h
Go to the documentation of this file.
1#ifndef CKERNEL_IR_V2_H
2#define CKERNEL_IR_V2_H
3
4#include "ckernel_ir.h"
6
7#include <stdint.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13#define CK_IR_V2_MAX_DIMS 4
14#define CK_IR_V2_MAX_INPUTS 8
15#define CK_IR_V2_MAX_OUTPUTS 4
16#define CK_IR_V2_MAX_BINDINGS 24
17
23
34
35typedef struct {
36 char *arg;
37 int32_t buffer;
39
40typedef struct {
41 char *op;
42 char *kernel;
44 char *condition;
45 uint16_t layer;
46 uint8_t flags;
48 uint8_t n_bindings;
49 int32_t inputs[CK_IR_V2_MAX_INPUTS];
50 uint8_t n_inputs;
51 int32_t outputs[CK_IR_V2_MAX_OUTPUTS];
52 uint8_t n_outputs;
54
66
67struct CKMemPlan;
68
70int ck_ir_v2_build_decoder_backward(const CKIRV2Graph *forward, CKIRV2Graph *backward);
71int ck_ir_v2_apply_meta(const char *path, CKIRV2Graph *graph);
72int ck_ir_v2_serialize_json(const CKIRV2Graph *graph, const char *path);
74 const struct CKMemPlan *plan,
75 const char *mode,
76 int tokens_override,
77 int base_context_window,
78 const char *path);
79int ck_ir_v2_parse_json(const char *path, CKIRV2Graph *graph);
80void ck_ir_v2_free(CKIRV2Graph *graph);
81
82#ifdef __cplusplus
83} /* extern "C" */
84#endif
85
86#endif /* CKERNEL_IR_V2_H */
CKDataType
Supported data types in C-Kernel-Engine.
#define CK_IR_V2_MAX_DIMS
#define CK_IR_V2_MAX_BINDINGS
#define CK_IR_V2_MAX_OUTPUTS
int ck_ir_v2_serialize_json_with_plan(const CKIRV2Graph *graph, const struct CKMemPlan *plan, const char *mode, int tokens_override, int base_context_window, const char *path)
void ck_ir_v2_free(CKIRV2Graph *graph)
int ck_ir_v2_apply_meta(const char *path, CKIRV2Graph *graph)
int ck_ir_v2_serialize_json(const CKIRV2Graph *graph, const char *path)
int ck_ir_v2_build_decoder(const CKModelConfig *cfg, CKIRV2Graph *graph)
int ck_ir_v2_parse_json(const char *path, CKIRV2Graph *graph)
#define CK_IR_V2_MAX_INPUTS
CKIRV2NodeFlags
@ CK_IR_V2_NODE_FUSED
@ CK_IR_V2_NODE_INFERENCE_ONLY
@ CK_IR_V2_NODE_NONE
int ck_ir_v2_build_decoder_backward(const CKIRV2Graph *forward, CKIRV2Graph *backward)
CKBufferRole role
CKBufferScope scope
CKDataType dtype
CKModelConfig config
int tie_word_embeddings
CKIRV2Node * nodes
CKIRV2Buffer * buffers
uint8_t n_bindings
char * condition
uint16_t layer
uint8_t flags
CKDataType kernel_dtype
uint8_t n_outputs
char * kernel
uint8_t n_inputs