Skip to content
Commit 206be96e authored by Alex Zinenko's avatar Alex Zinenko Committed by A. Unique TensorFlower
Browse files

Support hexadecimal floats in tensor literals

Extend the recently introduced support for hexadecimal float literals to tensor
literals, which may also contain special floating point values such as
infinities and NaNs.

Modify TensorLiteralParser to store the list of tokens representing values
until the type is parsed instead of trying to guess the tensor element type
from the token kinds (hexadecimal values can be either integers or floats, and
can be mixed with both).  Maintain the error reports as close as possible to
the existing implementation to avoid disturbing the tests.  They can be
improved in a separate clean-up if deemed necessary.

PiperOrigin-RevId: 260794716
parent 1de519a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment