[mlir] Fix representation of BF16 constants
authorDiego Caballero <diego.caballero@intel.com>
Sat, 6 Jun 2020 00:29:56 +0000 (17:29 -0700)
committerDiego Caballero <diego.caballero@intel.com>
Sat, 6 Jun 2020 00:43:06 +0000 (17:43 -0700)
commit7d59f49bdaddf053d74de9ef57c7ec64bdf4fa25
tree2a99abe7213e2d7279d9b368e002fe58f34523dc
parent1fa43e0b34d9736f62c6c1b6c371a5e39cd1624d
[mlir] Fix representation of BF16 constants

This patch is a follow-up on https://reviews.llvm.org/D81127

BF16 constants were represented as 64-bit floating point values due to the lack
of support for BF16 in APFloat. APFloat was recently extended to support
BF16 so this patch is fixing the BF16 constant representation to be 16-bit.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D81218
mlir/lib/IR/AttributeDetail.h
mlir/lib/IR/StandardTypes.cpp
mlir/lib/Parser/Parser.cpp
mlir/test/IR/dense-elements-hex.mlir
mlir/test/IR/parser.mlir
mlir/test/Target/llvmir.mlir
mlir/unittests/IR/AttributeTest.cpp