-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Can't sample random Core.BFloat16
#53651
Comments
`numsToZero` relies on being able to sample arbitrary `AbstractFloat` with `rand`, which seemingly isn't possible with the new `Core.BFloat16` introduced in JuliaLang/julia#51470. See JuliaLang/julia#53651 for the upstream issue tracking this. 1.11 also introduces `AnnotatedString`, which interacts badly with the local scope of `@testset` and trying to lazily `join` things that may degenerate in inference to `AbstractString`. The type assertion is a quick "fix", since other than moving `irb` outside of that scope, inference will continue to mess with the test, even though no `AnnotatedString` could ever actually be produced.
This is a type that doesn't have a full implementation in base, it's there to make sure codegen understands it in a packaged like https://github.com/JuliaMath/BFloat16s.jl |
It's a bit odd to me to define a type in Base that claims to be |
I'm going to close this ticket as the random sampling method is implemented in |
Core.BFloat16
was added as a newAbstractFloat
in #51470, but so far it doesn't seem possible to callrand(BFloat16)
:This was found in these nightly tests (CI log is here). I can mark that particular combination of arguments broken for now, but it would be cool to get this functionality at some point :)
I'm not 100% sure the label
float16
is correct. This is aboutBFloat16
after all, which is slightly different. Feel free to adjust as necessary!The text was updated successfully, but these errors were encountered: