-
Notifications
You must be signed in to change notification settings - Fork 99
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
PERF TESTS: adding utilities and instantiation wrapper #1676
Conversation
@brian-kelley @e10harvey |
} else if (0 == Test::string_compare_no_case(argv[argIdx], "--sycl")) { | ||
params.use_sycl = atoi(argv[++argIdx]) + 1; | ||
validated_input[argIdx] = 1; | ||
} |
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.
How about instead of returning a flag for each arg index whether it's a common param, just return a vector of strings that has all the remaining, non-common args? That would make it easier for each perf test to parse and validate its own specific options.
This also needs bounds checking before reading argv[++argIdx]
- for example if --cuda
is the last argument, this will read past the end of the argv array.
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.
And yeah, I missed the bounds checking issue in spadd again, but here we can fix it once and for all :)
Making a note that this is contributing to resolve issue #1674 |
e63917a
to
021716d
Compare
The goal of this work is to create a common core infrastructure for the performance test in order to simplify maintenance. Here two ideas are introduced: 1. the instantiation wrapper 2. the common input parser both are trying to capture some of the implementation of our performance test in generic functions that can be called instead of duplicating logic around instantiation and command line input parsing. The new parsing routine checks the parameter name and that the associated value can be casted properly. It also add some logic to remove the arguments from argv and argc once they are parsed properly.
f51e0ff
to
d3ffe82
Compare
Status Flag 'Pull Request AutoTester' - User Requested Retest - Label AT: RETEST will be reset after testing. |
Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection Is Not Necessary for this Pull Request. |
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: KokkosKernels_PullRequest_GCC930_Light_Tpls_GCC930
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_CUDA11_CUDA11_LayoutRight
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_GCC1020
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_GCC1020_Light_LayoutRight
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_Tpls_GCC1020
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_Tpls_INTEL19
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_CLANG1001
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_CLANG13CUDA10
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_A64FX_Tpls_ARMPL2110
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_A64FX_GCC1020
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_VEGA908_ROCM520
Jenkins Parameters
Using Repos:
Pull Request Author: lucbv |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED Pull Request Auto Testing has PASSED (click to expand)Build InformationTest Name: KokkosKernels_PullRequest_GCC930_Light_Tpls_GCC930
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_CUDA11_CUDA11_LayoutRight
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_GCC1020
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_GCC1020_Light_LayoutRight
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_Tpls_GCC1020
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_Tpls_INTEL19
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_CLANG1001
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_CLANG13CUDA10
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_A64FX_Tpls_ARMPL2110
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_A64FX_GCC1020
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_VEGA908_ROCM520
Jenkins Parameters
|
Status Flag 'Pre-Merge Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
One more review please : ) |
Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ brian-kelley ]! |
Status Flag 'Pull Request AutoTester' - Pull Request MUST BE MERGED MANUALLY BY Project Team - This Repo does not support Automerge |
Co-authored-by: brian-kelley <brian.honda11@gmail.com>
Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection Is Not Necessary for this Pull Request. |
Status Flag 'Pull Request AutoTester' - GitHub reports Mergeable status = None |
<< "\t\t'--hip [deviceIndex]' |\n" | ||
<< "\t\t'--sycl [deviceIndex]'\n\n" | ||
<< "\tIf no parallel backend is requested, Serial will be used " | ||
"(if enabled)\n\n"; |
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.
Consider adding '--' to the end to denote the beginning of 'application' options.
num_threads = params.use_openmp; | ||
} else if (params.use_threads) { | ||
num_threads = params.use_threads; | ||
} |
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.
Error if both use_openmp and use_threads are set.
if (params.use_openmp) { | ||
#if defined(KOKKOS_ENABLE_OPENMP) | ||
std::cout << "Running on OpenMP backend.\n"; | ||
KOKKOSKERNELS_PERF_TEST_NAME<Kokkos::OpenMP>(argc, argv, params); |
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.
See https://github.com/kokkos/kokkos-kernels/blob/master/perf_test/blas/blas3/KokkosBlas3_gemm_perf_test.hpp#L73-L133 for another approach using a table of function pointers.
The goal of this work is to create a common core infrastructure for the performance test in order to simplify maintenance. Here two ideas are introduced:
both are trying to capture some of the implementation of our performance test in generic functions that can be called instead of duplicating logic around instantiation and command line input parsing.
The code in this PR could be used to refactor KokkosSparse_spadd.cpp, specifically it's main() function.
Ideally it would be replaced with the code below: