AI Engine-ML v2 Intrinsics User Guide  v2025.1
Loading...
Searching...
No Matches
Vector nonlinear functions

Functions

v16bfloat16 exp2 (v16accfloat a)
 Base 2 exponential (fp32)
 
v16bfloat16 exp2 (v16float a)
 
v32bfloat16 exp2 (v32accfloat a)
 Base 2 exponential (fp32)
 
v32bfloat16 exp2 (v32float a)
 
v64bfloat16 exp2 (v64accfloat a)
 Base 2 exponential (fp32)
 
v64bfloat16 exp2 (v64float a)
 
v16accfloat exp2_bf20 (v16accfloat a)
 Base 2 exponential (bf16)
 
v16accfloat exp2_bf20 (v16float a)
 
v32accfloat exp2_bf20 (v32accfloat a)
 Base 2 exponential (bf16)
 
v32accfloat exp2_bf20 (v32float a)
 
v64accfloat exp2_bf20 (v64accfloat a)
 Base 2 exponential (bf16)
 
v64accfloat exp2_bf20 (v64float a)
 
v32bfloat16 tanh (v32accfloat a)
 Hyperbolic tangent.
 
v32bfloat16 tanh (v32float a)
 

Detailed Description

Function Documentation

◆ exp2() [1/6]

Base 2 exponential (fp32)

The exp2 function biased by 895 at the input side is approximated by this instruction. Logically the functionality can be devided in 2 steps. First, 895 is subtracted from the input. During this step, 11 fractional bits in respect to 895 are considered. The remaining bits in the 32-bit floating-point input are first truncated. Second, an approximation of the base 2 exponential function is applied.

Note
The VEXP2 instruction provides an approximation to exp2 and does not meet the IEEE precision requirements. Furthermore, it does not generate any floating-point events.
Parameters
aSingle precision vector floating-point input value
Returns
BF16 vector output result

◆ exp2() [2/6]

v16bfloat16 exp2 ( v16float a)

◆ exp2() [3/6]

Base 2 exponential (fp32)

The exp2 function biased by 895 at the input side is approximated by this instruction. Logically the functionality can be devided in 2 steps. First, 895 is subtracted from the input. During this step, 11 fractional bits in respect to 895 are considered. The remaining bits in the 32-bit floating-point input are first truncated. Second, an approximation of the base 2 exponential function is applied.v

Note
The VEXP2 instruction provides an approximation to exp2 and does not meet the IEEE precision requirements. Furthermore, it does not generate any floating-point events.
Parameters
aSingle precision vector floating-point input value
Returns
BF16 vector output result

◆ exp2() [4/6]

v32bfloat16 exp2 ( v32float a)

◆ exp2() [5/6]

Base 2 exponential (fp32)

The exp2 function biased by 895 at the input side is approximated by this instruction. Logically the functionality can be devided in 2 steps. First, 895 is subtracted from the input. During this step, 11 fractional bits in respect to 895 are considered. The remaining bits in the 32-bit floating-point input are first truncated. Second, an approximation of the base 2 exponential function is applied.

Note
The VEXP2 instruction provides an approximation to exp2 and does not meet the IEEE precision requirements. Furthermore, it does not generate any floating-point events.
Parameters
aSingle precision vector floating-point input value
Returns
BF16 vector output result

◆ exp2() [6/6]

v64bfloat16 exp2 ( v64float a)

◆ exp2_bf20() [1/6]

v16accfloat exp2_bf20 ( v16accfloat a)

Base 2 exponential (bf16)

The exp2 function biased by 895 at the input side is approximated by this instruction. Logically the functionality can be devided in 2 steps. First, 895 is subtracted from the input. During this step, 11 fractional bits in respect to 895 are considered. The remaining bits in the 32-bit floating-point input are first truncated. Second, an approximation of the base 2 exponential function is applied.

Note
The VEXP2 instruction provides an approximation to exp2 and does not meet the IEEE precision requirements. Furthermore, it does not generate any floating-point events.
Parameters
aSingle precision vector floating-point input value
Returns
FP32 vector output result

◆ exp2_bf20() [2/6]

v16accfloat exp2_bf20 ( v16float a)

◆ exp2_bf20() [3/6]

v32accfloat exp2_bf20 ( v32accfloat a)

Base 2 exponential (bf16)

The exp2 function biased by 895 at the input side is approximated by this instruction. Logically the functionality can be devided in 2 steps. First, 895 is subtracted from the input. During this step, 11 fractional bits in respect to 895 are considered. The remaining bits in the 32-bit floating-point input are first truncated. Second, an approximation of the base 2 exponential function is applied.

Note
The VEXP2 instruction provides an approximation to exp2 and does not meet the IEEE precision requirements. Furthermore, it does not generate any floating-point events.
Parameters
aSingle precision vector floating-point input value
Returns
FP32 vector output result

◆ exp2_bf20() [4/6]

v32accfloat exp2_bf20 ( v32float a)

◆ exp2_bf20() [5/6]

v64accfloat exp2_bf20 ( v64accfloat a)

Base 2 exponential (bf16)

The exp2 function biased by 895 at the input side is approximated by this instruction. Logically the functionality can be devided in 2 steps. First, 895 is subtracted from the input. During this step, 11 fractional bits in respect to 895 are considered. The remaining bits in the 32-bit floating-point input are first truncated. Second, an approximation of the base 2 exponential function is applied.

Note
The VEXP2 instruction provides an approximation to exp2 and does not meet the IEEE precision requirements. Furthermore, it does not generate any floating-point events.
Parameters
aSingle precision vector floating-point input value
Returns
FP32 vector output result

◆ exp2_bf20() [6/6]

v64accfloat exp2_bf20 ( v64float a)

◆ tanh() [1/2]

Hyperbolic tangent.

For 16 slices, the 32-bit floating-point input is first truncated to bfloat16 and second an approximation of the hyperbolic tangent function is applied.

Note
The VTANH instruction provides an approximation to tanh and does not meet the IEEE precision requirements. Furthermore, it does not generate any floating-point events.
Parameters
aSingle precision vector floating-point input value
Returns
BF16 vector output result

◆ tanh() [2/2]

v32bfloat16 tanh ( v32float a)