Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
RFC for "Passed Directly" Customization Point #1999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC for "Passed Directly" Customization Point #1999
Changes from 21 commits
45248dd
5ff56d9
643a2cb
6c0fc33
3bacd14
f24f8d2
1145efa
d1d0718
81ad0a2
36b8ec5
b0dac4f
4823c6e
b79e7f5
47b8be3
92b1d33
5c45e7d
8bcc334
27dc9ba
60cd1a9
2ddaf9d
497b8c6
7837319
79adf34
5d704ab
91b77a2
0474d92
29a8374
d45e799
5305507
942b19c
73a8038
53d1f98
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oneapi::dpl::is_passed_directly_in_onedpl_device_policies_v
has double info about "oneDPL":I mean "oneapi::dpl" and substring "onedpl".
So, I would suggest name
oneapi::dpl::is_passed_directly_v
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, I think the idea is to merge this RFC with the naming and location as an open question, to be decided in the discussion of the specification PR. All the same, thanks for your input here.
Also some context for the individual points:
The idea behind this is that the public trait follows the naming convention of the ADL customization point function. The ADL customization point function needs to identify itself as
onedpl
because it user's customizations will be in their own namespaces. However, we could decide not to have the public trait share naming with the ADL function, and I would agree with removing this redundancy then.There was an earlier discussion in this PR RFC for "Passed Directly" Customization Point #1999 (comment) , I think its a difficult decision with many opinions. I don't really have strong opinions here and am happy to go with the group's decision.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we also going to introduce a struct as a trait? Like below
I would write an honest template variable
indicating if the iterator type
instead of what we have because it look like partial specialization or like explicit instantiation from the C++ standpoint. Until of course we want to keep some implementation freedom, which I don't see the space for in this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its a good question, and probably needs to be handled in connection with the question of naming, and if the ADL function should be named the same as the trait.
Now I am thinking that it would be better to make their names distinct, and then to offer both the struct and value version of the trait
oneapi::dpl::is_passed_directly_in_onedpl_device_policies[_v]
as you describe. This is the more normal convention, but requires divorcing the names between the ADL customization point and the trait.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oneapi::dpl::is_passed_directly_to_device
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the two proposed names you raised and a note to the open questions section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also raised the naming question.
I like the one that proposed by @MikeDvorskiy. I also thought about
is_passed_directly_for_hetero_policies
if we think about future extensibility of this trait beyond SYCL (hypothetical scenario for now)just
is_passed_directly
also good enough to meThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might also consider one name for a trait itself and a different name for the customization function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've separated the names of the ADL customization point and the public trait. This allows us to provide both the struct and value version of the trait, which is the norm.