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

Wrong Core.Intrinsics.have_fma(Float16) test #57783

Open
giordano opened this issue Mar 15, 2025 · 0 comments
Open

Wrong Core.Intrinsics.have_fma(Float16) test #57783

giordano opened this issue Mar 15, 2025 · 0 comments
Labels

Comments

@giordano
Copy link
Contributor

giordano commented Mar 15, 2025

This is a known issue, but there's no open ticket about it, so here we go: Core.Intrinsics.have_fma(Float16) always returns false also on hardware which natively supports this datatype:

julia/src/runtime_intrinsics.c

Lines 1759 to 1768 in a5abb6f

JL_DLLEXPORT jl_value_t *jl_have_fma(jl_value_t *typ)
{
JL_TYPECHK(have_fma, datatype, typ); // TODO what about float16/bfloat16?
if (typ == (jl_value_t*)jl_float32_type)
return jl_cpu_has_fma(32);
else if (typ == (jl_value_t*)jl_float64_type)
return jl_cpu_has_fma(64);
else
return jl_false;
}
The funny result is that, unlike fma, muladd actually uses half-precision fmadd instructions on hardware with native fp16: #57041 (comment)

This issue should hopefully be addressed by #57049.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant