Page MenuHomePhabricator

[mlir][sparse] Add support for complex.im and complex.re to the sparse compiler.
ClosedPublic

Authored by bixia on May 17 2022, 1:21 PM.

Diff Detail

Event Timeline

bixia created this revision.May 17 2022, 1:21 PM
Herald added a project: Restricted Project. · View Herald Transcript
bixia requested review of this revision.May 17 2022, 1:21 PM
aartbik accepted this revision.May 17 2022, 4:08 PM

Nice! Very fast. A few nits, but good to go.

mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
35

This is very nitpicky, but I would, as far as enum order goes, put these with the casts below, for example, right before kBitCast (since I see these as converting complex to float). Right now, they break the abs/ceil/floor/sqrt sequence a bit. If you agree, then make sure they appear at the same place in switches.

(note that it is more grouped by function, and less so alphabetically)

mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp
910

eltType?

also, we need to verify how (and if!) this interacts with vectorization

This revision is now accepted and ready to land.May 17 2022, 4:08 PM
bixia updated this revision to Diff 430206.May 17 2022, 4:40 PM
bixia marked 2 inline comments as done.

Relocated the new enum values.

mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
35

Moved the two enums to right before kBitCast, also reorder other places where they are used.