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

vecelement test fails on Zen4 #53683

Closed
Keno opened this issue Mar 9, 2024 · 4 comments · Fixed by #53748
Closed

vecelement test fails on Zen4 #53683

Keno opened this issue Mar 9, 2024 · 4 comments · Fixed by #53748
Assignees
Milestone

Comments

@Keno
Copy link
Member

Keno commented Mar 9, 2024

keno@demeter1:~/julia$ make test-vecelement 
Whitespace check found no issues.
    JULIA test/vecelement
Running parallel tests with:
  getpid() = 1386043
  nworkers() = 1
  nthreads() = 1
  Sys.CPU_THREADS = 64
  Sys.total_memory() = 755.645 GiB
  Sys.free_memory() = 745.864 GiB

Test   (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
vecelement  (1) |        started at 2024-03-09T23:02:36.957

[1386043] signal 11 (128): Segmentation fault
in expression starting at /home/keno/julia/test/vecelement.jl:113
f20961 at /home/keno/julia/test/vecelement.jl:0
unknown function (ip: 0x7fdd57964b4f)
jl_apply at /home/keno/julia/src/julia.h:2166 [inlined]
do_call at /home/keno/julia/src/interpreter.c:126
eval_value at /home/keno/julia/src/interpreter.c:223
eval_body at /home/keno/julia/src/interpreter.c:560
jl_interpret_toplevel_thunk at /home/keno/julia/src/interpreter.c:815
jl_toplevel_eval_flex at /home/keno/julia/src/toplevel.c:943
jl_toplevel_eval_flex at /home/keno/julia/src/toplevel.c:886
ijl_toplevel_eval_in at /home/keno/julia/src/toplevel.c:994
eval at ./boot.jl:428 [inlined]
include_string at ./loading.jl:2249
_include at ./loading.jl:2309
include at ./Base.jl:556 [inlined]

Since it's not failing on CI, I'm assuming it's microarchitecture specific. My hardware is:

processor	: 63
vendor_id	: AuthenticAMD
cpu family	: 25
model		: 17
model name	: AMD EPYC 9354 32-Core Processor
stepping	: 1
microcode	: 0xa10113e
cpu MHz		: 1500.000
cache size	: 1024 KB

Bisect says:

8db129472ea88a9c5c4a6e94dff7b330723aed28 is the first bad commit
commit 8db129472ea88a9c5c4a6e94dff7b330723aed28
Author: Jameson Nash <vtjnash@gmail.com>
Date:   Sun Feb 4 19:51:02 2024 -0500

    add atomic operators for globals, memory, and setonce (#52868)
@Keno Keno added this to the 1.11 milestone Mar 9, 2024
@Seelengrab
Copy link
Contributor

Seelengrab commented Mar 11, 2024

I can reproduce this on

processor	: 23
vendor_id	: AuthenticAMD
cpu family	: 25
model		: 97
model name	: AMD Ryzen 9 7900X 12-Core Processor
stepping	: 2
microcode	: 0xa601203
cpu MHz		: 1199.193
cache size	: 1024 KB

@vtjnash
Copy link
Member

vtjnash commented Mar 11, 2024

Seems to be a regression of #21980

julia> let T = Float64, N = 5
           a = ntuple(i -> VecElement(T(i)), N)
           @show Base.datatype_layoutsize(typeof(a))
           @show Base.datatype_alignment(typeof(a))
           @show Base.datatype_layoutsize(Memory{typeof(a)})
           @show Base.datatype_alignment(Memory{typeof(a)})
       end

Base.datatype_layoutsize(typeof(a)) = 64
Base.datatype_alignment(typeof(a)) = 64
Base.datatype_layoutsize(Memory{typeof(a)}) = 64
Base.datatype_alignment(Memory{typeof(a)}) = 64

The alignment of 64 exceeds what Julia can provide, so this should not be permitted to construct this vector type, as LLVM will try to over-align it

@gbaraldi
Copy link
Member

Should we box the vecelements then?

@vchuravy
Copy link
Member

Proper long-term fix is something along the lines of #21959 and #22649

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

Successfully merging a pull request may close this issue.

5 participants