requiredAllocSize in min_max_mem_alloc_size does not match current CL_DEVICE_MAX_MEM_ALLOC_SIZE minimum for either profile

Open
#2,813 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
testing-qa

Research direction

Start in test_conformance/api/test_api_min_max.cpp at min_max_mem_alloc_size, then compare its profile-specific values with the CL_DEVICE_MAX_MEM_ALLOC_SIZE specification and embedded_profile.asciidoc. Resolve whether the CTS expectation or specification is authoritative, update the affected documentation or test behavior accordingly, and run the relevant API conformance test.

Written by the indexing model from the issue text.

Description

cognizant-triage

Related to #2795

min_max_mem_alloc_size in test_conformance/api/test_api_min_max.cpp hardcodes:

    if (gIsEmbedded)
        requiredAllocSize = 1 * 1024 * 1024;
    else
        requiredAllocSize = 128 * 1024 * 1024;

Current spec text for CL_DEVICE_MAX_MEM_ALLOC_SIZE:

Max size of memory object allocation in bytes. The minimum value is max(min(1024 x 1024 x 1024, 1/4th of CL_DEVICE_GLOBAL_MEM_SIZE), 32 x 1024 x 1024).

That puts the actual floor at 32 MB for full profile, not 128 MB.

CL_DEVICE_MAX_MEM_ALLOC_SIZE has no entry in the embedded profile relaxation table (embedded-device-queries-table in embedded_profile.asciidoc), so the same 32 MB floor applies to embedded devices too. The 1 MB used here is roughly 32x below that.

Questions:

  • Should requiredAllocSize be lowered to 32 MB for both profiles to match the documented minimum, or is there a reason CTS intentionally holds a stricter bar for full profile and a laxer one for embedded?
  • If the latter, should the spec wording be revisited instead?
Dominant language
C++
Stars
234
Forks
240
Avg merge
6d 12h
Merged PRs (30d)
15

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from KhronosGroup/OpenCL-CTS

All issues in KhronosGroup/OpenCL-CTS

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.