Matrix Transposition indexing in DArray in CUDA

オープン
#543 コメント 9 件 リアクション 0 件 担当者 1 名 GitHub で見る

@jpsamaroo がすでに取り組んでいます。

2024年7月19日 から。

評価

この issue はまだ評価されていません。

説明

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

主要言語
Julia
スター
734
フォーク
94
平均マージ
4日 18時間
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

JuliaParallel/Dagger.jl のほかの issue

JuliaParallel/Dagger.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。