-
Notifications
You must be signed in to change notification settings - Fork 16
Masking and Padding Functionality #13
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
base: main
Are you sure you want to change the base?
Masking and Padding Functionality #13
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
Strided mask power of two
gamzeisl
left a comment
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.
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.
| - 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 |
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.
Is --skip-vector-validation required for all?
| "-S${input:seq_len}", | ||
| "-E${input:emb_len}", | ||
| "-P${input:prj_len}", | ||
| "--no-bias" |
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 change shouldn't be required
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.
Why was this removed? By mistake?
| # 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() | ||
|
|
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.
Why is this commented?
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.