FP16 to FP8 Conversion via Per-Element Bias Instructions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current technologies lack efficient instructions for converting between FP16 and FP32 formats to FP8 formats using biased rounding with per-element bias, leading to performance bottlenecks and memory utilization issues in deep learning applications.

Innovation Solution

The introduction of instructions such as VCVTBIAS2PH2BF8 and VCVTBIAS2PH2HF8 allows for the conversion of FP16 and FP32 values to FP8 values using a bias term for rounding, enabling hardware-assisted conversion and reducing the need for software-based detours through int8/int16 instructions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If software-based detours through int8/int16 instructions are used for FP16 to FP8 conversion, then conversion functionality is achieved, but execution speed deteriorates and memory utilization increases

Engineering Contradiction:
Improveexecution speedVSAvoidconversion process complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent extracts the conversion functionality from software-based detours and implements it through dedicated hardware instructions (VCVTBIAS2PH2BF8/VCVTBIAS2PH2HF8). This removes the need for complex software workarounds involving int8/int16 instructions, directly achieving fast FP16-to-FP8 conversion with per-element bias in a single hardware operation.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces bias terms as an intermediary mechanism to enable accurate conversion from FP16 to FP8 formats. The bias terms are stored in destination registers and applied during the conversion process, allowing precise control over the rounding behavior while maintaining efficient hardware execution.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If FP16 to FP8 conversion is performed using existing hardware instructions, then conversion speed is improved, but conversion precision and control flexibility deteriorate

Engineering Contradiction:
Improveconversion precisionVSAvoidconversion speed
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent applies local quality by implementing per-element bias control in the conversion process. Each element in the vector can have its own bias term applied during conversion, allowing precise control over the rounding behavior for each individual element while maintaining efficient vector-level hardware execution.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent changes the conversion parameters by introducing bias terms that can be dynamically adjusted. The bias values are stored in destination registers and can be modified to control the rounding behavior, enabling precise conversion control while maintaining fast hardware execution through parameter adjustment rather than complex computational sequences.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20240045684A1Instructions to convert from FP16 to FP8
Publication Date: 2024.02.08 INTEL CORP
  • US20240045684A1 patent drawing
  • US20240045684A1 patent drawing
  • US20240045684A1 patent drawing

AI summary

Techniques for converting FP16 to BF8 using bias are described. An example embodiment utilizes decoder circuitry to decode a single instruction, the single instruction to include one or more fields to identify a first source operand, one or more fields to identify a second source operand, one or more fields to identify a source/destination operand, and one or more fields for an opcode, wherein the opcode is to indicate that execution circuitry is to convert packed half-precision data from the identified first and second sources to packed FP8 data using bias terms from the identified source/destination operand and store the packed FP8 data into corresponding data element positions of the identified source/destination operand; and execution circuitry to execute the decoded instruction according to the opcode to convert packed half-precision data from the identified first and second sources to packed FP8 data using bias terms from the identified source/destination operand and store the packed FP8 data into corresponding data element positions of the identified source/destination operand.