Extending standard library to include ML-relevant operations#4634
Open
achowd32 wants to merge 1 commit into
Open
Extending standard library to include ML-relevant operations#4634achowd32 wants to merge 1 commit into
achowd32 wants to merge 1 commit into
Conversation
This file contains hidden or 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
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.
Hi, I'm a first time open source contributor looking to get involved and add something to XLS. After reading the XLS ideas page and going through issues such as this one, I decided to start by making an extension to the standard library to include more ML-relevant operations (which are becoming increasingly important in the hardware domain). This work has been overseen by @msaligane, who is a visiting faculty at Google.
I wanted to keep the pull requests fairly atomic, so I started with just two operations: ReLU (which is a pure fn) and a weight-stationary systolic array (which is a proc). I have more operations I am working on (e.g. approximated Softmax, output-stationary systolic array, etc) which I would be happy to contribute if reviewers are satisfied with this work, alongside appropriate documentation. I could pivot to a related idea in the standard library if the XLS team would prefer (e.g. a quantized floating point format).
I would like to note that the code for the systolic array here is different to the one provided in examples here. I found that my code got improved compilation times for the same architecture (details below). I am happy to gather PPA stats if it is deemed important.
The above times were averaged on 5 runs on a 16x16 systolic array.
I would sincerely appreciate all feedback, as I am trying to learn and would love to make this work.
P. S. I seem to have found a bug in the DSLX formatter wherein comments cannot be placed between multi-line arrays. There doesn't seem to be an open issue for this, so I may file one later.