Skip to content

clSetKernelExecInfo error code inconsistency #1413

@bashbaug

Description

@bashbaug

I think when we merged support for cl_ext_buffer_device_address in #1159 we accidentally introduced an error code inconsistency for clSetKernelExecInfo.

Specifically, for CL_KERNEL_EXEC_INFO_SVM_PTRS we say:

To specify that no SVM allocations will be accessed by a kernel other than those set as kernel arguments, specify an empty set by passing param_value_size equal to zero and param_value equal to NULL.

But then, we also describe the error condition:

CL_INVALID_VALUE if param_name is not valid, if param_value is NULL or if the size specified by param_value_size is not valid.

I think this error condition is unnecessary and should be removed, especially given the additional CL_INVALID_VALUE error description following the quoted description, where it is only an error if param_value is NULL and param_value_size is greater than zero.

We should also check that this error condition that was added by the PR for cl_ext_buffer_device_address is still applicable, or whether it can be removed, also:

CL_INVALID_OPERATION for CL_KERNEL_EXEC_INFO_SVM_PTRS and CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM if no devices in the context associated with kernel support SVM.

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