Open gmlueck opened 1 week ago
I want to add one more thing to consider against option #2. What to return when someone sends incorrect runtime property and we ignore it stating that it is UB but then call get/has_property with it? Then it seems to be declared as UB also but in reality it will work and user will never know that the scenario is incorrect.
This question came from our development team.
The specification does not say what should happen if an incompatible property is passed to an API that takes a
property_list
. Here is a list of the APIs that take aproperty_list
. I don't think any of them currently specify the behavior when an incompatible property is passed.context
constructorsqueue
constructorsbuffer
constructorsunsampled_image
constructorssampled_image
constructorsaccessor
constructorshost_accessor
constructorslocal_accessor
constructorsunsampled_image_accessor
constructorshost_unsampled_image_accessor
constructorssampled_image_accessor
constructorshost_sampled_image_accessor
constructorsusm_allocator
constructorsmalloc_device
,aligned_alloc_device
malloc_host
,aligned_alloc_host
malloc_shared
,aligned_alloc_shared
sycl::malloc
,aligned_alloc
reduction
functionscompile
,link
,build
(kernel bundle)stream
constructorsI think there are two reasonable options:
errc::invalid
in this case.