-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL][ESIMD] Add ESIMD PrefixSum kernel tests. #2595
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
Conversation
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 have only looked into PrefixSum.cpp
test.
If I understood correctly the test is still under development.
If so, please move it to draft or mark as [WIP]
in caption.
#define MIN_NUM_THREADS \ | ||
1 // minimum number of threads to launch a kernel (power of 2) |
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.
This is no good. The macro will expand into 1 // and the comment
which may lead to unexpected and unwanted consequences.
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.
Fixed.
#if TUPLE_SZ == 1 | ||
#define GATHER_SCATTER_MASK ESIMD_R_ENABLE | ||
#elif TUPLE_SZ == 2 | ||
#define GATHER_SCATTER_MASK ESIMD_GR_ENABLE | ||
#elif TUPLE_SZ == 4 | ||
#define GATHER_SCATTER_MASK ESIMD_ABGR_ENABLE | ||
#endif |
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.
Should we also have RUN
's for the test with different TUPLE_SZ
?
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.
This is a demo case for implementing PrefixSum in ESIMD, with configurable parameters for tuning purpose. Some different TUPLE_SIZE are exercised in other variants of this kernel.
#if 0 | ||
if (argc < 2) { | ||
std::cout << "Usage: prefix [N]. N is 2^N entries x TUPLE_SZ" << std::endl; | ||
exit(1); | ||
} | ||
unsigned log2_element = atoi(argv[1]); | ||
#endif |
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.
Please remove these as it makes hard to read the code.
Though, passing arguments to test binary is nice way to improve its debuggability.
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.
Changed to use input argument.
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 would suggest adding a short description of what those tests do and how they differ from each other.
@kychendev ESIMD tests were moved to llvm-test-suite (#2611). |
@DenisBakhvalov, thanks for clarification. I have created a new PR for llvm-test-suite. Closing this PR. |
Reduce CI matrix in preparation for repo move
Reduce CI matrix in preparation for repo move
No description provided.