Skip to content

Commit a897dfb

Browse files
authored
add new issues regarding error checking for USM pointer kernel args and rect memcpys (#857)
* add an issue regarding error checking for USM pointer kernel args * add an issue regarding a rect memcpy
1 parent 913cf69 commit a897dfb

1 file changed

Lines changed: 27 additions & 3 deletions

File tree

extensions/cl_intel_unified_shared_memory.asciidoc

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ If we did support this then there may be alignment and size granularity requirem
10621062
The _flags_ argument was folded into the _properties_ in revision C.
10631063
--
10641064

1065-
. What should behavior be for `clGetMemAllocInfoINTEL` if the passed-in _ptr_ is `NULL` or doesn't point into a USM allocation?
1065+
. What should behavior be for *clGetMemAllocInfoINTEL* if the passed-in _ptr_ is `NULL` or doesn't point into a USM allocation?
10661066
+
10671067
--
10681068
`RESOLVED`:
@@ -1156,11 +1156,14 @@ Is `size` equal to zero valid?
11561156
--
11571157

11581158
. Should we add a device query for a maximum supported USM alignment, or should the maximum supported alignment implicitly be defined by the size of the largest data type supported by the device?
1159+
Should we allow implementation-defined behavior for alignments larger than the size of the largest data type supported by the device?
11591160
+
11601161
--
11611162
*UNRESOLVED*:
11621163
A device query would allow for larger supported alignments, such as page alignment.
11631164
Note that supported alignments should always be a power of two.
1165+
1166+
Note that there are no maximum supported alignments defined for `posix_memalign` or `_aligned_alloc`, and supported alignments for the standard `aligned_alloc` and `std::aligned_alloc` are implementation-defined.
11641167
--
11651168

11661169
. Should we add a device query for a maximum supported USM fill pattern size, or should the maximum supported fill pattern size implicitly be defined by the size of the largest data type supported by the device?
@@ -1191,7 +1194,7 @@ If the USM allocation is from a different context then behavior could be undefin
11911194
Trending "yes" for host USM allocations, both when the host USM allocation is from this context and from another context.
11921195
--
11931196

1194-
. Can a pointer to a device, host, or shared USM allocation be passed to API functions to read from or write to `cl_mem` objects, such as `clEnqueueReadBuffer` or `clEnqueueWriteImage`?
1197+
. Can a pointer to a device, host, or shared USM allocation be passed to API functions to read from or write to `cl_mem` objects, such as *clEnqueueReadBuffer* or *clEnqueueWriteImage*?
11951198
+
11961199
--
11971200
*UNRESOLVED*:
@@ -1204,7 +1207,7 @@ If the shared USM allocation is from the same context this could be an error, su
12041207
If the shared USM allocation is from a different context then behavior could be undefined.
12051208
--
12061209

1207-
. Can a pointer to a device, host, or shared USM allocation be passed to API functions to fill a `cl_mem`, SVM allocation, or USM allocation, such as `clEnqueueFillBuffer`?
1210+
. Can a pointer to a device, host, or shared USM allocation be passed to API functions to fill a `cl_mem`, SVM allocation, or USM allocation, such as *clEnqueueFillBuffer*?
12081211
+
12091212
--
12101213
*UNRESOLVED*:
@@ -1230,6 +1233,26 @@ Note that some flags will not be valid, such as `CL_MEM_USE_HOST_PTR`.
12301233
*UNRESOLVED*:
12311234
--
12321235

1236+
. Should it be an error to set an unknown pointer as a kernel argument using *clSetKernelArgMemPointerINTEL* if no devices support shared system allocations?
1237+
+
1238+
--
1239+
*UNRESOLVED*:
1240+
Returning an error for an unknown pointer is helpful to identify and diagnose possible programming errors sooner, but passing a pointer to arbitrary memory to a function on the host is not an error until the pointer is dereferenced.
1241+
1242+
If we relax the error condition for *clSetKernelArgMemPointerINTEL* then we could also consider relaxing the error condition for *clSetKernelExecInfo*(`CL_KERNEL_EXEC_INFO_USM_PTRS_INTEL`) similarly.
1243+
1244+
Note that if the error condition is removed we can still check for possible programming errors via optional USM checking layers, such as the https://github.com/intel/opencl-intercept-layer/blob/master/docs/controls.md#usmchecking-bool[USMChecking] functionality in the https://github.com/intel/opencl-intercept-layer[OpenCL Intercept Layer].
1245+
--
1246+
1247+
. Should we support a "rect" memcpy similar to *clEnqueueCopyBufferRect*?
1248+
+
1249+
--
1250+
*UNRESOLVED*:
1251+
This would be a fairly straightforward addition if it is useful.
1252+
1253+
Note that there is no similar SVM "rect" memcpy.
1254+
--
1255+
12331256
== Revision History
12341257

12351258
[cols="5,15,15,70"]
@@ -1257,6 +1280,7 @@ Note that some flags will not be valid, such as `CL_MEM_USE_HOST_PTR`.
12571280
|R|2020-08-21|Ben Ashbaugh|Fixed enum name typo in table.
12581281
|S|2020-08-26|Maciej Dziuban|Added initial placement flags for shared allocations.
12591282
|1.0.0|2021-11-07|Ben Ashbaugh|Added version and other minor updates prior to posting on the OpenCL registry.
1283+
|1.0.0|2022-11-08|Ben Ashbaugh|Added new issues regarding error behavior for clSetKernelArgMemPointerINTEL and rect copies.
12601284
|========================================
12611285

12621286
//************************************************************************

0 commit comments

Comments
 (0)