SYCL batching causes invalid results
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず、提供された Julia の再現コードを oneAPI で実行し、最初の GPU 呼び出しの後に forward_network! を繰り返し実行して、Array(y_g) を CPU の結果と比較し、クラッシュを観察します。forward_layer が使用する oneArray 操作と繰り返し行われるアロケーションを追跡します。繰り返しの呼び出しがクラッシュせず、安定した正しい結果を生成すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hello, I am trying to run a simplified "forward" passage of a neural network with GPU.
On CUDA/CuArray I have always the same, correct results for my output, but with oneAPI/oneArray, the first time I have the correct result, but the subsequent times I have random results and random crashes (but never the first time).
Any clue ?
using Test, oneAPI, BenchmarkTools, LinearAlgebra
# Function definitions
relu(x) = max(0,x)
forward_layer(x,w,w0,f) = f.(w*x .+ w0)
function forward_network!(y,x,w1,w2,w3,w01,w02,w03,f=relu)
x1 = forward_layer(x,w1,w01,f)
x2 = forward_layer(x1,w2,w02,f)
y .= forward_layer(x2,w3,w03,identity)
return nothing
end
# CPU data
(nd0,nd1,nd2,ndy) = (200,300,300,1)
x = rand(Float32,nd0); y = Vector{Float32}(undef,ndy)
w1 = rand(Float32,nd1,nd0); w2 = rand(Float32,nd2,nd1); w3 = rand(Float32,ndy,nd2)
w01 = rand(Float32,nd1); w02 = rand(Float32,nd2); w03 = rand(Float32,ndy);
# CPU call
forward_network!(y,x,w1,w2,w3,w01,w02,w03,relu)
# GPU data
y_g = oneArray{Float32}(undef,ndy)
x_g = oneArray(x)
w1_g = oneArray(w1); w2_g = oneArray(w2); w3_g = oneArray(w3);
w01_g = oneArray(w01); w02_g = oneArray(w02); w03_g = oneArray(w03);
# GPU call
forward_network!(y_g,x_g,w1_g,w2_g,w3_g,w01_g,w02_g,w03_g,relu)
# Correctness check..
y ≈ Array(y_g) # true
# Second (and further) attempt..
y_g = oneArray{Float32}(undef,ndy)
forward_network!(y_g,x_g,w1_g,w2_g,w3_g,w01_g,w02_g,w03_g,relu)
y ≈ Array(y_g) # false !
Perhaps linked to https://github.com/JuliaGPU/oneAPI.jl/issues/327 ?
Ubuntu 22.04, oneAPI v1.5.0, Intel CPU i5-8350U, UHD Graphics 620
- 主要言語
- Julia
- スター
- 217
- フォーク
- 37
- 平均マージ
- 20時間 7分
- マージ済み PR(30日)
- 29
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JuliaGPU/oneAPI.jl のほかの issue
-
resize! frees its new buffer with free instead of release対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
メンテナーはふだん 1 日以内に返信
-
Kernel launches are compiled for Vararg{Any} and dispatched at run time対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
JuliaGPU/oneAPI.jl#675 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Host JIT segfaults compiling @oneapi in a loop over a tuple of functions対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
JuliaGPU/oneAPI.jl#663 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
JuliaGPU/oneAPI.jl の issue をすべて見る
似ている issue
-
tagbot-manual
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
tshort/StaticCompiler.jl#191 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
SciML/SciMLSensitivity.jl#1703 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
JuliaGPU/GPUCompiler.jl#1008 ·
メンテナーはふだん 1 日以内に返信
-
`biggs6` disagrees with CUTEst and is unbounded below対応中かも @timholy が 1 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Cannot set point coordinates with `Range`s (or arbitrary arrays) using `Makie.Resampler` in `heatmap`対応中かも @ffreyer が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信