Skip to content

StackOverflow Error on get_backend(cu(rand(3))) #366

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
maxfreu opened this issue Mar 13, 2023 · 7 comments
Open

StackOverflow Error on get_backend(cu(rand(3))) #366

maxfreu opened this issue Mar 13, 2023 · 7 comments

Comments

@maxfreu
Copy link

maxfreu commented Mar 13, 2023

Hi! I just tried to get the backend of a CuArray as follows, which causes a stack overflow. Am I using it correctly?

using CUDA
using KernelAbstractions
get_backend(cu(rand(3)))

ERROR: StackOverflowError:
Stacktrace:
 [1] get_backend(A::CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}) (repeats 79984 times)
   @ KernelAbstractions ~/.julia/packages/KernelAbstractions/I7qXs/src/KernelAbstractions.jl:355

Julia 1.8.0
CUDA 4.0.1
KernelAbstractions 0.9.0

@vchuravy
Copy link
Member

You need to be on JuliaGPU/CUDA.jl#1772

@leios
Copy link
Contributor

leios commented Mar 15, 2023

Stupid question, but get_backend(roc(rand(3))) also errors, is there a similar AMDGPU PR or does it need to be made?

@pxl-th
Copy link
Member

pxl-th commented Mar 15, 2023

Stupid question, but get_backend(roc(rand(3))) also errors, is there a similar AMDGPU PR or does it need to be made?

It needs to be made. But first, this PR needs to be completed: JuliaGPU/AMDGPU.jl#374.
I plan to take a look at it later this week

@leios
Copy link
Contributor

leios commented Mar 15, 2023

Another stupid question, is KA broken for AMDGPU right now? I cannot seem to launch kernels off of ROCDevice()s anymore... I can just work on an older version of KA for now until the AMDGPU PR is merged

@pxl-th
Copy link
Member

pxl-th commented Mar 15, 2023

I think for KA 0.9 yes. But 0.8 works fine

@leios
Copy link
Contributor

leios commented Mar 15, 2023

Great! I'll stick with 0.8 for a bit then. Sorry to divert the thread!

@vchuravy
Copy link
Member

AMDGPU support for KA 0.9 JuliaGPU/AMDGPU.jl#398

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

No branches or pull requests

4 participants