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 131
[SYCL][ESIMD] Add test for esimd copy constructor #578
Merged
Conversation
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 provides functional that let obtain reference data and common function for constructing simd object, that return's output data that should be compared with reference data
yuriykoch
reviewed
Nov 23, 2021
This file will be useful for another tests on simd
For this test required init fp variables by bit statements and comparing fp variables by bitwise comparison. Co-Authored-By: Kochetkov, Yuriy <[email protected]>
- returning values without assignment it to variable - returning vector with ref data instead of interacting with vector, that obtained by reference - replacing if else block by if block because we doesn't provide some "else" block - remove duplicated values for init ref values in vector - rename "it" to "i" in sycles due to it's more logical
Update comments in the following files: - SYCL/ESIMD/api/functional/common.hpp - SYCL/ESIMD/api/functional/ctors/ctor_copy.cpp - SYCL/ESIMD/api/functional/value.hpp
Previous function and return value assignment was in a different lines, now they containings in the one line.
It would be better to switch to the SYCL-2020 headers
Renamed to shared_vector and shared_allocator. This names is better than privious names.
To enforce const-correctness for the reference data
LLVM Coding Standards required this.
By doing so we make it explicit for the fellow programmers that the function is not a part of the public API.
It't more correctness
It protect newly programmers for some unexpected errors
This function return zero for signed and unsigned datatypes, so this function will be called only for floating poin datatypes.
This allows increase runtime performance
This allows avoid using variables for expression like "max - 1"
It let avoid copy-paste of some code
It let avoid some double definition errors
yuriykoch
reviewed
Nov 25, 2021
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.
Thanks, Vasily
SYCL/ESIMD/api/functional/ctors/base_structs_with_invocation_ctx.hpp
Outdated
Show resolved
Hide resolved
- Uses do not need see some file-specific functions, so they moved into "details" namespace - Base clases was removed due to they could confuse new users - Ctors specific functions were moved to ctors/common.hpp
- remove static_case and use static variables min_plus_one and max_minus_one due to this better solutions - remove uniform initializations - remove std::is_arithmetic_v due to by this condition can pass data types that shouldn't be passed to the generate_ref_data function
Due to the fact this name more self-descriebe
This let us comparing user-defined data types
yuriykoch
reviewed
Nov 26, 2021
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.
Thanks Vasily) The code looks great.
Looks like it depends on PR #565 - please mark the dependency in description explicitly.
Thanks for the advice, done |
v-klochkov
reviewed
Dec 2, 2021
- Unsigned variables will be compared by == operation all other types will be compared bitwise - Added comment that explaining need to use bitwise comparison
v-klochkov
previously approved these changes
Dec 4, 2021
We requiring gpu and level_zero platforms due to the tests on simd constructors doesn't supported OPenCL platform yet
I've got unexpected static assertion when calling simd::copy_from() function. Was created issue in intel/llvm and this macros must be enabled when it is resolved
The test disabled because of the fact the static_assert was retrieved while calling simd::copy_from() function
@v-klochkov The test for |
v-klochkov
approved these changes
Dec 10, 2021
myler
pushed a commit
to myler/llvm-test-suite
that referenced
this pull request
Apr 12, 2022
aelovikov-intel
pushed a commit
to aelovikov-intel/llvm
that referenced
this pull request
Mar 27, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR provides test for
simd
copy constructor.The test verifies that
simd
's elements value is equal to values from reference dataAlso was added
common.hpp
file that provide functions for constructingreference data
and function for callingsimd
in a predefined contextThis PR depend on PR #565
In PR#565 can be found these files can be found in this :
logger.hpp
type_coverage.hpp