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

Support for single attention layer #7

Merged
merged 7 commits into from
Oct 30, 2024

Conversation

gamzeisl
Copy link
Collaborator

This PR adds a new layer called SingleAttention that only calculates QK and AV. Testbenches and ci tests are modified accordingly.

Additionally:

  • Transposition of biases for V generation is moved from ita engine to hwpe side.
  • buildpath for simulations is fixed in the Makefile.

@gamzeisl gamzeisl requested a review from Xeratec October 30, 2024 11:05
Copy link
Collaborator

@Xeratec Xeratec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one minor comment of sth. I did not understand.

Comment on lines +66 to +69
if (bias_dir_i) begin
bias_reshape = read_data >> read_cnt_q[3:0] * 24;
data_o.data = {N {bias_reshape[0]}};
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is related to

Transposition of biases for V generation is moved from ITA engine to HWPE side.

However, I do not see how this is now handled on the HWPE side. Can you give me a quick pointer?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, we fetch one set of biases, find the required one with counter and replicate it N times. Previously, ITA was replicating them internally.

@gamzeisl gamzeisl merged commit 598b424 into pulp-platform:main Oct 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants