RFC: Support Adapt.AbstractGPUDevice#233
Conversation
|
Thanks for putting this together! CI is down while I'm out of the country, so it'll have to wait another week before I can get CI back up. |
Thanks @jpsamaroo! When you're back, I'll need some hints from you on the AMDGPU side of this (I don't really know what the equivalent of CuDevice is, and so on). :-) |
src/device/array.jl
Outdated
|
|
||
| A ROC device. | ||
| """ | ||
| struct ROCDevice <: AbstractGPUDevice end |
There was a problem hiding this comment.
Can you instead change
Line 3 in 99967b7
mutable struct HSAAgent <: AbstractGPUDevice? We use HSAAgent for most operations involving devices.
There was a problem hiding this comment.
Thanks, done! How do I do
Adapt.adapt_storage(device::HSAAgent, x) = adapt_storage(ROCArray, x)correctly (i.e. send the array to the right device)?
cfefec4 to
d437bbc
Compare
d437bbc to
432e88c
Compare
|
@oschulz can you rebase this on AMDGPU master? |
|
Will do, I need to rebase the other related PRs as well anyway. |
|
@oschulz bump |
Sorry for the delay, it's not forgotten, but holidays got in the way. :-) Also looks like the whole thing will now include ArrayInterfaceCore as well (recent discussion on JuliaGPU/Adapt.jl#52). Gimme a bit of time to adapt to that, I'll modify and rebase the whole PR-complex in the process. |
|
Closed, but not forgotten, to be reincarnated in the future (see JuliaGPU/Adapt.jl#64). |
See JuliaGPU/Adapt.jl#52
Not functional like this yet, I don't know AMDGPU well enough and don't have a device to test, currently. See JuliaGPU/CUDA.jl#1520 for the CUDA.jl counterpart.