Skip to content

SYCL: Add a new path for big kernels#4952

Merged
WeiqunZhang merged 1 commit intoAMReX-Codes:developmentfrom
WeiqunZhang:sycl_kernel_size
Feb 18, 2026
Merged

SYCL: Add a new path for big kernels#4952
WeiqunZhang merged 1 commit intoAMReX-Codes:developmentfrom
WeiqunZhang:sycl_kernel_size

Conversation

@WeiqunZhang
Copy link
Copy Markdown
Member

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.

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.
@WeiqunZhang
Copy link
Copy Markdown
Member Author

/run-hpsf-gitlab-ci

@github-actions
Copy link
Copy Markdown

@amrex-gitlab-ci-reporter
Copy link
Copy Markdown

GitLab CI 1432492 finished with status: success. See details at https://gitlab.spack.io/amrex/amrex/-/pipelines/1432492.

@WeiqunZhang WeiqunZhang marked this pull request as ready for review February 18, 2026 02:49
@WeiqunZhang WeiqunZhang requested a review from kngott February 18, 2026 02:51
@WeiqunZhang WeiqunZhang merged commit 5d0e3d2 into AMReX-Codes:development Feb 18, 2026
74 checks passed
@WeiqunZhang WeiqunZhang deleted the sycl_kernel_size branch February 18, 2026 19:12
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.

2 participants