JuliaSIMD / JuliaSIMD/LoopVectorization.jl
Division by Inf is sometimes producing NaN's
- Lingua principale
- Julia
- Stelle
- 789
- Fork
- 73
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
This problem does not occur on my laptop, just a cluster I am using. On the cluster
```
julia> versioninfo()
Julia Version 1.11.1
Commit 8f5b7ca12ad (2024-10-16 10:53 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 36 × Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
WORD_SIZE: 64
LLVM: libLLVM-16.0.6 (ORCJIT, skylake-avx512)
Threads: 1 default, 0 interactive, 1 GC (on 36 virtual cores)
```
If I do the following
```
using LoopVectorization
x = ones(32) * Inf
y = similar(x)
@turbo for ix in eachindex(x)
y[ix] = 1 / x[ix]
end
```
Then the `y` vector is
```
julia> y
32-element Vector{Float64}:
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
```
I was expecting that all the elements of `y` would be zero.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start by running the reported LoopVectorization reproducer with Julia 1.11.1 on Linux x86_64 and the listed Skylake-AVX512 CPU. Compare the scalar division with the @turbo loop and investigate why only some vector lanes produce NaN for 1 / Inf. Done means the reproducer produces zero for every element of y.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- julia
- Ambito
- compilers, performance
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100