Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds mappings for f16 variants of halide float math #8029

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/CodeGen_Metal_Dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,31 @@ void CodeGen_Metal_Dev::init_module() {
<< "#define tanh_f32 tanh\n"
<< "#define atanh_f32 atanh\n"
<< "#define fast_inverse_sqrt_f32 rsqrt\n"
<< "#define is_nan_f16 isnan\n"
<< "#define is_inf_f16 isinf\n"
<< "#define is_finite_f16 isfinite\n"
<< "#define sqrt_f16 sqrt\n"
<< "#define sin_f16 sin\n"
<< "#define cos_f16 cos\n"
<< "#define exp_f16 exp\n"
<< "#define log_f16 log\n"
<< "#define abs_f16 fabs\n"
<< "#define floor_f16 floor\n"
<< "#define ceil_f16 ceil\n"
<< "#define trunc_f16 trunc\n"
<< "#define pow_f16 pow\n"
<< "#define asin_f16 asin\n"
<< "#define acos_f16 acos\n"
<< "#define tan_f16 tan\n"
<< "#define atan_f16 atan\n"
<< "#define atan2_f16 atan2\n"
<< "#define sinh_f16 sinh\n"
<< "#define asinh_f16 asinh\n"
<< "#define cosh_f16 cosh\n"
<< "#define acosh_f16 acosh\n"
<< "#define tanh_f16 tanh\n"
<< "#define atanh_f16 atanh\n"
<< "#define fast_inverse_sqrt_f16 rsqrt\n"
// This is quite annoying: even though the MSL docs claim
// all versions of Metal support the same memory fence
// names, the truth is that 1.0 does not.
Expand Down