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

possibly incorrect minimum for info::device::max_mem_alloc_size #378

Open
bashbaug opened this issue Mar 13, 2023 · 1 comment · May be fixed by #738
Open

possibly incorrect minimum for info::device::max_mem_alloc_size #378

bashbaug opened this issue Mar 13, 2023 · 1 comment · May be fixed by #738
Labels
bug Something isn't working

Comments

@bashbaug
Copy link

The current required minimum for info::device::max_mem_alloc_size is:

Returns the maximum size of memory object allocation in bytes. The minimum value is max (1/4th of info::device::global_mem_size,12810241024) if this SYCL device is not of device type info::device_type::custom.

I suspect this definition came from OpenCL 1.2, which had the same definition for CL_DEVICE_MAX_MEM_ALLOC_SIZE.

The definition in OpenCL 2.0 and newer though is:

Max size of memory object allocation in bytes. The minimum value is max(min(1024 × 1024 × 1024, 1/4th of CL_DEVICE_GLOBAL_MEM_SIZE), 32 × 1024 × 1024) for devices that are not of type CL_DEVICE_TYPE_CUSTOM.

Note that this caps the minimum at 1GB.

Should the SYCL minimum have the same 1GB cap? Or is the difference intentional, and the SYCL minimum should be 1/4 of the total global memory size, even when the total global memory size exceeds 4GB?

@al42and
Copy link

al42and commented May 12, 2023

Tangentially, should such limits even be present in the standard that strives for portability? I can see how having some guaranteed minimums can be helpful, but the current wording sounds awfully specific.

@Pennycook Pennycook added the bug Something isn't working label Feb 24, 2025
@Pennycook Pennycook linked a pull request Feb 24, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants