[PATCH] D79281: [mlir][DenseElementsAttr] Add support for ComplexType elements
Jacques Pienaar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 4 09:05:20 PDT 2020
jpienaar added inline comments.
================
Comment at: mlir/include/mlir/IR/Attributes.h:1057
+ /// Overload of the raw 'get' method that asserts that the given type is of
+ /// integer or floating-point type. This method is used to verify type
----------------
Comments need update?
================
Comment at: mlir/include/mlir/IR/Attributes.h:1133
+ /// Overload of the raw 'get' method that asserts that the given type is of
+ /// integer or floating-point type. This method is used to verify type
----------------
Same
================
Comment at: mlir/lib/IR/AttributeDetail.h:378
+ if (ComplexType complex = eltType.dyn_cast<ComplexType>())
+ return getDenseElementBitWidth(complex.getElementType()) * 2;
// FIXME(b/121118307): using 64 bits for BF16 because it is currently stored
----------------
This is a little bit weird. I see some use C64 to refer to 2x64 bit float complex number while XLA consider std::complex<float> as C64 (so 64 is total). So seems the bitwidth is overloaded for complex already, as long as you document it this seems fine then as there doesn't seem to be 1 convention.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79281/new/
https://reviews.llvm.org/D79281
More information about the llvm-commits
mailing list