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] Add test cases for muptiplies,bit_or,bit_xor,bit_and subgroup … #158
Merged
vladimirlaz
merged 4 commits into
intel:intel
from
v-klochkov:public_vklochkov_spiprv_1_3
Mar 4, 2021
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c938a3d
[SYCL] Add test cases for muptiplies,bit_or,bit_xor,bit_and subgroup …
v-klochkov c3f7aeb
Additional fixes for CUDA: move spir-v 1.3 test cases to separate files
v-klochkov ac90159
Fix the check for sub-groups availability. It returned false even whe…
v-klochkov 925ce42
Add checks for cl_khr_fp16/fp64
v-klochkov 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| // UNSUPPORTED: cpu | ||
| // #2252 Disable until all variants of built-ins are available in OpenCL CPU | ||
| // runtime for every supported ISA | ||
|
|
||
| // UNSUPPORTED: cuda | ||
|
|
||
| // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out | ||
| // RUN: %HOST_RUN_PLACEHOLDER %t.out | ||
| // RUN: %CPU_RUN_PLACEHOLDER %t.out | ||
| // RUN: %GPU_RUN_PLACEHOLDER %t.out | ||
| // RUN: %ACC_RUN_PLACEHOLDER %t.out | ||
|
|
||
| // This test verifies the correct work of SPIR-V 1.3 reduce algorithm | ||
| // used with the operation MUL, bitwise OR, XOR, AND. | ||
|
|
||
| #include "reduce.hpp" | ||
|
|
||
| int main() { | ||
| queue Queue; | ||
| if (!core_sg_supported(Queue.get_device())) { | ||
| std::cout << "Skipping test\n"; | ||
| return 0; | ||
| } | ||
|
|
||
| check_mul<class MulA, int>(Queue); | ||
| check_mul<class MulB, unsigned int>(Queue); | ||
| check_mul<class MulC, long>(Queue); | ||
| check_mul<class MulD, unsigned long>(Queue); | ||
| check_mul<class MulE, float>(Queue); | ||
|
|
||
| check_bit_ops<class A, int>(Queue); | ||
| check_bit_ops<class B, unsigned int>(Queue); | ||
| check_bit_ops<class C, unsigned>(Queue); | ||
| check_bit_ops<class D, long>(Queue); | ||
| check_bit_ops<class E, unsigned long>(Queue); | ||
| check_bit_ops<class F, long long>(Queue); | ||
| check_bit_ops<class G, unsigned long long>(Queue); | ||
| return 0; | ||
| } |
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,20 @@ | ||
| // UNSUPPORTED: cuda | ||
|
|
||
| // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out | ||
| // RUN: %GPU_RUN_PLACEHOLDER %t.out | ||
|
|
||
| // This test verifies the correct work of SPIR-V 1.3 reduce algorithm | ||
| // used with MUL operation. | ||
|
|
||
| #include "reduce.hpp" | ||
|
|
||
| int main() { | ||
| queue Queue; | ||
| if (!core_sg_supported(Queue.get_device())) { | ||
| std::cout << "Skipping test\n"; | ||
| return 0; | ||
| } | ||
| check_mul<class MulHalf, cl::sycl::half>(Queue); | ||
| std::cout << "Test passed." << std::endl; | ||
| return 0; | ||
| } |
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,27 @@ | ||
| // UNSUPPORTED: cpu | ||
| // #2252 Disable until all variants of built-ins are available in OpenCL CPU | ||
| // runtime for every supported ISA | ||
|
|
||
| // UNSUPPORTED: cuda | ||
|
|
||
| // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out | ||
| // RUN: %HOST_RUN_PLACEHOLDER %t.out | ||
| // RUN: %CPU_RUN_PLACEHOLDER %t.out | ||
| // RUN: %GPU_RUN_PLACEHOLDER %t.out | ||
| // RUN: %ACC_RUN_PLACEHOLDER %t.out | ||
|
|
||
| // This test verifies the correct work of SPIR-V 1.3 reduce algorithm | ||
| // used with MUL operation. | ||
|
|
||
| #include "reduce.hpp" | ||
|
|
||
| int main() { | ||
| queue Queue; | ||
| if (!core_sg_supported(Queue.get_device())) { | ||
| std::cout << "Skipping test\n"; | ||
| return 0; | ||
| } | ||
| check_mul<class MulDouble, double>(Queue); | ||
| std::cout << "Test passed." << std::endl; | ||
| return 0; | ||
| } |
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,39 @@ | ||
| // UNSUPPORTED: cpu | ||
| // #2252 Disable until all variants of built-ins are available in OpenCL CPU | ||
| // runtime for every supported ISA | ||
|
|
||
| // UNSUPPORTED: cuda | ||
|
|
||
| // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out | ||
| // RUN: %HOST_RUN_PLACEHOLDER %t.out | ||
| // RUN: %CPU_RUN_PLACEHOLDER %t.out | ||
| // RUN: %GPU_RUN_PLACEHOLDER %t.out | ||
| // RUN: %ACC_RUN_PLACEHOLDER %t.out | ||
|
|
||
| // This test verifies the correct work of SPIR-V 1.3 exclusive_scan() and | ||
| // inclusive_scan() algoriths used with the operation MUL, bitwise OR, XOR, AND. | ||
|
|
||
| #include "scan.hpp" | ||
|
|
||
| int main() { | ||
| queue Queue; | ||
| if (!core_sg_supported(Queue.get_device())) { | ||
| std::cout << "Skipping test\n"; | ||
| return 0; | ||
| } | ||
| check_mul<class MulA, int>(Queue); | ||
| check_mul<class MulB, unsigned int>(Queue); | ||
| check_mul<class MulC, long>(Queue); | ||
| check_mul<class MulD, unsigned long>(Queue); | ||
| check_mul<class MulE, float>(Queue); | ||
|
|
||
| check_bit_ops<class A, int>(Queue); | ||
| check_bit_ops<class B, unsigned int>(Queue); | ||
| check_bit_ops<class C, unsigned>(Queue); | ||
| check_bit_ops<class D, long>(Queue); | ||
| check_bit_ops<class E, unsigned long>(Queue); | ||
| check_bit_ops<class F, long long>(Queue); | ||
| check_bit_ops<class G, unsigned long long>(Queue); | ||
| std::cout << "Test passed." << std::endl; | ||
| return 0; | ||
| } |
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,20 @@ | ||
| // UNSUPPORTED: cuda | ||
|
|
||
| // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out | ||
| // RUN: %GPU_RUN_PLACEHOLDER %t.out | ||
|
|
||
| // This test verifies the correct work of SPIR-V 1.3 exclusive_scan() and | ||
| // inclusive_scan() algoriths used with the MUL operation. | ||
|
|
||
| #include "scan.hpp" | ||
|
|
||
| int main() { | ||
| queue Queue; | ||
| if (!core_sg_supported(Queue.get_device())) { | ||
| std::cout << "Skipping test\n"; | ||
| return 0; | ||
| } | ||
| check_mul<class MulHalf, cl::sycl::half>(Queue); | ||
| std::cout << "Test passed." << std::endl; | ||
| return 0; | ||
| } | ||
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,27 @@ | ||
| // UNSUPPORTED: cpu | ||
| // #2252 Disable until all variants of built-ins are available in OpenCL CPU | ||
| // runtime for every supported ISA | ||
|
|
||
| // UNSUPPORTED: cuda | ||
|
|
||
| // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out | ||
| // RUN: %HOST_RUN_PLACEHOLDER %t.out | ||
| // RUN: %CPU_RUN_PLACEHOLDER %t.out | ||
| // RUN: %GPU_RUN_PLACEHOLDER %t.out | ||
| // RUN: %ACC_RUN_PLACEHOLDER %t.out | ||
|
|
||
| // This test verifies the correct work of SPIR-V 1.3 exclusive_scan() and | ||
| // inclusive_scan() algoriths used with the MUL operation. | ||
|
|
||
| #include "scan.hpp" | ||
|
|
||
| int main() { | ||
| queue Queue; | ||
| if (!core_sg_supported(Queue.get_device())) { | ||
v-klochkov marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| std::cout << "Skipping test\n"; | ||
| return 0; | ||
| } | ||
| check<class MulDouble, double>(Queue); | ||
| std::cout << "Test passed." << std::endl; | ||
| return 0; | ||
| } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.