-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RFC] Add support for int2 in StableHLO (#2403)
To be shared to OpenXLA Discuss shortly. --------- Co-authored-by: Sergei Lebedev <[email protected]>
- Loading branch information
1 parent
aad3d9d
commit 2066701
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# FP8 in StableHLO | ||
|
||
Status: In review<br/> | ||
Initial version: 06/20/2024<br/> | ||
Last updated: 06/20/2024<br/> | ||
|
||
## Introduction | ||
|
||
Sub-byte integer types are commonly used for model quantization. StableHLO | ||
currently supports signed and unsigned 4-bit integer types. Here we propose to | ||
extend the specification to cover 2-bit integer types as well. | ||
|
||
## Proposal | ||
|
||
Change the Types section of the spec to include si2 (signed 2-bit integer) and | ||
ui2 (unsigned 2-bit integer): | ||
|
||
```text | ||
SignedIntegerType ::= 'si2' | 'si4' | 'si8' | 'si16' | 'si32' | 'si64' | ||
UnsignedIntegerType ::= 'ui2' | 'ui4' | 'ui8' | 'ui16' | 'ui32' | 'ui64' | ||
``` | ||
|
||
Add 2 to the list of supported bit width for integer types | ||
|
||
```text | ||
Integer types can be either signed (si) or unsigned (ui) and have one of the | ||
supported bit widths (2, 4, 8, 16, 32 or 64). | ||
``` |