spatial-lang
spatial-lang copied to clipboard
Aligned load becomes unaligned load because of type conversion
Not sure whether this is a bug or feature. I was trying figure out why certain apps have unaligned loads/stores when tile size is a multiple of burst size. And it turns out to be the type conversion on loop indices mess up constant propagation in spatial.
For example in GEMM_Blocked,
a_sram load a_dram(ii+i, kk::kk.to[Index]+tileSize)
is a unaligned load while
a_sram load a_dram(ii+i, kk::kk+tileSize)
is a aligned load. because requestLength.s
in DRAMTransfersInternal
is not statically known. I would assume loop bound is already of type Index so .to[Index]
effectively should be a no op?