Skip to content
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: Implement compiled Angle and SoftMax derivative Functions #2528

Merged
merged 7 commits into from
Nov 9, 2022

Conversation

jvesely
Copy link
Collaborator

@jvesely jvesely commented Nov 9, 2022

Switch to fixed implementation of ReLU derivative in both Python and compiled variant.
Use input consistently in SoftMax derivative (Python).
Add sin and cos builtin functions, PTX can't select instructions for llvm.sin/llvm.cos opcodes.

PTX can't select llvm intrinsics, use builtin wrapper functions.

Signed-off-by: Jan Vesely <[email protected]>
This will allow generating softmax with different output type than the
one set by the SoftMax Function instance.

Signed-off-by: Jan Vesely <[email protected]>
@jvesely jvesely added the compiler Runtime Compiler label Nov 9, 2022
@jvesely jvesely added this to the Compilation Parity milestone Nov 9, 2022
@jvesely jvesely changed the title llvm: Implement compiled of Angle and SoftMax derivative llvm: Implement compiled Angle and SoftMax derivative Functions Nov 9, 2022
@github-actions
Copy link

github-actions bot commented Nov 9, 2022

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

No differences!

...

See CI logs for the full diff.

@jvesely jvesely merged commit 1be8e5d into PrincetonUniversity:devel Nov 9, 2022
jvesely added a commit that referenced this pull request Nov 11, 2022
PR #2528 introduced two breaking changes
1.) Renamed ReLU's derivative argument 'input'->'variable' which broke existing users of ReLU derivative.
2.) Changed SoftMax derivative calculation to use 'input' instead of 'output'. This is incorrect as the algorithm reuses existing outputs to calculate derivative results.

Both are restored to their original form.
Moreover, a single input codepath is added to SoftMax, calculating results if they are not provided.
The compiled version and tests are adjusted accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Runtime Compiler
Projects
Development

Successfully merging this pull request may close these issues.

1 participant