This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] run more integration tests with and without SIMD
ClosedPublic

Authored by aartbik on Nov 4 2021, 10:51 AM.

Diff Detail

Event Timeline

aartbik created this revision.Nov 4 2021, 10:51 AM
aartbik requested review of this revision.Nov 4 2021, 10:51 AM
wrengr added a comment.Nov 4 2021, 2:09 PM

A few questions (though none of them are blocking)

mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_cast.mlir
16

Why the removal of enable-simd-index32? Doesn't seem to fit with the rest of the differential

mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_flatten.mlir
5–19

Why the addition of --lower-affine? For correctness or performance?

6–18

Are we allowed to use shell for-loops here? If so, I think it'd be a lot clearer to do something like:

// RUN: for p in '' '="vectorization-strategy=2 vl=4"' ; do
// RUN: mlir-opt %s --sparsification${p} --sparse-tensor-conversion ...

rather than repeating everything with that one change. (That doesn't parse quite right due to how the runner quotes/evals things, but some variation of it ought to work I'd think.)

aartbik marked an inline comment as done.Nov 4 2021, 2:58 PM
aartbik added inline comments.
mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_flatten.mlir
5–19

For the vector case, it is needed for correctness, I add it to the scalar case for consistency.

6–18

Yeah, I was also thinking there should be better ways to do this. For now, I picked this since SIMD makes sense for some, but not all tests, so I added it where it makes sense. Also, at one point I want to move all those flags into one centralized play, so we do something like

mlir-opt ${SPARSE_FLAGS} ....

and that would encapsulate the SIMD/no-SIMD case. I will file a buganizer entry on that for follow-up!

aartbik marked an inline comment as done.Nov 4 2021, 3:03 PM

I filed https://bugs.llvm.org/show_bug.cgi?id=52409 for centralizing sparse compiler configs.

aartbik marked an inline comment as done.Nov 4 2021, 3:11 PM
aartbik added inline comments.
mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_cast.mlir
16

While here, I noticed that it does not makes sense, since we are not setting the bitwidth to anything < 64 in this test

aartbik updated this revision to Diff 385118.Nov 5 2021, 10:32 AM
aartbik marked an inline comment as done.

rebased with main

wrengr accepted this revision.Nov 5 2021, 12:41 PM
This revision is now accepted and ready to land.Nov 5 2021, 12:41 PM