Add support for broadcasting semantics for binops.
We add broadcasting support for add, sub, mul and equal. The broadcasting semantics are specified here https://numpy.org/doc/stable/user/basics.broadcasting.html Say we are given input A (4d array): 8 x 1 x 6 x 1 B (3d array): 7 x 1 x 5 We generate a loop with Result (4d array): 8 x 7 x 6 x 5 for i0=[0:8] for i1=[0:7] for i2=[0:6] for i3=[0:8] Result[i0][i1][i2][i3] = A[i0][0][i2][0] {+,*,-,==} B[i1][0][i3]
Showing
- Athos/SeeDot/IR/IRBuilderCSF.py 177 additions, 59 deletionsAthos/SeeDot/IR/IRBuilderCSF.py
- Athos/SeeDot/IR/IRUtil.py 55 additions, 0 deletionsAthos/SeeDot/IR/IRUtil.py
- Athos/SeeDot/Type.py 10 additions, 42 deletionsAthos/SeeDot/Type.py
- Athos/SeeDot/Util.py 61 additions, 0 deletionsAthos/SeeDot/Util.py
Loading
Please register or sign in to comment