This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv][complex] Convert complex ops to SPIR-V ops
ClosedPublic

Authored by antiagainst on Mar 29 2023, 6:02 PM.

Details

Summary

This commit adds conversion from complex construction and
extraction ops to SPIR-V. Other arithemtic ops can be done
via ComplexToStandard patterns.

Diff Detail

Event Timeline

antiagainst created this revision.Mar 29 2023, 6:02 PM
antiagainst requested review of this revision.Mar 29 2023, 6:02 PM
kuhar accepted this revision.Mar 30 2023, 7:52 AM
kuhar added inline comments.
mlir/include/mlir/Conversion/Passes.td
231

I think this constructor should be auto generated if you omit this line

mlir/lib/Conversion/ComplexToSPIRV/ComplexToSPIRV.cpp
32

nit: public is redundant for structs. Also elsewhere below.

mlir/lib/Conversion/ComplexToSPIRV/ComplexToSPIRVPass.cpp
30–34

ubernit: why not define it inline?

This revision is now accepted and ready to land.Mar 30 2023, 7:52 AM
antiagainst marked 3 inline comments as done.

Address comments

kuhar accepted this revision.Mar 30 2023, 9:06 AM

Drop unnecessary headers for Bazel