Subject: [Cbor] I-D Action: draft-ietf-cbor-array-tags-06.txt

From: [email-masked]
Date: Wed, 14 Aug 2019 07:10:03 -0700

A New Internet-Draft is available from the on-line Internet-Drafts directories.
This draft is a work item of the Concise Binary Object Representation Maintenance and Extensions WG of the IETF.

        Title           : Concise Binary Object Representation (CBOR) Tags for Typed Arrays
        Author          : Carsten Bormann
	Filename        : draft-ietf-cbor-array-tags-06.txt
	Pages           : 15
	Date            : 2019-08-14

Abstract:
   The Concise Binary Object Representation (CBOR, RFC 7049) is a data
   format whose design goals include the possibility of extremely small
   code size, fairly small message size, and extensibility without the
   need for version negotiation.

   The present document makes use of this extensibility to define a
   number of CBOR tags for typed arrays of numeric data, as well as two
   additional tags for multi-dimensional and homogeneous arrays.  It is
   intended as the reference document for the IANA registration of the
   CBOR tags defined.

The IETF datatracker status page for this draft is:
https://datatracker.ietf.org/doc/draft-ietf-cbor-array-tags/

There are also htmlized versions available at:
https://tools.ietf.org/html/draft-ietf-cbor-array-tags-06
https://datatracker.ietf.org/doc/html/draft-ietf-cbor-array-tags-06

A diff from the previous version is available at:
https://www.ietf.org/rfcdiff?url2=draft-ietf-cbor-array-tags-06

Please note that it may take a couple of minutes from the time of submission
until the htmlized version and diff are available at tools.ietf.org.

Internet-Drafts are also available by anonymous FTP at:
ftp://ftp.ietf.org/internet-drafts/

---

From: Thiago Macieira <[email-masked]>
Date: Wed, 14 Aug 2019 08:01:39 -0700

>    intended as the reference document for the IANA registration of the

I'm missing the ability to tell a binary16 floating point ("half float") from 
the truncated binary32 float ("bfloat16"). Those have become relevant in the 
AI and machine learning industries to the point of specialised instructions 
for them coming to CPU processors. 

One idea would be to use the sign bit with binary16 to indicate that it's a 
bfloat16 instead. That would make tags 88 and 92 be used
	0x40[constant] + 0x10[float] + 0x8[sign] = 0x58 = 88
	0x40[constant] + 0x10[float] + 0x8[sign] + 0x4[endian] = 0x5c = 92

If we add 89-91 as reserved, that means the table will be allocating 29 
entries, plus tags 40 and 41 in the 1-byte range.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products