Loading...
Searching...
No Matches
EmulateFloat16Math.h
Go to the documentation of this file.
#ifndef HALIDE_EMULATE_FLOAT16_MATH_H
#define HALIDE_EMULATE_FLOAT16_MATH_H
/** \file
* Methods for dealing with float16 arithmetic using float32 math, by
* casting back and forth with bit tricks.
*/
#include "IR.h"
namespace Halide {
namespace Internal {
/** Check if a call is a float16 transcendental (e.g. sqrt_f16) */
bool is_float16_transcendental(const Call *);
/** Implement a float16 transcendental using the float32 equivalent. */
Expr lower_float16_transcendental_to_float32_equivalent(const Call *);
/** Cast to/from float and bfloat using bitwise math. */
//@{
Expr float32_to_bfloat16(Expr e);
Expr float32_to_float16(Expr e);
Expr float16_to_float32(Expr e);
Expr bfloat16_to_float32(Expr e);
Expr lower_float16_cast(const Cast *op);
//@}
} // namespace Internal
} // namespace Halide
#endif
IR.h
Subtypes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt).
Halide::Internal
Definition AbstractGenerator.h:24
Halide::Internal::float16_to_float32
Expr float16_to_float32(Expr e)
Halide::Internal::lower_float16_transcendental_to_float32_equivalent
Expr lower_float16_transcendental_to_float32_equivalent(const Call *)
Implement a float16 transcendental using the float32 equivalent.
Halide::Internal::lower_float16_cast
Expr lower_float16_cast(const Cast *op)
Halide::Internal::float32_to_bfloat16
Expr float32_to_bfloat16(Expr e)
Cast to/from float and bfloat using bitwise math.
Halide::Internal::is_float16_transcendental
bool is_float16_transcendental(const Call *)
Check if a call is a float16 transcendental (e.g.
Halide::Internal::float32_to_float16
Expr float32_to_float16(Expr e)
Halide::Internal::bfloat16_to_float32
Expr bfloat16_to_float32(Expr e)
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition AbstractGenerator.h:19
Halide::Expr
A fragment of Halide syntax.
Definition Expr.h:258
Halide::Internal::Call
A function call.
Definition IR.h:490
Halide::Internal::Cast
The actual IR nodes begin here.
Definition IR.h:30