llvm icon indicating copy to clipboard operation
llvm copied to clipboard

[SYCL] Remove unnecessary API from properties

Open rolandschulz opened this issue 1 year ago • 2 comments

Removes:

  • property-key member value_t
  • property-value member key_t
  • is_property_key, is_property_value

Replaces implementation-defined with defined (clarifies spec and had no upside):

  • template order of property_value

rolandschulz avatar May 06 '24 20:05 rolandschulz

Can you add a bit more to the PR description explaining what was removed?

will do

I think this change looks good, but it only changes the spec. At this point, we have a bunch of properties defined already, so I presume we need to change their definitions to be in line with this new spec, right?

Because the spec change doesn't change anything just removes things, we don't have to. But we can to simplify our code.

Also keep in mind that there is a lot of code using compile-time properties now, and we shouldn't break that code without going through some sort of deprecation process.

Even for experimental?

I'm not worried about applications that define their own properties

Note our current implantation doesn't allow users to define their own properties because a) you need to specialize is_property (removed in this PR) b) we sort based on an ID given to each property. We would need to change to sorting based on type-name. I don't think we have agreed yet whether we want to make that change.

rolandschulz avatar May 07 '24 16:05 rolandschulz

I think this change looks good, but it only changes the spec. At this point, we have a bunch of properties defined already, so I presume we need to change their definitions to be in line with this new spec, right?

Because the spec change doesn't change anything just removes things, we don't have to. But we can to simplify our code.

I think we should clean up the code for two reasons. First, the DPC++ developers will likely copy the existing code patterns for "properties" rather than looking at the spec. If we don't clean up the code for the existing properties, all future properties will probably continue to use the old pattern. Second, application developers often look at the headers and assume that anything that isn't "private" or "detail" is part of the API. Therefore, we should remove things that aren't part of the specified API, or application developers will end up depending on those things anyway.

gmlueck avatar May 15 '24 12:05 gmlueck