JuliaGraphs / JuliaGraphs/GraphNeuralNetworks.jl
Error in getgraph when graph is on gpu
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 308
- Forks
- 74
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 2
Description
Running the following script
using Flux
using GraphNeuralNetworks
n = m = d = N = 10
g = Flux.batch([rand_graph(n, m, ndata=rand(d, n)) for i in 1:N])
getgraph(g, 1)
getgraph(g |> gpu, 1)
results in the following error message for the last call:
LoadError: GPU compilation of kernel broadcast_kernel(CUDA.CuKernelContext, CUDA.CuDeviceVector{Bool, 1}, Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(in), Tuple{Base.Broadcast.Extruded{CUDA.CuDeviceVector{Int64, 1}, Tuple{Bool}, Tuple{Int64}}, CUDA.CuRefValue{Vector{Int64}}}}, Int64) failed
KernelError: passing and using non-bitstype argument
Argument 4 to your kernel function is of type Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(in), Tuple{Base.Broadcast.Extruded{CUDA.CuDeviceVector{Int64, 1}, Tuple{Bool}, Tuple{Int64}}, CUDA.CuRefValue{Vector{Int64}}}}, which is not isbits:
.args is of type Tuple{Base.Broadcast.Extruded{CUDA.CuDeviceVector{Int64, 1}, Tuple{Bool}, Tuple{Int64}}, CUDA.CuRefValue{Vector{Int64}}} which is not isbits.
.2 is of type CUDA.CuRefValue{Vector{Int64}} which is not isbits.
.x is of type Vector{Int64} which is not isbits.
I am on Julia 1.7.2, Flux version 0.12.9 and GraphNeuralNetworks 0.3.14.
Edit: Also error with GNN 0.4.0 and Flux 0.13.0
Am I missing something?
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 by running the provided Julia script and compare getgraph(g, 1) with getgraph(g |> gpu, 1) using the reported package versions. Trace the getgraph entry point and the GPU broadcast shown in the error; done means the GPU call completes without the reported kernel compilation failure and existing behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100