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

Modularize runtime's GPU implementation #20358

Merged
merged 16 commits into from Aug 3, 2022

Conversation

e-kayrakli
Copy link
Contributor

@e-kayrakli e-kayrakli commented Aug 3, 2022

This PR refactors the GPU layer in the runtime so that it is not hard-coded to
use CUDA.

The main GPU interface of the runtime is still in runtime/includes/chpl-gpu.h
which is implemented in runtime/src/chpl-gpu.c. However, with this PR, the
functions there will call new functions that are in chpl_gpu_impl_*
"namespace". These functions implement core functionality and implemented by
different layers. Chapel-specific functions like debugging output and
diagnostics are still maintained in chpl-gpu.c, and not going to be duplicated
in different layers as much as possible.

Currently, there is only one GPU layer and it is for CUDA. This can be specified
with CHPL_GPU_RUNTIME environment variable. But, obviously CUDA is the default
and there's no actual difference whether you set this environment variable or
not. The hope is that new GPU layers can be added relatively easily once we lay
out this support.

Test:

  • spot checks in gpu/native
  • full gpu/native
  • standard

Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
…e wanted

Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
@e-kayrakli e-kayrakli requested review from jhh67 and stonea and removed request for stonea August 3, 2022 19:31
Copy link
Contributor

@jhh67 jhh67 left a comment

Choose a reason for hiding this comment

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

👍

@e-kayrakli e-kayrakli merged commit b8defaf into chapel-lang:main Aug 3, 2022
@e-kayrakli e-kayrakli deleted the gpu-modular-runtime branch August 3, 2022 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants