Skip to content

SYCL: Add a new path for big kernels#4952

Open
WeiqunZhang wants to merge 1 commit intoAMReX-Codes:developmentfrom
WeiqunZhang:sycl_kernel_size
Open

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

Conversation

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

/run-hpsf-gitlab-ci

@github-actions
Copy link

GitLab CI has started at https://gitlab.spack.io/amrex/amrex/-/pipelines/1432492.

@amrex-gitlab-ci-reporter
Copy link

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

1 participant