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

Add scatter for CUDA support #296

Closed
wants to merge 1 commit into from
Closed

Conversation

yuehhua
Copy link
Member

@yuehhua yuehhua commented Mar 15, 2021

No description provided.

@yuehhua
Copy link
Member Author

yuehhua commented Mar 17, 2021

I faced some issue while running into these error:

julia> using NNlibCUDA
[ Info: Precompiling NNlibCUDA [a00861dc-f156-4864-bf3c-e6376f28a68d]
ERROR: LoadError: ArgumentError: Package CompilerSupportLibraries_jll does not have JLLWrappers in its dependencies:
- If you have CompilerSupportLibraries_jll checked out for development and have
  added JLLWrappers as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with CompilerSupportLibraries_jll

It doesn't resolve when I execute ]resolve

Any idea?

c.c.: @CarloLucibello

1 => cu([3 3 4 4 5;
5 5 6 6 7]),
)
srcs = Dict(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we represent them like for loops with multiple iterators?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put key for the testing arrays because it indicates which test case is being tested. It can surely be simplified into for loops with arrays. But, do developers need to know the test case and their corresponding values?

@CarloLucibello
Copy link
Member

Try with

] add CUDA#master

@yuehhua
Copy link
Member Author

yuehhua commented Mar 17, 2021

@CarloLucibello I tried CUDA#master, but it remains the same error.

@CarloLucibello
Copy link
Member

Also need Julia 1.6

@yuehhua
Copy link
Member Author

yuehhua commented Mar 22, 2021

Sorry, using v1.6 and CUDA#master still cannot resolve the error.

@CarloLucibello
Copy link
Member

@yuehhua I can't reproduce your problem. For me moving to the lib/NNlibCUDA directory, opening julia 1.6, ] activate ., ] add CUDA#master, and using NNlibbCUA` works fine

@yuehhua
Copy link
Member Author

yuehhua commented Mar 23, 2021

It seems that there are some pre-compiling errors in my side.

[yuehhua@yuehhua-GL65 NNlib.jl]$ cd lib/NNlibCUDA/
[yuehhua@yuehhua-GL65 NNlibCUDA]$ julia-1.6.0 --proj
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.0-rc3 (2021-03-16)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(NNlibCUDA) pkg> up
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaGPU/CUDA.jl.git`
    Updating `/media/yuehhua/Workbench/workspace/NNlib.jl/lib/NNlibCUDA/Project.toml`
  [052768ef] ~ CUDA v2.6.0 `https://github.com/JuliaGPU/CUDA.jl.git#master` ⇒ v2.6.0 `https://github.com/JuliaGPU/CUDA.jl.git#master`
    Updating `/media/yuehhua/Workbench/workspace/NNlib.jl/lib/NNlibCUDA/Manifest.toml`
  [052768ef] ~ CUDA v2.6.0 `https://github.com/JuliaGPU/CUDA.jl.git#master`  v2.6.0 `https://github.com/JuliaGPU/CUDA.jl.git#master`
Precompiling project...
  Progress [========================================>]  18/18
  ✗ MbedTLS_jll
  ✗ Zlib_jll
  ✗ CompilerSupportLibraries_jll
  ✗ CUDA
  ✗ NNlibCUDA
13 dependencies successfully precompiled in 18 seconds (10 already precompiled)
5 dependencies errored

@CarloLucibello
Copy link
Member

I can reproduce now. Seems to be due to some problem in CUDA.jl, I filed an issue JuliaGPU/CUDA.jl#787

@CarloLucibello
Copy link
Member

CarloLucibello commented Mar 25, 2021

So not a bug, you just need

(NNlibCUDA) pkg> add GPUCompiler#master, GPUArrays#master, LLVM#master

@CarloLucibello
Copy link
Member

I merged #306, so things should be fine if you rebase on master and use NNlibCUDA's manifest.

@CarloLucibello
Copy link
Member

based on the buildkite run, it seems that some of the gpu tests fail because they fallback to NNlib's scatter implementation

@yuehhua yuehhua force-pushed the scatter-cuda branch 2 times, most recently from 787fe7b to 294ee92 Compare March 30, 2021 15:51
try to unify the scatter API

add const MAX_THREADS and correct dynamic call atomic functions
@yuehhua
Copy link
Member Author

yuehhua commented Apr 12, 2021

Current PR has been moved to FluxML/NNlibCUDA.jl#1, so close this one.

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 this pull request may close these issues.

3 participants