-
Notifications
You must be signed in to change notification settings - Fork 794
[SYCL] Fix using some of math built-ins when ESIMD is included #14793
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
Merged
sarnex
merged 3 commits into
intel:sycl
from
AlexeySachkov:private/asachkov/revert-13383
Jul 29, 2024
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // RUN: %clangxx -fsycl -fsyntax-only %s | ||
|
|
||
| #include <sycl/sycl.hpp> | ||
|
|
||
| #include <sycl/ext/intel/esimd.hpp> | ||
|
|
||
| SYCL_EXTERNAL sycl::vec<int, 8> call_abs_vec(sycl::vec<int, 8> input) { | ||
| return sycl::abs(input); | ||
| } | ||
|
|
||
| SYCL_EXTERNAL int call_abs_scalar(int input) { return sycl::abs(input); } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // RUN: %clangxx -fsycl -fsyntax-only %s | ||
|
|
||
| #include <sycl/sycl.hpp> | ||
|
|
||
| #include <sycl/ext/intel/esimd.hpp> | ||
|
|
||
| SYCL_EXTERNAL sycl::vec<int, 8> call_clz_vec(sycl::vec<int, 8> input) { | ||
| return sycl::clz(input); | ||
| } | ||
|
|
||
| SYCL_EXTERNAL int call_clz_scalar(int input) { return sycl::clz(input); } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // RUN: %clangxx -fsycl -fsyntax-only %s | ||
|
|
||
| #include <sycl/sycl.hpp> | ||
|
|
||
| #include <sycl/ext/intel/esimd.hpp> | ||
|
|
||
| SYCL_EXTERNAL sycl::vec<int, 8> call_ctz_vec(sycl::vec<int, 8> input) { | ||
| return sycl::ctz(input); | ||
| } | ||
|
|
||
| SYCL_EXTERNAL int call_ctz_scalar(int input) { return sycl::ctz(input); } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // RUN: %clangxx -fsycl -fsyntax-only %s | ||
|
|
||
| #include <sycl/sycl.hpp> | ||
|
|
||
| #include <sycl/ext/intel/esimd.hpp> | ||
|
|
||
| SYCL_EXTERNAL sycl::vec<float, 8> call_fabs_vec(sycl::vec<float, 8> input) { | ||
| return sycl::fabs(input); | ||
| } | ||
|
|
||
| SYCL_EXTERNAL float call_fabs_scalar(float input) { return sycl::fabs(input); } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // RUN: %clangxx -fsycl -fsyntax-only %s | ||
|
|
||
| #include <sycl/sycl.hpp> | ||
|
|
||
| #include <sycl/ext/intel/esimd.hpp> | ||
|
|
||
| SYCL_EXTERNAL sycl::vec<float, 8> call_fma_vec(sycl::vec<float, 8> a, | ||
| sycl::vec<float, 8> b, | ||
| sycl::vec<float, 8> c) { | ||
| return sycl::fma(a, b, c); | ||
| } | ||
|
|
||
| SYCL_EXTERNAL float call_fma_scalar(float a, float b, float c) { | ||
| return sycl::fma(a, b, c); | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| // RUN: %clangxx -fsycl -fsyntax-only %s | ||
|
|
||
| #include <sycl/sycl.hpp> | ||
|
|
||
| #include <sycl/ext/intel/esimd.hpp> | ||
|
|
||
| SYCL_EXTERNAL sycl::vec<float, 8> call_fmax_vec(sycl::vec<float, 8> a, | ||
| sycl::vec<float, 8> b) { | ||
| return sycl::fmax(a, b); | ||
| } | ||
|
|
||
| SYCL_EXTERNAL float call_fmax_scalar(float a, float b) { | ||
| return sycl::fmax(a, b); | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| // RUN: %clangxx -fsycl -fsyntax-only %s | ||
|
|
||
| #include <sycl/sycl.hpp> | ||
|
|
||
| #include <sycl/ext/intel/esimd.hpp> | ||
|
|
||
| SYCL_EXTERNAL sycl::vec<float, 8> call_fmin_vec(sycl::vec<float, 8> a, | ||
| sycl::vec<float, 8> b) { | ||
| return sycl::fmin(a, b); | ||
| } | ||
|
|
||
| SYCL_EXTERNAL float call_fmin_scalar(float a, float b) { | ||
| return sycl::fmin(a, b); | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // RUN: %clangxx -fsycl -fsyntax-only %s | ||
|
|
||
| #include <sycl/sycl.hpp> | ||
|
|
||
| #include <sycl/ext/intel/esimd.hpp> | ||
|
|
||
| SYCL_EXTERNAL sycl::vec<int, 8> call_popcount_vec(sycl::vec<int, 8> input) { | ||
| return sycl::popcount(input); | ||
| } | ||
|
|
||
| SYCL_EXTERNAL int call_popcount_scalar(int input) { | ||
| return sycl::popcount(input); | ||
| } |
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.
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.
instead what if we SFINAE these to only work when N==1, so we use the compiler generated ones by default?
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.
Whatever, I'll deal with this later. Will approve/merge for now.