You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What can be done is implementing an elementwise template that would be used like this:
elementwise:
let out_of_place = alpha * A +exp(B) + beta *sin(C)
in_place +=sin(A) +exp(A +1) + C
operations and scalar will be automatically applied element-wise to Tensors
This would allow a nicer syntax than explicit broadcasting for some functions like sigmoid
Arraymancer can leverage the nim compiler and term-rewriting macros to automatically detect operations that can be fused.
This is probably similar to what Tensorflow is doing with their XLA compiler.
See: https://developers.googleblog.com/2017/03/xla-tensorflow-compiled.html
and the overview.
A term-rewriting example is already included with fusing toTensor + reshape operations:
Arraymancer/src/arraymancer/term_rewriting.nim
Lines 40 to 45 in 05e2f41
The text was updated successfully, but these errors were encountered: