-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Ok, I'm going to be honest, I cannot create a MWE for this, but I can provide a replicator. I'm not expecting this issue to be fixed soon, but I wanted to make a note of it in the case other people have the same issue.
Basically, when running some pieces of code on AMDGPU, I am kicked out of the REPL and given the error:
error: ran out of registers during register allocation
My replicator is a bit messy and involves running a few different packages together:
- Fable (an animation engine)
- LolliPeople (a specific set of shapes that resembles a lollipop / person)
- Backgrounds (A package with specific backgrounds for certain animations)
Here is my step-by-step replicator for my 6700XT:
git clone [email protected]:leios/Fable.jl.git
git clone [email protected]:leios/Fableios.git
cd Fable.jl
git fetch origin bounds_issue
git checkout bounds_issue
cd ../Fableios
git fetch origin bounds_issue
git checkout bounds_issue
cd Backgrounds.jl
julia --project
] # To enter Pkg mode
dev ../LolliPeople.jl
dev ../../Fable.jl
Bkspace # To leave Pkg mode
using AMDGPU, Backgrounds
include("examples/crowd.jl")
crowd_example(1000, 1000; ArrayType = ROCArray)
error: ran out of registers during register allocation
Note that @vchuravy and I looked into this a while ago and found that things worked by running Julia in --bounds-check=no
mode and also adding in an unsafe ceil operation:
unsafe_ceil(T, x) = Base.unsafe_trunc(T, round(x, RoundUp))
I am about to make a bunch of changes to force the @inbounds
in other areas of Fable to try to get rid of this issue without the --bounds-check=no
option. Again, this might have been "my fault" for missing a few @inbounds
here and there, but I figured I should document the error somewhere and let people know it's vaguely correlated to bounds checking.