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

What the parameters "kShiftData" in matmul_tb.cc mean? #1

Open
sxbkdby8 opened this issue Jul 29, 2024 · 2 comments
Open

What the parameters "kShiftData" in matmul_tb.cc mean? #1

sxbkdby8 opened this issue Jul 29, 2024 · 2 comments

Comments

@sxbkdby8
Copy link

I can't find any other references about this variable.
Thank you for your help!

@lleon95
Copy link
Collaborator

lleon95 commented Jul 30, 2024

Hi. Yes. We are still working on it and will improve the documentation.

The kShiftData can be computed as the log2(kPackets), where kPackets is the number of data that can fit in the bus (kBus).

I saw it is undefined, so, you can replace the

  int size_a = a_rows * (b_cols >> kShiftData);
  int size_b = c_cols * (b_cols >> kShiftData);
  int size_c = a_rows * (c_cols >> kShiftData);

by

  int size_a = a_rows / kPackets;
  int size_b = c_cols / kPackets;
  int size_c = a_rows / kPackets;

Cheers,
Leon

@sxbkdby8
Copy link
Author

sxbkdby8 commented Jul 31, 2024 via email

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

No branches or pull requests

2 participants