SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
Macros
SIMD Floating Point Precision Conversions

Use these macros to portably convert between vectors of single-precision and half-precision floats, instead of directly calling the FP16 library functions or the manual asm implementations. Depending on the compilation mode (e.g. native vs gem5 vs LLVM-Tracer) and hardware support, different underlying implementations will be selected. More...

Macros

#define _CVT_PS_PH_128(p4_fp32_data, rounding_mode)   _SW_CVT_PS_PH_128(p4_fp32_data, rounding_mode)
 
#define _CVT_PH_PS_128(p4_fp16_data)   _SW_CVT_PH_PS_128(p4_fp16_data)
 
#define _CVT_PS_PH_256(p8_fp32_data, rounding_mode)   _SW_CVT_PS_PH_256(p8_fp32_data, rounding_mode)
 
#define _CVT_PH_PS_256(p8_fp16_data)   _SW_CVT_PH_PS_256(p8_fp16_data)
 

Detailed Description

Use these macros to portably convert between vectors of single-precision and half-precision floats, instead of directly calling the FP16 library functions or the manual asm implementations. Depending on the compilation mode (e.g. native vs gem5 vs LLVM-Tracer) and hardware support, different underlying implementations will be selected.

_CVT_PS_PH_128: Convert 4-wide vectors from single to half precision. _CVT_PH_PS_128: Convert 4-wide vectors from half to single precision. _CVT_PS_PH_256: Convert 8-wide vectors from single to half precision. _CVT_PH_PS_256: Convert 8-wide vectors from half to single precision.