-
Notifications
You must be signed in to change notification settings - Fork 32
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
llvm/OneHot: Implement all modes #3124
Merged
Merged
Conversation
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
Results, errors, warning, are testid independently for each value of tested softmax_choice parameter. Signed-off-by: Jan Vesely <[email protected]>
Signed-off-by: Jan Vesely <[email protected]>
Simplify implementation. Handle multidimensional arrays. Signed-off-by: Jan Vesely <[email protected]>
Signed-off-by: Jan Vesely <[email protected]>
The other modes will be update to match generalized Python behaviour. Signed-off-by: Jan Vesely <[email protected]>
…ISTIC Allow output of multiple extremes. Enable tests. Still TODO: * mode==DETERMINISTIC * tie==RANDOM (only used with mode==DETERMINISTIC) * 2d arguments Signed-off-by: Jan Vesely <[email protected]>
Not needed since OneHot now supports all modes != DETERMINISTIC Cleanup codestyle. Signed-off-by: Jan Vesely <[email protected]>
Remove call_elementwise_operation helper. Signed-off-by: Jan Vesely <[email protected]>
…DETERMINISTIC mode Drop random_state and seed if "tie" is not RANDOM Signed-off-by: Jan Vesely <[email protected]>
Use "recursive_iterate_arrays" to support 2d input. Signed-off-by: Jan Vesely <[email protected]>
Change test name to include "int32" Use np.uint32 type for numpy PRNG Signed-off-by: Jan Vesely <[email protected]>
Uses Lemire's algorithm [0]. Applies to Philox PRNG using "integers" API call, "randint" uses older, "masked rejection sampling" approach. [0] https://arxiv.org/abs/1805.10941 Signed-off-by: Jan Vesely <[email protected]>
Uses bit masked rejection sampling of lower bits. Matches to Numpy's Random.randint API call. Signed-off-by: Jan Vesely <[email protected]>
Signed-off-by: Jan Vesely <[email protected]>
This PR causes the following changes to the html docs (ubuntu-latest-3.11):
See CI logs for the full diff. |
It no longer needs to fit search for extreme values. Signed-off-by: Jan Vesely <[email protected]>
This PR causes the following changes to the html docs (ubuntu-latest-3.11):
See CI logs for the full diff. |
Signed-off-by: Jan Vesely <[email protected]>
This PR causes the following changes to the html docs (ubuntu-latest-3.11):
See CI logs for the full diff. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Refactor Python OneHot implementation.
Add tests for OneHot(mode=DETERMINISTIC).
Refactor compiled OneHot to isolate PROB and PROB_INDICATOR.
Convert recursive traversal of arrays from generator to context manager.
Implement compiled random integer generation for bounded integers.
Implement all OneHot modes in compiled mode.