JuliaGPU / JuliaGPU/AMDGPU.jl

Performance regression using `^`

Open
#193 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug performance
Dominant language
Julia
Stars
344
Forks
79
Avg merge
2d 23h
Merged PRs (30d)
27

Description

As reported in https://github.com/luraess/JuliaGPUPerf/issues/2 and https://github.com/luraess/JuliaGPUPerf/issues/3, there is an issue significantly affecting performance when doing ^ operation within GPU kernels.

The Int32 on Int32 case (https://github.com/luraess/JuliaGPUPerf/issues/2) may have been fixed as upon suggestion from @vchuravy by using

my_pow(x, p) = ccall("llvm.powi.f32.i32", llvmcall, Float32, (Float32, Int32), x, p)
#[...]
A[ix,iy] = B[ix,iy] + s*my_pow(C[ix,iy], pow_int)

But the Float32 and Float64 cases are still lacking behind.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked JuliaGPUPerf reports for the reproducible Float32 and Float64 kernel cases, then trace how ^ is lowered in AMDGPU GPU kernels. Compare those cases with the documented Int32 workaround and benchmark the affected operations; done means the Float32 and Float64 regressions are characterized and performance is improved without breaking kernel execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.