Skip to content

non-zero counts in CL_DEVICE_PARTITION_BY_COUNTS #1498

@bashbaug

Description

@bashbaug

In the description of CL_DEVICE_PARTITION_BY_COUNTS we say:

This property is followed by a list of compute unit counts terminated with 0 or CL_DEVICE_PARTITION_BY_COUNTS_LIST_END. For each non-zero count m in the list, a sub-device is created with m compute units in it.

The number of non-zero count entries in the list may not exceed CL_DEVICE_PARTITION_MAX_SUB_DEVICES.

The "non-zero" text implies that a compute unit count for a sub-device may be zero, but a) this doesn't really make sense, and b) CL_DEVICE_PARTITION_BY_COUNTS_LIST_END is itself defined to be zero, so if the compute unit count were zero it would be interpreted as the list end anyhow.

See: https://github.com/KhronosGroup/OpenCL-Headers/blob/6137cfbbc7938cd43069d45c622022572fb87113/CL/cl.h#L468

There are no CTS tests that test for a count of zero, which is unsurprising, since it wouldn't work.

We should remove the "non-zero" text to avoid implying that zero is a valid count.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions