KernelAbstractions.jl icon indicating copy to clipboard operation
KernelAbstractions.jl copied to clipboard

ROCKernels: Update to AMDGPU 0.4

Open jpsamaroo opened this issue 3 years ago • 11 comments

jpsamaroo avatar Jul 25 '22 22:07 jpsamaroo

Needs to update the Project.toml?

vchuravy avatar Jul 25 '22 22:07 vchuravy

Needs to update the Project.toml?

Somehow it missed the push...

So now we have a ROCDevice in AMDGPU.jl. What should we do with ROCKernels.ROCDevice? Any ideas for a better name?

jpsamaroo avatar Jul 25 '22 22:07 jpsamaroo

I switched to KAROCDevice in the meantime. Let me know if anyone has better name ideas :smile:

jpsamaroo avatar Jul 27 '22 14:07 jpsamaroo

What's up with the MPI failures?

jpsamaroo avatar Jul 27 '22 19:07 jpsamaroo

KAROCDevice reads absolutly horrid. You also need to update ROCKernels to 0.4 since this is a breaking change. Maybe ROCmDevice? Can we cheat and just re-use ROCDevice from AMDGPU.jl

vchuravy avatar Aug 03 '22 21:08 vchuravy

Maybe ROCmDevice? Can we cheat and just re-use ROCDevice from AMDGPU.jl

But it would need to be <: GPU, no?

jpsamaroo avatar Aug 04 '22 15:08 jpsamaroo

I don't think we use that dispatch rule for much...

vchuravy avatar Aug 04 '22 16:08 vchuravy

Can you remove the Manidest.toml you added?

vchuravy avatar Aug 08 '22 02:08 vchuravy

@vchuravy the <: GPU is necessary to get <: Device dispatches. Would it be reasonable to manually forward these for ROCDevice?

jpsamaroo avatar Aug 08 '22 14:08 jpsamaroo

Sure!

On Mon, Aug 8, 2022, 10:35 Julian Samaroo @.***> wrote:

@vchuravy https://github.com/vchuravy the <: GPU is necessary to get <: Device dispatches. Would it be reasonable to manually forward these for ROCDevice?

— Reply to this email directly, view it on GitHub https://github.com/JuliaGPU/KernelAbstractions.jl/pull/316#issuecomment-1208213387, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABDO2VZL2FAZLEB5GOR7Z3VYELLJANCNFSM54TY5DCA . You are receiving this because you were mentioned.Message ID: @.***>

vchuravy avatar Aug 08 '22 15:08 vchuravy

Ok, now all calls generated by the @kernel macro forward down to KernelAbstractions.construct, which is defined for ::Device, and ROCKernels defines its own for ::ROCDevice.

jpsamaroo avatar Aug 10 '22 17:08 jpsamaroo

Yeah, the MPI failures seem to be something specific to CI.

Let's hold off on merging this until:

  • We've tested that this works properly for CUDAKernels (since we change some internals to support using AMDGPU.ROCDevice
  • We've added the ROCDevice() ctor to AMDGPU, so that we can keep doing that (it's much nicer for users)

jpsamaroo avatar Sep 08 '22 15:09 jpsamaroo

https://github.com/JuliaGPU/AMDGPU.jl/pull/280

jpsamaroo avatar Sep 08 '22 15:09 jpsamaroo

Codecov Report

Merging #316 (2fa4134) into master (ba43cbd) will increase coverage by 0.78%. The diff coverage is 20.00%.

@@            Coverage Diff             @@
##           master     #316      +/-   ##
==========================================
+ Coverage   71.66%   72.45%   +0.78%     
==========================================
  Files          14       14              
  Lines        1020     1031      +11     
==========================================
+ Hits          731      747      +16     
+ Misses        289      284       -5     
Impacted Files Coverage Δ
lib/ROCKernels/src/ROCKernels.jl 0.00% <0.00%> (ø)
src/KernelAbstractions.jl 90.14% <100.00%> (+3.18%) :arrow_up:
src/macros.jl 94.33% <100.00%> (+1.79%) :arrow_up:
src/cpu.jl 87.20% <0.00%> (+4.79%) :arrow_up:
lib/KernelGradients/test/testsuite.jl 25.00% <0.00%> (+25.00%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Sep 12 '22 21:09 codecov[bot]