Skip to content

Commit

Permalink
Fix affine data copy generation corner cases/bugs
Browse files Browse the repository at this point in the history
- the [begin, end) range identified for copying could end in between the
  block, which makes hoisting invalid in some cases. Change the range
  identification to always end with end of block.

- add test case to exercise these (with fast mem capacity set to minimal so
  that single element memref buffers are generated at the innermost loop)

- the location of begin/end of the block range for data copying was
  being confused with the insert points for copy in and copy out code.
  In cases, where we choose to hoist transfers, these are separate.

- when copy loops are single iteration ones, promote their bodies at
  the end of the pass.

- change default fast mem space to 1 (setting it to zero made it
  generate DMA op's that won't verify in the default case - since the
  DMA ops have a check for src/dest memref spaces being different).

Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
Co-Authored-By: Mehdi Amini <joker.eph@gmail.com>

Closes tensorflow/mlir#88

COPYBARA_INTEGRATE_REVIEW=tensorflow/mlir#88 from bondhugula:datacopy 88697267c45e850c3ced87671e16e4a930c02a42
PiperOrigin-RevId: 266980911
  • Loading branch information
bondhugula authored and tensorflower-gardener committed Sep 3, 2019
1 parent 2a55998 commit b1ef9dc
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 80 deletions.

0 comments on commit b1ef9dc

Please sign in to comment.