stanford-ppl / spatial

Spatial: "Specify Parameterized Accelerators Through Inordinately Abstract Language"
https://spatial.stanford.edu
MIT License
271 stars 33 forks source link

Switch Transformer Potential Issue #297

Open mattfel1 opened 4 years ago

mattfel1 commented 4 years ago

Haven't thoroughly looked into this yet, but this seems to give the "used removed sym" error:

                 val a = if ((j & 1) == 0) M0(2 * k0 + k1 + 0) else N0(2 * k0 + k1 + 0))
                 val b = if ((j & 1) == 0) M0(2 * k0 + k1 + 1) else N0(2 * k0 + k1 + 1))
                 val c = if ((j & 1) == 0) M1(2 * k0 + k1 + 0) else N1(2 * k0 + k1 + 0))
                 val d = if ((j & 1) == 0) M1(2 * k0 + k1 + 1) else N1(2 * k0 + k1 + 1))

But if you use muxes instead, it works. Also it seems like this only happens with the --sim backend?