-
Notifications
You must be signed in to change notification settings - Fork 56
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
Use probability sampling over periodic sampling #213
Merged
Merged
Changes from all commits
Commits
Show all changes
95 commits
Select commit
Hold shift + click to select a range
6bfca81
kp_sampler_skip: putting in probabilistic sampling
vlkale fab829a
CMakeLists.txt in kokkos-sampler: fix add_library to kp_add_library
vlkale eeccd10
sampler's README.md: reflects sampler probability env var
vlkale d0a24ba
kp_sampler_skip.cpp: tool_prob_num default to -1.0 not 0.1
vlkale 9df6748
Update kp_sampler_skip.cpp: put erase back
vlkale b629300
Update kp_sampler_skip.cpp: putting in seed
vlkale df84895
kp_sampler: set default seed to -1, tool fence verbosity
624a14d
kp_sampler_skip.cpp: applied clang format
vlkale bd237ac
Sampler: reduce text in prints; revise README
vlkale 27ea88d
fix readme indent
vlkale ad08a5e
kp_sampler: fix name of seed environment varable and else condition f…
vlkale 5c1a272
Update kp_sampler_skip.cpp: fix msg Kokkos_tools_libs
vlkale 9dbd16b
Merge branch 'kokkos:develop' into use-probability-sampling
vlkale a6dd9dc
intitialized pointer
vlkale 52e3349
kp_sampler_skip.cpp: revert fix of initialize pointer
vlkale dae1f2c
Update kp_sampler_skip.cpp: fix func pointer - tools
vlkale 68c1093
kp_sampler_skip.cpp: provide_tpi parameter changed
vlkale 8c56daf
kp_core.hpp: provide_tpi takes struct
vlkale a2b8577
Update kp_sampler_skip.cpp: fix paren in invoke_ktools_fence
vlkale 43bd1a2
kp_sampler_skip.cpp: applied clang-format-8
vlkale 8021f36
kp_core.hpp: applied clang-format-8
vlkale e4e2121
Merge branch 'kokkos:develop' into use-probability-sampling
vlkale 5b66f90
Create test_randomized_sampling.cpp
vlkale d89291e
Create CMakeLists.txt
vlkale e1f7c22
Update test_randomized_sampling.cpp
vlkale d020036
test_randomized_sampling.cpp: fix matcher text for 4 samples
vlkale d2b0a69
Update CMakeLists.txt: add sampler subdirectory
vlkale cc9118d
Update CMakeLists.txt: fix to be kp_kokkos_sampler
vlkale fc3cc11
Update test_randomized_sampling.cpp: fix to test with RE2
vlkale 7f519ef
Update test_randomized_sampling.cpp: vector include
vlkale 0df7f5c
Update test_randomized_sampling.cpp: curly fix
vlkale 9ee7600
Update test_randomized_sampling.cpp: RE2 quotation fix
vlkale 4c241a2
CMakeLists.txt: put in test for kernel logger
vlkale e6e6545
test_randomized_sampling.cpp: sample number to be 100
vlkale 377ffa8
test_randomized_sampling.cpp: fix comment on test
vlkale 74f9196
test_randomized_sampling.cpp: env var default
vlkale e337319
Update CMakeLists.txt: fix sampler
vlkale d74eae7
Update CMakeLists.txt: put add'l env variables
vlkale 6049952
test_randomized_sampling.cpp: apply clang format
vlkale 0c9ce3f
CMakeLists.txt: put in sampler verbose
vlkale 64c6a58
test_randomized_sampling: apply clang format
vlkale 486ba9e
test_randomized_sampling.cpp: fixing setting environment variable in …
vlkale d509a6e
test_randomized_sampling.cpp: apply clang-format
vlkale 2c84bcc
fix test randomized sampling
vlkale 3cb33b4
CMakeLists.txt: fix enviornment var for KOKKOS_TOOLS_LIBS2
vlkale e4c4f6b
CMakeLists.txt: add global fences environment variable
vlkale fa33166
CMakeLists.txt: fix nesting of if's in ctest
vlkale 3c1fb93
Update CMakeLists.txt: kaeat_args
vlkale 375ebba
Update CMakeLists.txt: kp_kernel_logger fix
vlkale c19c018
Update CMakeLists.txt: fix target file 2
vlkale 8317118
add cmake
vlkale 5bb8e7d
Merge branch 'use-probability-sampling' of https://github.com/vlkale/…
vlkale 9517af5
random sampling
vlkale a03955e
test_randomized_sampling.cpp: fix matcher
vlkale a4285d3
Update CMakeLists.txt: fix sampler skip variable
vlkale 090245b
Update CMakeLists.txt: env var
vlkale 371ae92
Update kp_sampler_skip.cpp: remove else kernelSampleSkip
vlkale 27e112b
Update kp_sampler_skip.cpp: period in sampler fence printf
vlkale ceb1e2d
kp_sampler_skip.cpp: removed tool verbose str print
vlkale 44f1eb7
test_randomized_sampling.cpp: take out flushes
vlkale 19cbc2c
Convert kp_kernel_logger to std::cout
masterleinad c309f0e
Working
masterleinad 8cab46a
Almost working
masterleinad 83d17fb
Still working
masterleinad e683d6f
Use cout in sampler
masterleinad c93d11c
Revert changes to kp_kernel_logger.cpp
masterleinad 9d98e9e
kp_sampler_skip.cpp: apply clang format
vlkale 828597d
test_randomized_sampling.cpp: apply clang format
vlkale 7f0cd8a
More indentation
masterleinad d1b2036
Merge pull request #9 from masterleinad/use-probability-sampling
vlkale 2a376ca
kp_sampler_skip.cpp: fix reduce callee null check
vlkale b052594
Merge branch 'kokkos:develop' into use-probability-sampling
vlkale ce93309
kp_kernel_logger.cpp: scan typo fix
vlkale 0d8e79a
Rename test_randomized_sampling.cpp to test_parfor.cpp
vlkale c16004a
Update CMakeLists.txt: fix sampling
vlkale 3178c8b
Prob smplr (#16)
vlkale d280cbb
Merge branch 'develop' into use-probability-sampling
vlkale ca54d35
test_par*.cpp: apply clang format
vlkale 75f9057
test_parreduce.cpp: change test tag; apply clang format
vlkale 43868da
Merge branch 'kokkos:develop' into use-probability-sampling
vlkale 6f9cd82
Delete matchersProb.hpp
vlkale 39db70d
kp_sampler_skip.cpp: make function pointer correct
vlkale 8d28cf6
kp_sampler_skip.cpp: invoke kokkos tools fence
vlkale e28dccd
kp_sampler_skip.cpp: Remove small changes not relating to this PR
vlkale 367ca77
kp_sampler_skip.cpp: apply clang format
vlkale af97417
README.md: eliminate unintended changes in text to make diff more rea…
vlkale 4c48eb0
CMakeLists.txt for test tools: comment in sampler prob environment va…
vlkale bb538bb
kp_sampler_skip.cpp: apply clang format
vlkale b03c2c4
kp_sampler_skip.cpp: make probability sampling the priority (as before)
vlkale d571b94
kp_sampler_skip.cpp: fix conditional as per review request
vlkale a426547
kp_sampler_skip.cpp: putting back in conditional as requested
vlkale 1999883
kp_sampler_skip.cpp: apply clang-format
vlkale 4cdf85d
kp_sampler_skip.cpp: take out returns from input processing
vlkale f4627df
Merge branch 'develop' into use-probability-sampling
crtrott 679ba48
Fix clang-format
crtrott 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 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 |
---|---|---|
@@ -1,4 +1,11 @@ | ||
This is a sampler utility that is intended to complement other tools in the Kokkos Tools set. This utility allows for sampling (rather than collecting) of profiling or debugging data gathered from a particular tool of the Kokkos Tools set. The Kokkos Tools user provides a sampling rate via the environment variable KOKKOS_TOOLS_SAMPLER_SKIP. | ||
This is a sampler utility that is intended to complement other tools in the Kokkos Tools set. This utility allows for sampling (rather than collecting) of profiling or debugging data gathered from a particular tool of the Kokkos Tools set. | ||
|
||
To use this utility, a Kokkos Tools user provides a sampling probability by setting the environment variable `KOKKOS_TOOLS_SAMPLER_PROB` to a positive real number between 0.0 and 100.0. The user can alternatively set a sampling skip rate, i.e., the number of Kokkos kernel invocations to skip before the next sample is taken. The user does so by setting the environment variable `KOKKOS_TOOLS_SAMPLER_SKIP` to a non-negative integer. | ||
|
||
If both sampling probability and sampling skip rate are set by the user, this sampling utility only uses the sampling probability for sampling; the utility sets the sampling skip rate to 1, incorporating no pre-defined periodicity in sampling. If neither sampling probability nor the sampling skip rate are set by the user, then randomized sampling is done, with the sampler's probability being 10.0 percent. The sampler is periodic only if the sampling probability is not set by the user and the sampling skip rate is set by the user. | ||
|
||
For randomized sampling, the user can ensure reproducibility of this tool's output across multiple runs of a Kokkos application by setting `KOKKOS_TOOLS_RANDOM_SEED` to an integer value before all of the runs. If this environment variable is not set, the seed is based on the C time function. | ||
|
||
In order for the state of the sampled profiling and logging data in memory to be captured at the time of the utility's callback invocation, it might be important to enforce fences. However, this also means that there are more synchronization points compared with running the program without the tool. | ||
This fencing behavior can be controlled by setting the environment variable `KOKKOS_TOOLS_GLOBALFENCES`. A non-zero value implies global fences on invocation of the tool. The default is not to introduce extra fences. | ||
This fencing behavior can be controlled by setting the environment variable `KOKKOS_TOOLS_GLOBALFENCES`. A non-zero value implies global fences on invocation of the tool. The default is not to introduce extra fences. | ||
|
This file contains 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 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
Oops, something went wrong.
Oops, something went wrong.
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.
this means SamplerSkip is prioritized over random setting, because it overwrites the previous setting
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.
Yes, this is fixed now.