|
ember.cpp 0.1.0
C++ inference engine for Llama-family and paperkiln models (CPU, CUDA, WebAssembly)
|
Classes | |
| class | Expr |
| struct | Instr |
| struct | Node |
| struct | Stage |
Enumerations | |
| enum class | Kind { NUMBER , INPUT , NEG , ADD , SUB , MUL , DIV , POW , EXP , LOG , SQRT , TANH , SIGMOID , ERF , ABS , RELU , MAX , MIN , WHERE , ROWSUM , ROWMEAN , ROWMAX } |
| enum class | Op : int { CONST , INPUT , COL , WIDTH , NEG , EXP , LOG , SQRT , TANH , SIGMOID , ERF , ABS , RELU , ADD , SUB , MUL , DIV , POW , MAX , MIN , WHERE } |
Functions | |
| std::vector< Stage > | lower (const Expr &e) |
| void | eval (const Expr &e, const std::vector< const float * > &ins, int T, int w, float *out) |
| const Expr & | cached (const std::string &text, size_t n_inputs) |
Variables | |
| constexpr size_t | kMaxCode = 96 |
| constexpr size_t | kMaxStack = 16 |
| constexpr size_t | kMaxColumns = 8 |
|
strong |
| Enumerator | |
|---|---|
| NUMBER | |
| INPUT | |
| NEG | |
| ADD | |
| SUB | |
| MUL | |
| DIV | |
| POW | |
| EXP | |
| LOG | |
| SQRT | |
| TANH | |
| SIGMOID | |
| ERF | |
| ABS | |
| RELU | |
| MAX | |
| MIN | |
| WHERE | |
| ROWSUM | |
| ROWMEAN | |
| ROWMAX | |
Definition at line 22 of file graph_ir_expr.h.
|
strong |
| Enumerator | |
|---|---|
| CONST | |
| INPUT | |
| COL | |
| WIDTH | |
| NEG | |
| EXP | |
| LOG | |
| SQRT | |
| TANH | |
| SIGMOID | |
| ERF | |
| ABS | |
| RELU | |
| ADD | |
| SUB | |
| MUL | |
| DIV | |
| POW | |
| MAX | |
| MIN | |
| WHERE | |
Definition at line 70 of file graph_ir_expr.h.
Definition at line 530 of file graph_ir_expr.cpp.
References j, ember_ir::expr::Expr::parse(), and text.
Referenced by ember_ir::device_supported(), and ember_ir::Interpreter::init().
| void ember_ir::expr::eval | ( | const Expr & | e, |
| const std::vector< const float * > & | ins, | ||
| int | T, | ||
| int | w, | ||
| float * | out | ||
| ) |
Definition at line 522 of file graph_ir_expr.cpp.
Definition at line 509 of file graph_ir_expr.cpp.
References j.
Referenced by ember_ir::device_supported().
Definition at line 85 of file graph_ir_expr.h.
Referenced by ember_ir::ir_expr_cuda().
Definition at line 87 of file graph_ir_expr.h.
Referenced by ember_ir::ir_expr_cuda().
Definition at line 86 of file graph_ir_expr.h.