HomePhabricator

Fix builder getFloatAttr of double to use F64 type and use fltSemantics in…

Authored by jpienaar on Dec 17 2018, 7:19 AM.

Description

Fix builder getFloatAttr of double to use F64 type and use fltSemantics in FloatAttr.

Store FloatAttr using more appropriate fltSemantics (mostly fixing up F32/F64 storage, F16/BF16 pending). Previously F32 type was used incorrectly for double (the storage was double). Also add query method that returns fltSemantics for IEEE fp types and use that to verify that the APfloat given matches the type:

  • FloatAttr created using APFloat is verified that the semantics of the type and APFloat matches;
  • FloatAttr created using double has the APFloat created to match the semantics of the type;

Change parsing of tensor negative splat element to pass in the element type expected. Misc other changes to account for the storage type matching the attribute.

PiperOrigin-RevId: 225821834

Details

Committed
jpienaarMar 29 2019, 2:29 PM
Parents
rG72159f5edebb: Free the name symbol in TableGen
Branches
Unknown
Tags
Unknown