-
Notifications
You must be signed in to change notification settings - Fork 795
[SYCL] Fix set_final_data(..) for vector<bool> iterator #3099
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
Conversation
Signed-off-by: mdimakov <[email protected]>
Signed-off-by: mdimakov <[email protected]>
s-kanaev
left a comment
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.
The change looks good in general.
@maximdimakov , could you, please, update description of this patch with link to PR with test at intel/llvm-test-suite?
Signed-off-by: mdimakov <[email protected]>
Signed-off-by: mdimakov <[email protected]>
Signed-off-by: mdimakov <[email protected]>
Signed-off-by: mdimakov <[email protected]>
Signed-off-by: mdimakov <[email protected]>
vladimirlaz
left a comment
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.
Please add test for this case
Signed-off-by: mdimakov <[email protected]>
s-kanaev
left a comment
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.
Looks good overall.
| using EnableIfOutputIteratorT = enable_if_t< | ||
| /*is_output_iterator<T>::value &&*/ !std::is_pointer<T>::value>; | ||
| /*is_output_iterator<T>::value &&*/ !std::is_pointer<T>::value && | ||
| !std::is_same<typename T::value_type, bool>::value>; |
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.
@alexbatashev, @sergey-semenov, could you, please, help reviewing this change?
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'm afraid this is going to break some use cases: https://godbolt.org/z/nznfq1
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 is the test SYCL/buffer/buffer.cpp . There are a lot of checks, including pointer (for ex int*, void*). The only compilation error was the error with void*, because there was an iterator_value_type_t and void type was trying to convert to void&. With typename T::value_type all the checks were passed
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.
Ok, sounds good to me
|
@maximdimakov Could you please provide more details on the root cause of the problem to include it into the final commit message? |
|
@romanovvlad I updated the description. Does it look good? |
Yes, thanks. |
|
It is not clear what you are trying to fix here and how you are fixing it since this is uncommented code... |
|
@keryell Is it necessary to add comments? This is just the check of vector iterator and then calling the new set_final_data() for it. |
Almost anything with vector of bool is a joke in C++. |
|
Not sure what you want me to take a look at, but vector is not a "Container" as it doesn't meet the requirements. It appears to me that this attempts to disallow any std-container of bool (note, it isn't disallowing JUST vector, not sure when it is used otherwise). It does add the constraint on the type-trait that it can only be used on those std-containers however, since of course it attempts to use the ::value_type of "T" (thus making the is_pointer redundant). I'm guessing this shouldn't have been merged based on that alone. |
The extension add translation from LLVM's bfloat type to OpTypeFloat %width% 16 %fp encoding% BFloat16KHR Mangling follows LLVM's rules for the type. Spec PR: KhronosGroup/SPIRV-Registry#323 --------- Signed-off-by: Sidorov, Dmitry <[email protected]> Co-authored-by: Aziz, Michael <[email protected]> Original commit: KhronosGroup/SPIRV-LLVM-Translator@d3b7a12ee9b8f2b
set_final_data() method had compilation error due to lack of the data() method for the std::vector. The fix is needed for support vector
Test: intel/llvm-test-suite#122
Signed-off-by: mdimakov [email protected]