This repository was archived by the owner on Mar 28, 2023. It is now read-only.
forked from llvm/llvm-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 130
[SYCL] Check for aspect::fp64 in ESIMD/api/*ops_heavy.cpp #1248
Merged
Merged
Changes from all commits
Commits
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
// Exclude PVC not to run same test cases twice (via the *_pvc.cpp variant). | ||
// REQUIRES: gpu && !gpu-intel-pvc | ||
// UNSUPPORTED: cuda || hip | ||
// RUN: %clangxx -fsycl %s -o %t.out | ||
// RUN: %clangxx -fsycl-device-code-split=per_kernel -fsycl %s -o %t.out | ||
// RUN: %GPU_RUN_PLACEHOLDER %t.out | ||
|
||
// Tests various binary operations applied to simd objects. | ||
|
@@ -266,11 +266,13 @@ int main(void) { | |
auto arith_ops = esimd_test::ArithBinaryOpsNoDiv; | ||
passed &= test<unsigned char, int, 1, BinOp, VSf, IDf>(arith_ops, q); | ||
passed &= test<char, float, 7, BinOp, VEf, IDf>(arith_ops, q, 0.000001f); | ||
passed &= test<short, double, 7, BinOp, VEf, IDf>(arith_ops, q, 1e-15); | ||
if (dev.has(aspect::fp64)) | ||
passed &= test<short, double, 7, BinOp, VEf, IDf>(arith_ops, q, 1e-15); | ||
passed &= test<float, float, 32, BinOp, VEf, IDf>(arith_ops, q, 0.000001f); | ||
passed &= test<half, char, 1, BinOp, verify_n, IDf>(arith_ops, q, 1); | ||
passed &= test<half, unsigned int, 32, BinOp, VSf, IDf>(arith_ops, q, 1); | ||
passed &= test<double, half, 7, BinOp, VSf, IDf>(arith_ops, q); | ||
if (dev.has(aspect::fp64)) | ||
passed &= test<double, half, 7, BinOp, VSf, IDf>(arith_ops, q); | ||
passed &= test<short, uint64_t, 7, BinOp, VSf, IDf>(arith_ops, q); | ||
#ifdef USE_BF16 | ||
passed &= test<bfloat16, int, 8, BinOp, VSf, IDf>(arith_ops, q); | ||
|
@@ -282,13 +284,15 @@ int main(void) { | |
passed &= test<unsigned char, int, 1, BinOp, VSf, IDf>(div_op, q); | ||
passed &= test<char, float, 7, BinOp, VEf, IDf>(div_op, q, 0.000001f); | ||
#ifndef WA_BUG | ||
passed &= test<short, double, 7, BinOp, VSf, IDf>(div_op, q); | ||
if (dev.has(aspect::fp64)) | ||
passed &= test<short, double, 7, BinOp, VSf, IDf>(div_op, q); | ||
#endif // WA_BUG | ||
passed &= test<float, float, 32, BinOp, VEf, IDf>(div_op, q, 0.000001f); | ||
passed &= test<half, char, 1, BinOp, verify_n, IDf>(div_op, q, 1); | ||
passed &= test<half, unsigned int, 32, BinOp, VSf, IDf>(div_op, q, 1); | ||
Comment on lines
291
to
292
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you please add check for fp16? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather do it in a different PR. Fp64 is way more urgent because our CI is broken. |
||
#ifndef WA_BUG | ||
passed &= test<double, half, 7, BinOp, VSf, IDf>(div_op, q); | ||
if (dev.has(aspect::fp64)) | ||
passed &= test<double, half, 7, BinOp, VSf, IDf>(div_op, q); | ||
#endif // WA_BUG | ||
passed &= test<short, uint64_t, 7, BinOp, VSf, IDf>(div_op, q); | ||
#ifdef USE_BF16 | ||
|
@@ -327,11 +331,13 @@ int main(void) { | |
auto cmp_ops = esimd_test::CmpOps; | ||
passed &= test<unsigned char, int, 1, CmpOp, VSf, IDf>(cmp_ops, q); | ||
passed &= test<char, float, 7, CmpOp, VSf, IDf>(cmp_ops, q); | ||
passed &= test<short, double, 7, CmpOp, VSf, IDf>(cmp_ops, q); | ||
if (dev.has(aspect::fp64)) | ||
passed &= test<short, double, 7, CmpOp, VSf, IDf>(cmp_ops, q); | ||
passed &= test<float, float, 32, CmpOp, VSf, IDf>(cmp_ops, q); | ||
passed &= test<half, char, 1, CmpOp, VSf, IDf>(cmp_ops, q, 1); | ||
passed &= test<half, unsigned int, 32, CmpOp, VSf, IDf>(cmp_ops, q, 1); | ||
passed &= test<double, half, 7, CmpOp, VSf, IDf>(cmp_ops, q); | ||
if (dev.has(aspect::fp64)) | ||
passed &= test<double, half, 7, CmpOp, VSf, IDf>(cmp_ops, q); | ||
passed &= test<short, uint64_t, 7, CmpOp, VSf, IDf>(cmp_ops, q); | ||
#ifdef USE_BF16 | ||
passed &= test<bfloat16, int, 32, CmpOp, VSf, IDf>(cmp_ops, q); | ||
|
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
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.
I think, this code should check for both fp64 and fp16