-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you instead change
Line 3 in 99967b7
mutable struct HSAAgent |
mutable struct HSAAgent <: AbstractGPUDevice
? We use HSAAgent
for most operations involving devices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.