This is an archive of the discontinued LLVM Phabricator instance.

[mlir][SparseTensor] Add a few more tests for sparse vectorization
ClosedPublic

Authored by qcolombet on Jan 10 2023, 3:48 AM.

Details

Summary

These tests cover muli, xor, and, addf, subf, and addi.

The tests themselves are not that interesting, their goal is to provide
code coverage for all the types of reductions currently supported.

NFC

Diff Detail

Event Timeline

qcolombet created this revision.Jan 10 2023, 3:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 10 2023, 3:48 AM
qcolombet requested review of this revision.Jan 10 2023, 3:48 AM
Peiming accepted this revision.Jan 10 2023, 9:11 AM
This revision is now accepted and ready to land.Jan 10 2023, 9:11 AM

Could you reformat the CHECK blocks so they don't have so much leading whitespace between the CHECK and the code?

mlir/test/Dialect/SparseTensor/vectorize_reduction.mlir
490

I'd add a newline before this, to separate it from the CHECK stuff. (Usually we don't have a blank line, but then usually we have the func.func op immediately after its corresponding CHECK stuff.)

563

ditto. (And ditto for the other tests to follow)

qcolombet updated this revision to Diff 488166.Jan 11 2023, 5:34 AM
  • Reduce leading whitespace between the CHECKs and the code.
  • Add a new line between the CHECK blocks and the input IR.

Could you reformat the CHECK blocks so they don't have so much leading whitespace between the CHECK and the code?

@wrengr Done!
Although I didn't remove all of them because I thought some made the checks more readable (the ones that comes from the block indentation). Let me know if you want these to be flattened.

(Note: the check lines were actually auto generated, so the formatting issue may pop back up if we ever auto update the tests.)

Block-level indenting is totally fine :)

This revision was landed with ongoing or failed builds.Jan 13 2023, 1:46 AM
This revision was automatically updated to reflect the committed changes.