-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Description
The set_zero_subnormals function is working fine for Float32/Float64 on x86 and ARM (aarch64) in Julia 1.6-rc3 but has no effect for Float16
julia> set_zero_subnormals(true)
true
julia> floatmin(Float64)/4
0.0
julia> floatmin(Float32)/4
0.0f0
julia> floatmin(Float16)/4
Float16(1.526e-5)This is an issue as a64fx (tested on Isambard and Fugaku) considerably slows down with subnormals:
julia> A = floatmin(Float16)*rand(Float16,1000,1000)
julia> B = floatmin(Float16)*rand(Float16,1000,1000)
julia> @btime +($A,$B);
7.116 ms (2 allocations: 1.91 MiB)compared to computations without subnormals
julia> A = rand(Float16,1000,1000)
julia> B = rand(Float16,1000,1000)
julia> @btime +($A,$B);
274.681 μs (2 allocations: 1.91 MiB)(@vchuravy I believe you've switched julia's Float16 to LLVM's half for 1.6?) @samhatfield
samhatfield
Metadata
Metadata
Assignees
Labels
No labels