error: ran out of registers during register allocation
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 344
- Forks
- 79
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 25
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 git@github.com:leios/Fable.jl.git
git clone git@github.com: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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Fable.jl, Fableios, and Backgrounds.jl reproducer, using the listed branches and julia --project; run include("examples/crowd.jl") and crowd_example(1000, 1000; ArrayType = ROCArray). Compare behavior with --bounds-check=no and the shown unsafe_ceil workaround, but the issue does not define a specific completion condition beyond investigating the register-allocation failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100