Halide  12.0.1
Halide compiler and libraries
EmulateFloat16Math.h
Go to the documentation of this file.
1 #ifndef HALIDE_EMULATE_FLOAT16_MATH_H
2 #define HALIDE_EMULATE_FLOAT16_MATH_H
3 
4 /** \file
5  * Methods for dealing with float16 arithmetic using float32 math, by
6  * casting back and forth with bit tricks.
7  */
8 
9 #include "IR.h"
10 
11 namespace Halide {
12 namespace Internal {
13 
14 /** Check if a call is a float16 transcendental (e.g. sqrt_f16) */
16 
17 /** Implement a float16 transcendental using the float32 equivalent. */
19 
20 /** Cast to/from float and bfloat using bitwise math. */
21 //@{
27 //@}
28 
29 } // namespace Internal
30 } // namespace Halide
31 
32 #endif
Subtypes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
Expr float16_to_float32(Expr e)
Expr lower_float16_transcendental_to_float32_equivalent(const Call *)
Implement a float16 transcendental using the float32 equivalent.
Expr lower_float16_cast(const Cast *op)
Expr float32_to_bfloat16(Expr e)
Cast to/from float and bfloat using bitwise math.
bool is_float16_transcendental(const Call *)
Check if a call is a float16 transcendental (e.g.
Expr float32_to_float16(Expr e)
Expr bfloat16_to_float32(Expr e)
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.
A fragment of Halide syntax.
Definition: Expr.h:256
A function call.
Definition: IR.h:464
The actual IR nodes begin here.
Definition: IR.h:29