Skip to content

Commit 69b4234

Browse files
authored
modify error behavior for clEnqueueMigrateMemINTEL with flags equal to zero (#1412)
1 parent 85da0d1 commit 69b4234

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

extensions/cl_intel_unified_shared_memory.asciidoc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,7 @@ _ptr_ is a pointer to the start of the shared Unified Shared Memory allocation t
953953
_size_ describes the size of the memory region to migrate.
954954

955955
_flags_ is a bit-field that is used to specify memory migration options.
956+
The set of supported memory migration flags is described in the https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#migration-flags-table[Memory Migration Flags] table.
956957

957958
_event_wait_list_ and _num_events_in_wait_list_ specify events that need to complete before this command can be executed.
958959
If _event_wait_list_ is `NULL`, then this command does not wait on any event to complete.
@@ -966,13 +967,21 @@ _event_ returns a unique event object that identifies this command.
966967
If _event_ is `NULL`, no event will be created and therefore it will not be possible to query or wait for this command.
967968
If the _event_wait_list_ and the _event_ arguments are not `NULL`, the _event_ argument must not refer to an element of the _event_wait_list_ array.
968969

970+
[[valid-migration-flags-definition]]
971+
The definition of valid _flags_ was changed in extension version 1.2.0:
972+
973+
* For extension versions prior to version 1.2.0:
974+
_flags_ equal to zero was considered invalid.
975+
* For extension versions 1.2.0 and newer:
976+
_flags_ equal to zero is valid and indicates that the memory should be migrated to the device associated with _command_queue_, similar to *clEnqueueMigrateMemObjects* and *clEnqueueSVMMigrateMem*.
977+
969978
*clEnqueueMigrateMemINTEL* returns CL_SUCCESS if the command is queued successfully.
970979
Otherwise, it will return one of the following errors:
971980

972981
* `CL_INVALID_COMMAND_QUEUE` if _command_queue_ is not a valid host command-queue.
973982
* `CL_INVALID_CONTEXT` if the context associated with _command_queue_ and events in _event_wait_list_ are not the same.
974-
* `CL_INVALID_VALUE` **TODO**, are any values of _ptr_ and _size_ considered invalid?
975-
* `CL_INVALID_VALUE` if _flags_ is zero or is not a supported combination of memory migration flags.
983+
//* `CL_INVALID_VALUE` **TODO**, are any values of _ptr_ and _size_ considered invalid?
984+
* `CL_INVALID_VALUE` if _flags_ is not a supported combination of memory migration flags.
976985
* `CL_INVALID_EVENT_WAIT_LIST` if _event_wait_list_ is `NULL` and _num_events_in_wait_list_ is greater than zero, or if _event_wait_list_ is not `NULL` and _num_events_in_wait_list_ is zero, or if event objects in _event_wait_list_ are not valid events.
977986
* `CL_OUT_OF_RESOURCES` if there is a failure to allocate resources required by the OpenCL implementation on the device.
978987
* `CL_OUT_OF_HOST_MEMORY` if there is a failure to allocate resources required by the OpenCL implementation on the host.
@@ -1341,6 +1350,7 @@ Note that a USM allocation against a sub-device need not be accessible by its pa
13411350
|1.0.0|2022-11-08|Ben Ashbaugh|Added new issues regarding error behavior for clSetKernelArgMemPointerINTEL and rect copies.
13421351
|1.0.1|2023-08-28|Ben Ashbaugh|Documented error conditions for clSetKernelExecInfo.
13431352
|1.1.0|2024-07-30|Ben Ashbaugh|Modified error behavior for clSetKernelArgMemPointerINTEL and clSetKernelExecInfo.
1353+
|1.2.0|2025-07-07|Ben Ashbaugh|Modified error behavior for clEnqueueMigrateMemINTEL when the migration flags are zero.
13441354
|========================================
13451355

13461356
//************************************************************************

0 commit comments

Comments
 (0)