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
Update more tests to account for optionality of double type #1242
Merged
pvchupin
merged 6 commits into
intel:intel
from
AlexeySachkov:private/asachkov/update-tests-for-optional-double
Sep 13, 2022
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bba398d
Update more tests to account for optionality of double type
AlexeySachkov 1d84cb6
A couple of fixes
AlexeySachkov 4424a47
Revert spec constant changes
AlexeySachkov 4514445
Merge remote-tracking branch 'origin/intel' into private/asachkov/upd…
AlexeySachkov b68ac93
Update copy.cpp
AlexeySachkov a5e1dc5
Apply code review comments
AlexeySachkov 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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out | ||
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-device-code-split=per_kernel %s -o %t1.out | ||
// RUN: %CPU_RUN_PLACEHOLDER %t1.out | ||
// RUN: %GPU_RUN_PLACEHOLDER %t1.out | ||
// RUN: %ACC_RUN_PLACEHOLDER %t1.out | ||
|
@@ -27,12 +27,11 @@ struct test_struct { | |
long long d; | ||
half e; | ||
float f; | ||
double g; | ||
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. Could we have another struct with the double and give it the same treatment as just double? 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 think this can be addressed post-commit in another PR to fix the currently failing tests in CI asap. @intel/llvm-gatekeepers would you agree with that? If so, please merge it in - the tests modified here are passing in pre-commit CI and the failures are on other tests and thus unrelated. |
||
}; | ||
|
||
bool operator==(const test_struct &lhs, const test_struct &rhs) { | ||
return lhs.a == rhs.a && lhs.b == rhs.b && lhs.c == rhs.c && lhs.d == rhs.d && | ||
lhs.e == rhs.e && lhs.f == rhs.f && lhs.g == rhs.g; | ||
lhs.e == rhs.e && lhs.f == rhs.f; | ||
} | ||
|
||
template <typename T> T *regular(queue q, alloc kind) { | ||
|
@@ -44,6 +43,9 @@ template <typename T> T *aligned(queue q, alloc kind) { | |
} | ||
|
||
template <typename T> void test(queue q, T val, T *src, T *dst, bool dev_dst) { | ||
if (std::is_same_v<T, double> && !q.get_device().has(aspect::fp64)) | ||
return; | ||
|
||
q.fill(src, val, N).wait(); | ||
|
||
// Use queue::copy for the first half and handler::copy for the second | ||
|
@@ -87,7 +89,7 @@ int main() { | |
queue q; | ||
auto dev = q.get_device(); | ||
|
||
test_struct test_obj{4, 42, 424, 4242, 4.2f, 4.242f, 4.24242}; | ||
test_struct test_obj{4, 42, 424, 4242, 4.2f, 4.242f}; | ||
|
||
if (dev.has(aspect::usm_host_allocations)) { | ||
runTests<short>(q, 4, alloc::host, alloc::host); | ||
|
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'm also touching it in #1246, but I prefer your change. I'll exclude the file from my PR.