Skip to content

Commit 12edfc6

Browse files
committed
error code consistency for SVM
1 parent d1eb455 commit 12edfc6

1 file changed

Lines changed: 111 additions & 88 deletions

File tree

api/opencl_runtime_layer.asciidoc

Lines changed: 111 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -8327,25 +8327,30 @@ context from which _command_queue_ was created the behavior is undefined.
83278327
successfully.
83288328
Otherwise, it returns one of the following errors:
83298329

8330-
* {CL_INVALID_COMMAND_QUEUE} if _command_queue_ is not a valid host
8331-
command-queue.
8332-
* {CL_INVALID_OPERATION} if the device associated with _command_queue_ does not support SVM.
8333-
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_ and
8334-
events in _event_wait_list_ are not the same.
8335-
* {CL_INVALID_EVENT_WAIT_LIST} if _event_wait_list_ is `NULL` and
8336-
_num_events_in_wait_list_ > 0, or _event_wait_list_ is not `NULL` and
8337-
_num_events_in_wait_list_ is 0, or if event objects in _event_wait_list_
8338-
are not valid events.
8339-
* {CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST} if the copy operation is
8340-
blocking and the execution status of any of the events in
8341-
_event_wait_list_ is a negative integer value.
8342-
* {CL_INVALID_VALUE} if _dst_ptr_ or _src_ptr_ is `NULL`.
8343-
* {CL_MEM_COPY_OVERLAP} if the values specified for _dst_ptr_, _src_ptr_ and
8344-
_size_ result in an overlapping copy.
8345-
* {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources required
8346-
by the OpenCL implementation on the device.
8347-
* {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources
8348-
required by the OpenCL implementation on the host.
8330+
* {CL_INVALID_COMMAND_QUEUE}
8331+
** if _command_queue_ is not a valid host command-queue
8332+
* {CL_INVALID_OPERATION}
8333+
** if the device associated with _command_queue_ does not support SVM
8334+
* {CL_INVALID_CONTEXT}
8335+
** if the context associated with _command_queue_ and events in _event_wait_list_ are not the same
8336+
* {CL_INVALID_VALUE}
8337+
** if _dst_ptr_ is `NULL`
8338+
** if _src_ptr_ is `NULL`
8339+
* {CL_INVALID_EVENT_WAIT_LIST}
8340+
** if _event_wait_list_ is `NULL` and _num_events_in_wait_list_ is greater than zero
8341+
** if _event_wait_list_ is not `NULL` and _num_events_in_wait_list_ is zero
8342+
** if event objects in _event_wait_list_ are not valid events
8343+
* {CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST}
8344+
** if the copy operations is blocking and the execution status of
8345+
any of the events in _event_wait_list_ is a negative integer value indicating an error
8346+
* {CL_MEM_COPY_OVERLAP}
8347+
** if the values specified for _dst_ptr_, _src_ptr_ and _size_ result in an overlapping copy
8348+
* {CL_OUT_OF_RESOURCES}
8349+
** if there is a failure to allocate resources required by the OpenCL
8350+
implementation on the device
8351+
* {CL_OUT_OF_HOST_MEMORY}
8352+
** if there is a failure to allocate resources required by the OpenCL
8353+
implementation on the host
83498354
--
83508355

83518356
[open,refpage='clEnqueueSVMMemFill',desc='Enqueues a command to fill a region in memory with a pattern of a given pattern size.',type='protos']
@@ -8409,24 +8414,30 @@ include::{generated}/api/version-notes/clEnqueueSVMMemFill.asciidoc[]
84098414
successfully.
84108415
Otherwise, it returns one of the following errors:
84118416

8412-
* {CL_INVALID_COMMAND_QUEUE} if _command_queue_ is not a valid host
8413-
command-queue.
8414-
* {CL_INVALID_OPERATION} if the device associated with _command_queue_ does not support SVM.
8415-
* {CL_INVALID_CONTEXT} if the context associated with _command_queue_ and
8416-
events in _event_wait_list_ are not the same.
8417-
* {CL_INVALID_VALUE} if _svm_ptr_ is `NULL`.
8418-
* {CL_INVALID_VALUE} if _svm_ptr_ is not aligned to _pattern_size_ bytes.
8419-
* {CL_INVALID_VALUE} if _pattern_ is `NULL` or if _pattern_size_ is 0 or if
8420-
_pattern_size_ is not one of {1, 2, 4, 8, 16, 32, 64, 128}.
8421-
* {CL_INVALID_VALUE} if _size_ is not a multiple of _pattern_size_.
8422-
* {CL_INVALID_EVENT_WAIT_LIST} if _event_wait_list_ is `NULL` and
8423-
_num_events_in_wait_list_ > 0, or _event_wait_list_ is not `NULL` and
8424-
_num_events_in_wait_list_ is 0, or if event objects in _event_wait_list_
8425-
are not valid events.
8426-
* {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources required
8427-
by the OpenCL implementation on the device.
8428-
* {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources
8429-
required by the OpenCL implementation on the host.
8417+
* {CL_INVALID_COMMAND_QUEUE}
8418+
** if _command_queue_ is not a valid host command-queue
8419+
* {CL_INVALID_OPERATION}
8420+
** if the device associated with _command_queue_ does not support SVM
8421+
* {CL_INVALID_CONTEXT}
8422+
** if the context associated with _command_queue_ and events in _event_wait_list_ are not the same
8423+
* {CL_INVALID_VALUE}
8424+
** if _svm_ptr_ is `NULL`
8425+
** if _svm_ptr_ is not aligned to _pattern_size_ bytes
8426+
** if _pattern_ is `NULL`
8427+
** if _pattern_size_ is zero
8428+
** if _pattern_size_ is not a power of two
8429+
** if _pattern_size_ is greater than 128
8430+
** if _size_ is not a multiple of _pattern_size_
8431+
* {CL_INVALID_EVENT_WAIT_LIST}
8432+
** if _event_wait_list_ is `NULL` and _num_events_in_wait_list_ is greater than zero
8433+
** if _event_wait_list_ is not `NULL` and _num_events_in_wait_list_ is zero
8434+
** if event objects in _event_wait_list_ are not valid events
8435+
* {CL_OUT_OF_RESOURCES}
8436+
** if there is a failure to allocate resources required by the OpenCL
8437+
implementation on the device
8438+
* {CL_OUT_OF_HOST_MEMORY}
8439+
** if there is a failure to allocate resources required by the OpenCL
8440+
implementation on the host
84308441
--
84318442

84328443
[open,refpage='clEnqueueSVMMap',desc='Enqueues a command that will allow the host to update a region of a SVM buffer',type='protos']
@@ -8489,25 +8500,29 @@ already mapped in the host address space.
84898500
successfully.
84908501
Otherwise, it returns one of the following errors:
84918502

8492-
* {CL_INVALID_COMMAND_QUEUE} if _command_queue_ is not a valid host
8493-
command-queue.
8494-
* {CL_INVALID_OPERATION} if the device associated with _command_queue_ does not support SVM.
8495-
* {CL_INVALID_CONTEXT} if context associated with _command_queue_ and events
8496-
in _event_wait_list_ are not the same.
8497-
* {CL_INVALID_VALUE} if _svm_ptr_ is `NULL`.
8498-
* {CL_INVALID_VALUE} if _size_ is 0 or if values specified in _map_flags_
8499-
are not valid.
8500-
* {CL_INVALID_EVENT_WAIT_LIST} if _event_wait_list_ is `NULL` and
8501-
_num_events_in_wait_list_ > 0, or _event_wait_list_ is not `NULL` and
8502-
_num_events_in_wait_list_ is 0, or if event objects in _event_wait_list_
8503-
are not valid events.
8504-
* {CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST} if the map operation is
8505-
blocking and the execution status of any of the events in
8506-
_event_wait_list_ is a negative integer value.
8507-
* {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources required
8508-
by the OpenCL implementation on the device.
8509-
* {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources
8510-
required by the OpenCL implementation on the host.
8503+
* {CL_INVALID_COMMAND_QUEUE}
8504+
** if _command_queue_ is not a valid host command-queue
8505+
* {CL_INVALID_OPERATION}
8506+
** if the device associated with _command_queue_ does not support SVM
8507+
* {CL_INVALID_CONTEXT}
8508+
** if the context associated with _command_queue_ and events in _event_wait_list_ are not the same
8509+
* {CL_INVALID_VALUE}
8510+
** if _svm_ptr_ is `NULL`
8511+
** if _size_ is zero
8512+
** if values specified in _map_flags_ are not valid
8513+
* {CL_INVALID_EVENT_WAIT_LIST}
8514+
** if _event_wait_list_ is `NULL` and _num_events_in_wait_list_ is greater than zero
8515+
** if _event_wait_list_ is not `NULL` and _num_events_in_wait_list_ is zero
8516+
** if event objects in _event_wait_list_ are not valid events
8517+
* {CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST}
8518+
** if the map operations is blocking and the execution status of
8519+
any of the events in _event_wait_list_ is a negative integer value indicating an error
8520+
* {CL_OUT_OF_RESOURCES}
8521+
** if there is a failure to allocate resources required by the OpenCL
8522+
implementation on the device
8523+
* {CL_OUT_OF_HOST_MEMORY}
8524+
** if there is a failure to allocate resources required by the OpenCL
8525+
implementation on the host
85118526
--
85128527

85138528
[open,refpage='clEnqueueSVMUnmap',desc='Enqueues a command to indicate that the host has completed updating the region given by an SVM pointer and which was specified in a previous call to clEnqueueSVMMap.',type='protos']
@@ -8555,20 +8570,24 @@ the region of the SVM buffer specified in these calls.
85558570
successfully.
85568571
Otherwise, it returns one of the following errors:
85578572

8558-
* {CL_INVALID_COMMAND_QUEUE} if _command_queue_ is not a valid host
8559-
command-queue.
8560-
* {CL_INVALID_OPERATION} if the device associated with _command_queue_ does not support SVM.
8561-
* {CL_INVALID_CONTEXT} if context associated with _command_queue_ and events
8562-
in _event_wait_list_ are not the same.
8563-
* {CL_INVALID_VALUE} if _svm_ptr_ is `NULL`.
8564-
* {CL_INVALID_EVENT_WAIT_LIST} if _event_wait_list_ is `NULL` and
8565-
_num_events_in_wait_list_ > 0, or if _event_wait_list_ is not `NULL` and
8566-
_num_events_in_wait_list_ is 0, or if event objects in _event_wait_list_
8567-
are not valid events.
8568-
* {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources required
8569-
by the OpenCL implementation on the device.
8570-
* {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources
8571-
required by the OpenCL implementation on the host.
8573+
* {CL_INVALID_COMMAND_QUEUE}
8574+
** if _command_queue_ is not a valid host command-queue
8575+
* {CL_INVALID_OPERATION}
8576+
** if the device associated with _command_queue_ does not support SVM
8577+
* {CL_INVALID_CONTEXT}
8578+
** if the context associated with _command_queue_ and events in _event_wait_list_ are not the same
8579+
* {CL_INVALID_VALUE}
8580+
** if _svm_ptr_ is `NULL`
8581+
* {CL_INVALID_EVENT_WAIT_LIST}
8582+
** if _event_wait_list_ is `NULL` and _num_events_in_wait_list_ is greater than zero
8583+
** if _event_wait_list_ is not `NULL` and _num_events_in_wait_list_ is zero
8584+
** if event objects in _event_wait_list_ are not valid events
8585+
* {CL_OUT_OF_RESOURCES}
8586+
** if there is a failure to allocate resources required by the OpenCL
8587+
implementation on the device
8588+
* {CL_OUT_OF_HOST_MEMORY}
8589+
** if there is a failure to allocate resources required by the OpenCL
8590+
implementation on the host
85728591

85738592
[NOTE]
85748593
====
@@ -8656,24 +8675,28 @@ could result in undefined results.
86568675
successfully.
86578676
Otherwise, it returns one of the following errors:
86588677

8659-
* {CL_INVALID_COMMAND_QUEUE} if _command_queue_ is not a valid host
8660-
command-queue.
8661-
* {CL_INVALID_OPERATION} if the device associated with _command_queue_ does not support SVM.
8662-
* {CL_INVALID_CONTEXT} if context associated with _command_queue_ and events
8663-
in _event_wait_list_ are not the same.
8664-
* {CL_INVALID_VALUE} if _num_svm_pointers_ is zero or _svm_pointers_ is
8665-
`NULL`.
8666-
* {CL_INVALID_VALUE} if _sizes_[i] is non-zero range [_svm_pointers_[i],
8667-
_svm_pointers_[i]+_sizes_[i]) is not contained within an existing
8668-
{clSVMAlloc} allocation.
8669-
* {CL_INVALID_EVENT_WAIT_LIST} if _event_wait_list_ is `NULL` and
8670-
_num_events_in_wait_list_ > 0, or if _event_wait_list_ is not `NULL` and
8671-
_num_events_in_wait_list_ is 0, or if event objects in _event_wait_list_
8672-
are not valid events.
8673-
* {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources required
8674-
by the OpenCL implementation on the device.
8675-
* {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources
8676-
required by the OpenCL implementation on the host.
8678+
* {CL_INVALID_COMMAND_QUEUE}
8679+
** if _command_queue_ is not a valid host command-queue
8680+
* {CL_INVALID_OPERATION}
8681+
** if the device associated with _command_queue_ does not support SVM
8682+
* {CL_INVALID_CONTEXT}
8683+
** if the context associated with _command_queue_ and events in _event_wait_list_ are not the same
8684+
* {CL_INVALID_VALUE}
8685+
** if _num_svm_pointers_ is zero
8686+
** if _svm_pointers_ is `NULL`
8687+
** if _flags_ is not zero and is not a valid combination of the values
8688+
described in the <<migration-flags-table, Memory migration Flags>> table
8689+
** if _sizes_[i] is non-zero and the memory range described by _svm_pointers_[i] and _sizes_[i] is not contained within an SVM allocation returned by {clSVMAlloc}
8690+
* {CL_INVALID_EVENT_WAIT_LIST}
8691+
** if _event_wait_list_ is `NULL` and _num_events_in_wait_list_ is greater than zero
8692+
** if _event_wait_list_ is not `NULL` and _num_events_in_wait_list_ is zero
8693+
** if event objects in _event_wait_list_ are not valid events
8694+
* {CL_OUT_OF_RESOURCES}
8695+
** if there is a failure to allocate resources required by the OpenCL
8696+
implementation on the device
8697+
* {CL_OUT_OF_HOST_MEMORY}
8698+
** if there is a failure to allocate resources required by the OpenCL
8699+
implementation on the host
86778700
--
86788701

86798702

0 commit comments

Comments
 (0)