FP16 and FP32 to FP8 Conversion Instructions for Faster AI Compute

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for converting FP16 or FP32 to FP8 formats are inefficient, particularly due to slow execution via int8/int16 instructions, which hinders performance in deep learning applications, and there is a need for hardware-assisted conversion to alleviate memory and bandwidth issues.

Innovation Solution

The implementation of instructions such as VCVTNEPH2BF8 and VCVTNEPS2BF8, which perform hardware-assisted conversion from FP16 or FP32 to FP8 using IEEE nearest even rounding, allowing for efficient conversion of packed floating-point data within a processor, thereby reducing the reliance on software and OS overhead.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If conversion is performed via int8/int16 instructions, then conversion can be achieved, but execution speed is slow

Engineering Contradiction:
Improveconversion speedVSAvoidexecution efficiency
Core Design Contradiction:
SpeedVSProductivity

Solution Approach 1:

The patent introduces new floating-point format parameters (FP8 with 1-5-2 or 1-4-3 configuration) and dedicated conversion instructions that operate directly on these formats, changing the data representation parameters to enable faster conversion compared to using integer instructions

Inventive Principle:
Principle #35Parameter changes

2Quantity of substance

If FP16/FP32 data is converted to FP8, then memory and bandwidth pressures are reduced, but conversion complexity increases

Engineering Contradiction:
Improvememory bandwidth pressureVSAvoidconversion hardware complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent segments the floating-point number into distinct components (sign bit, exponent bits, fraction bits) with specific allocations for FP8 format, allowing structured and efficient conversion by processing each segment separately through dedicated instruction sequences

Inventive Principle:
Principle #1Segmentation

3Speed

If hardware-assisted conversion is implemented, then conversion speed improves, but processor complexity increases

Engineering Contradiction:
Improveconversion speedVSAvoidprocessor complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent introduces intermediate conversion instructions (VCVTNEPH2BF8, VCVTNEPS2BF8, etc.) that serve as mediators between different floating-point formats, providing a standardized interface for conversion while abstracting the complex underlying hardware operations

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20240045677A1Instructions to convert from FP16 to FP8
Publication Date: 2024.02.08 INTEL CORP
  • US20240045677A1 patent drawing
  • US20240045677A1 patent drawing
  • US20240045677A1 patent drawing

AI summary

Techniques for converting FP16 or FP32 data elements to FP8 data elements using a single instruction are described. An exemplary apparatus includes decoder circuitry to decode a single instruction, the single instruction to include a one or more fields to identify a source operand, one or more fields to identify a destination operand, and one or more fields for an opcode, the opcode to indicate that execution circuitry is to convert packed half-precision floating-point data or single-precision floating point data from the identified source to packed FP8 data and store the packed bfloat8 data into corresponding data element positions of the identified destination operand; and execution circuitry to execute the decoded instruction according to the opcode to convert packed half-precision floating-point data or single-precision floating point data from the identified source to packed bfloat8 data and store the packed bfloat8 data into corresponding data element positions.