[SYCL] Remove _Float16 from integration header#185
Merged
bader merged 1 commit intointel:syclfrom Jun 7, 2019
Merged
Conversation
The main problem that half type is defined as _Float16 on the device and as manually implemented type on host so compiler could add _Float16 to the integration header and it will produce errors in host compilation. Signed-off-by: Mariya Podchishchaeva <mariya.podchishchaeva@intel.com>
vladimirlaz
approved these changes
Jun 3, 2019
keryell
reviewed
Jun 3, 2019
| check<aligned_short, 4>(Queue); | ||
| check<aligned_short, 8>(Queue); | ||
| if (Queue.get_device().has_extension("cl_khr_fp16")) { | ||
| typedef half aligned_half __attribute__((aligned(16))); |
Contributor
There was a problem hiding this comment.
What about using instead in 2019?
Contributor
Author
There was a problem hiding this comment.
This test uses typedef in all places so I used it to save one style. I think changing all typedefs to usings not in scope of this PR :)
vladimirlaz
pushed a commit
to vladimirlaz/llvm
that referenced
this pull request
Nov 5, 2019
CONFLICT (content): Merge conflict in clang/include/clang/AST/PrettyPrinter.h
AlexeySachkov
added a commit
to AlexeySachkov/llvm
that referenced
this pull request
Feb 11, 2020
Changes to tests are preserved Signed-off-by: Alexey Sachkov <alexey.sachkov@intel.com>
AlexeySachkov
added a commit
to AlexeySachkov/llvm
that referenced
this pull request
Feb 11, 2020
Because of the fact, that `half` type is not a standard C++ type and it is not supported everywhere, its implementation differs between host and device: C++ class with overloaded arithmetic operators is used on host and `_Float16` is used on device side. Previously, the switch between two version was implemented as preprocessor macro and having two different types caused some problems with integration header and unnamed lambda feature, see intel#185 and intel#960. This patch redesigned `half` implementation in a way, that single wrapper data type is used as `half` representation on both host and device sides; differentiation between actual host and device implementations is done under the hood of this wrapper. Signed-off-by: Alexey Sachkov <alexey.sachkov@intel.com>
bader
pushed a commit
that referenced
this pull request
Feb 12, 2020
…rounds (#1089) Because of the fact, that `half` type is not a standard C++ type and it is not supported everywhere, its implementation differs between host and device: C++ class with overloaded arithmetic operators is used on host and `_Float16` is used on device side. Previously, the switch between two version was implemented as preprocessor macro and having two different types caused some problems with integration header and unnamed lambda feature, see #185 and #960. This patch redesigned `half` implementation in a way, that single wrapper data type is used as `half` representation on both host and device sides; differentiation between actual host and device implementations is done under the hood of this wrapper. Signed-off-by: Alexey Sachkov <alexey.sachkov@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The main problem that half type is defined as _Float16 on the device and
as manually implemented type on host so compiler could add _Float16
to the integration header and it will produce errors in host
compilation.
Signed-off-by: Mariya Podchishchaeva mariya.podchishchaeva@intel.com