Overview
Overview
Welcome to Caten/APIs
WIP
proceed is a function that evaluates a computational graph.
Result
ctx:with-contextvar
is a macro that sets the context variable. BACKEND=CLANG
to use JIT, JIT_DEBUG=4
to see the generated code. DOT=1
to debug the pattern matcher on your browser. (need graphviz)
lisp
CATEN-USER> (ctx:with-contextvar (:BACKEND "CLANG" :jit_debug 4 :dot 0)
(caten (forward (Embedding 10 10) (make-tensor `(b c)))))
Result
Result
#<CLANGRUNTIME {(c b) -> ((val_35), nil)}
val_2 = allocate(shape=(10, 10), stride=(10, 1), from=<Realized Buffer>);
val_9 = allocate(shape=(), stride=());
val_10 = load(val_9); // :value = C
val_15 = allocate(shape=(), stride=());
val_16 = load(val_15); // :value = C
val_17 = allocate(shape=(), stride=());
val_18 = load(val_17); // :value = B
val_22 = allocate(shape=(val_18, val_16), stride=(val_10, 1));
val_12 = allocate(shape=(), stride=());
val_13 = load(val_12); // :value = 10
val_14 = mul(val_13, val_10);
val_34 = allocate(shape=(val_18, val_16, 1, 10), stride=(val_14, 10, 10, 1));
val_34 = fused_sumnode_embedding73130(val_34, c, b, val_2, val_22); // JIT: <CLANG[FUSED_SUMNODE_EMBEDDING73130] : #<EXPR (3*(100*(b*c)))>FLOP>
val_35 = pause/backward(val_34);
>