Matrix Transposition indexing in DArray in CUDA

Abierto
#543 9 comentarios 0 reacciones 1 asignado Ver en GitHub

@jpsamaroo ya está trabajando en esto.

Desde el 19/7/2024.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

array interface bug

I was following along the https://github.com/jpsamaroo/DaggerWorkshop2024 and noticed that matrix transposition does not seem to work on NVIDIA GPUs for me.

Sorry if this is a bit brief, ask questions if there is something missing.

julia> scope
UnionScope:
  ExactScope: processor == CuArrayDeviceProc(worker 1, device 0, uuid b8c8a4da-6ec1-2a9e-fda1-1e5e12ba47f1)
Dagger.with_options(;scope) do
           # Allocated directly on the GPU
           DA = rand(AutoBlocks(), Float32, 64, 64)

           # Broadcast is GPU-compatible
           DB = DA .* 3f0

           # Matmul is no problem!
           DC = DB * DB'

           # Finally, any map-reduce algorithm is easy enough
           # sum(DC; dims=1)
       end

The error is

ERROR: DTaskFailedException:
  Root Exception Type: ErrorException
  Root Exception:
Scalar indexing is disallowed.
Invocation of getindex resulted in scalar indexing of a GPU array.
This is typically caused by calling an iterating implementation of a method.
Such implementations *do not* execute on the GPU, but very slowly on the CPU,
and therefore should be avoided.

If you want to allow scalar iteration, use `allowscalar` or `@allowscalar`
to enable scalar iteration globally or for the operations in question.
Stacktrace:
Julia Version 1.11.0-rc1
Commit 3a35aec36d1 (2024-06-25 10:23 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 20 × Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, skylake)
Threads: 20 default, 0 interactive, 10 GC (on 20 virtual cores)
Environment:
  JULIA_DEBUG =
⌃ [052768ef] CUDA v5.4.2
  [d58978e5] Dagger v0.18.12 `https://github.com/JuliaParallel/Dagger.jl.git#jps/workshop-2024`
  [68e73e28] DaggerGPU v0.2.0 `https://github.com/JuliaGPU/DaggerGPU.jl.git#master`

PS: Thanks for the talk and enjoy the conference @jpsamaroo

Lenguaje dominante
Julia
Estrellas
734
Forks
94
Merge medio
4 d 18 h
PR fusionados (30 d)
2

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de JuliaParallel/Dagger.jl

Todos los issues de JuliaParallel/Dagger.jl

Issues similares

Más issues de Julia

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.