Masking and Padding Functionality#13
Open
marcelkant wants to merge 62 commits intopulp-platform:mainfrom
Open
Conversation
Important Changes: - Change scaling of Softmax from 2**7-1 to 2**8-1 Current Limitations: - Only works without biases - Only works with ReLU activation - FeedForward and MatMul do only work with one Tile
…63_E127_P64_F64_H1_B1
added 16 commits
December 6, 2024 12:02
Strided mask power of two
gamzeisl
reviewed
Apr 22, 2025
Collaborator
gamzeisl
left a comment
There was a problem hiding this comment.
I’ve only left a few minor comments for now, as it would be better to review the full code after it’s rebased onto the current main.
Comment on lines
+29
to
+39
| - python testGenerator.py -H 1 -S 64 -E 64 -P 64 -F 64 --activation gelu --skip-vector-validation | ||
| - python testGenerator.py -H 1 -S 128 -E 192 -P 256 -F 256 --activation gelu --skip-vector-validation | ||
| - python testGenerator.py -H 1 -S 192 -E 256 -P 128 -F 128 --activation relu --skip-vector-validation | ||
| - python testGenerator.py -H 1 -S 1 -E 2 -P 3 -F 3 --activation gelu --skip-vector-validation | ||
| - python testGenerator.py -H 1 -S 1 -E 2 -P 3 -F 3 --activation relu --skip-vector-validation | ||
| - python testGenerator.py -H 1 -S 63 -E 62 -P 61 -F 61 --activation relu --skip-vector-validation | ||
| - python testGenerator.py -H 1 -S 65 -E 130 -P 195 -F 195 --activation relu --skip-vector-validation | ||
| - python testGenerator.py -H 1 -S 127 -E 190 -P 253 -F 253 --activation relu --skip-vector-validation | ||
| - python testGenerator.py -H 1 -S 511 -E 511 -P 127 -F 63 --activation relu --skip-vector-validation | ||
| - python testGenerator.py -H 1 -S 63 -E 63 -P 50 -F 129 --activation gelu --skip-vector-validation | ||
| - python testGenerator.py -H 1 -S 255 -E 63 -P 511 -F 511 --activation identity --skip-vector-validation |
Collaborator
There was a problem hiding this comment.
Is --skip-vector-validation required for all?
| "-S${input:seq_len}", | ||
| "-E${input:emb_len}", | ||
| "-P${input:prj_len}", | ||
| "--no-bias" |
Collaborator
There was a problem hiding this comment.
This change shouldn't be required
Collaborator
There was a problem hiding this comment.
Why was this removed? By mistake?
Comment on lines
+55
to
+63
| # output_files = ["Qp_0", "Kp_0", "Vp_0", "A_0", "Out_soft_0", "FFp_0", "FF2p_0"] | ||
| # if name in output_files: | ||
| # import matplotlib.pyplot as plt | ||
| # heatmap = np.squeeze(matrix) | ||
| # plt.imshow(heatmap, cmap='viridis') | ||
| # plt.colorbar() | ||
| # plt.title(f"{name}") | ||
| # plt.show() | ||
|
|
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.
This commit introduces adjustments to enable the padding and masking functionality. I verified this version using an automated test script, which evaluated the design with 250 random test vectors.