Repository navigation
Conversation
|
Some first thoughts on this. Depends on #980 . I will undraft this when I consider most of the components make sense. |
|
This looks good! I like the way the |
Thnx! I will undraft once the properties lands, and I implement it in dpcpp. I would like to mentally digest this. |
| {endnote} | ||
|
|
||
| [[sec:khr-kernel-properties-properties]] | ||
| == Kernel properties |
There was a problem hiding this comment.
This does not cover all attributes available in SYCL specification:
device_has()is missingvec_type_hintis missing
Should not KHR be consistent with the spec?
There was a problem hiding this comment.
vec_type_hint is deprecated in the core spec, so I don't think we should provide an equivalent kernel property. In general, the WG doesn't add improvements for APIs that are already deprecated.
@koparasy asked me offline about device_has before he drafted this. I suggested that we omit it from the KHR. My reasoning was that this attribute seems not to be used. (At least I am not aware of anyone who uses it.) It's also more complicated than the others because it can also be applied to individual device functions (i.e. functions called within the call tree of a kernel). The mechanism proposed in this KHR with the get member function can not replace that usage pattern. Therefore, it seemed like it didn't make a lot of sense to spend a lot of WG discussion time on creating a property-based alternative to device_has because it would be high effort and low ROI. We can always add it later in a "version 2" if it becomes more important.
There was a problem hiding this comment.
vec_type_hintis deprecated in the core spec, so I don't think we should provide an equivalent kernel property.
I've missed the deprecation note. Thank you for pointing out. I agree that in such a case we don't need to add it to this KHR.
There was a problem hiding this comment.
My reasoning was that this attribute seems not to be used. (At least I am not aware of anyone who uses it.)
With the open source solution you can't be sure who uses or who does not use the feature. This one seems quite reasonable to have at least to me as it constrain the kernel to specific features and makes that explicit to the compiler which is always a good thing.
device_has<...>. I suggested that we omit it from the KHR. <...> We can always add it later in a "version 2" if it becomes more important.
I think it's fine to not implement this one in the first version of the KHR. However, since device_has is a valid SYCL kernel attribute, I believe that we must be reasonably sure that we will be able to extend KHR in the future to cover this attribute as well. If this won't be technically possible, then I afraid we have an issue which needs to be resolved before landing the KHR as resolving it might impact how KHR is designed. Are we sure we will be able to implement it?
There was a problem hiding this comment.
IMO device_has should not be in this version. The design does not preclude it. A kernel-level device_has<aspect...> property would follow the same pattern as the three properties here, and device functions can continue to use the core attribute.
That said, I share Greg's view. device_has can be applied on device functions AND kernels, which make it more complex in terms of implementation and specification.
|
@TApplencourt @VerenaBeckham @gmlueck I would love to get some feedback on this one. We briefly discussed this during the F2F. The KHR itself is very small and if you read the example, you should get the gist of it. |
Co-authored-by: Greg Lueck <gregory.m.lueck@intel.com>
(- Requirement of Property -- First use of the |
No description provided.