Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

oschulz
Copy link

@oschulz oschulz commented May 22, 2022

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.

@jpsamaroo
Copy link
Member

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.

@oschulz
Copy link
Author

oschulz commented May 26, 2022

Thanks for putting this together! CI is down while I'm out of the country

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). :-)


A ROC device.
"""
struct ROCDevice <: AbstractGPUDevice end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you instead change

mutable struct HSAAgent
to mutable struct HSAAgent <: AbstractGPUDevice? We use HSAAgent for most operations involving devices.

Copy link
Author

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)?

@jpsamaroo
Copy link
Member

@oschulz can you rebase this on AMDGPU master? HSAAgent is now named ROCDevice.

@oschulz
Copy link
Author

oschulz commented Jul 29, 2022

Will do, I need to rebase the other related PRs as well anyway.

@jpsamaroo
Copy link
Member

@oschulz bump

@oschulz
Copy link
Author

oschulz commented Aug 26, 2022

@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.

@oschulz
Copy link
Author

oschulz commented May 4, 2023

Closed, but not forgotten, to be reincarnated in the future (see JuliaGPU/Adapt.jl#64).

@oschulz oschulz closed this May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request upstream
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants