SYCL: Add a new path for big kernels#4952
Open
WeiqunZhang wants to merge 1 commit intoAMReX-Codes:developmentfrom
Open
SYCL: Add a new path for big kernels#4952WeiqunZhang wants to merge 1 commit intoAMReX-Codes:developmentfrom
WeiqunZhang wants to merge 1 commit intoAMReX-Codes:developmentfrom
Conversation
The SYCL kernel on Intel GPUs has a kernel parameter size limit of 2KB. If this limit is exceeded, a runtime error will occur when if AOT is off, and a compile time error will occur if AOT is on. Compiling with AOT is very time consuming. Thus we usually compile with AOT off, and this often results in run time errors. In this PR, we have implemented a workaround for this limitation. When the kernel parameter is too large, we explicitly copy the kernel function object to device memory. Note that CUDA has a much bigger kernel size limit. Since CUDA 12.1, the limit is 32KB for Volta and above. For HIP on AMD GPUs, the limit is 4KB.
Member
Author
|
/run-hpsf-gitlab-ci |
|
GitLab CI has started at https://gitlab.spack.io/amrex/amrex/-/pipelines/1432492. |
|
GitLab CI 1432492 finished with status: success. See details at https://gitlab.spack.io/amrex/amrex/-/pipelines/1432492. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SYCL kernel on Intel GPUs has a kernel parameter size limit of 2KB. If this limit is exceeded, a runtime error will occur when if AOT is off, and a compile time error will occur if AOT is on. Compiling with AOT is very time consuming. Thus we usually compile with AOT off, and this often results in run time errors.
In this PR, we have implemented a workaround for this limitation. When the kernel parameter is too large, we explicitly copy the kernel function object to device memory.
Note that CUDA has a much bigger kernel size limit. Since CUDA 12.1, the limit is 32KB for Volta and above. For HIP on AMD GPUs, the limit is 4KB.