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

Don't assume the model is on a CUDA device #18

Closed
jpsamaroo opened this issue Apr 2, 2022 · 4 comments
Closed

Don't assume the model is on a CUDA device #18

jpsamaroo opened this issue Apr 2, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@jpsamaroo
Copy link
Collaborator

Currently, DaggerChain communicates to Dagger that the wrapped model is located on a CUDA GPU, which is not necessarily true (and shouldn't be a requirement anyway). We should provide functions which can move the model to the GPU and communicate the correct location to Dagger, and/or auto-detect where a model currently resides.

@jpsamaroo jpsamaroo added the bug Something isn't working label Apr 2, 2022
@DhairyaLGandhi
Copy link
Member

daglayer(f, args...) = delayed((m,x...) -> m(x...))(Dagger.tochunk(f, DaggerGPU.CuArrayDeviceProc(1, CUDA.device().handle, CUDA.uuid(CUDA.device()))), args...)
is where we assert that something is on the GPU. We can remove the CUDA part out safely now I believe?

@jpsamaroo
Copy link
Collaborator Author

If we remove it, then we won't get automatic GPU execution (because GPU execution is disabled by default). We probably need a dispatch-based API in Dagger to enable GPU execution for certain functions (like DaggerChain).

@DhairyaLGandhi
Copy link
Member

Do we then intend to revert the changes to daglayer in #19 before merging?

@jpsamaroo
Copy link
Collaborator Author

I believe this has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants