Skip to content

Conversation

@ChrisPattison
Copy link
Collaborator

We will want some integration tests for this, but it's probably more important to not have a huge diff piling up

@ChrisPattison
Copy link
Collaborator Author

ChrisPattison commented Dec 20, 2021

I've just added a unit test (currently failing) for SYRK although we probably don't want to run it with the regular unit tests because it requires a hardware kernel. Do you have any suggestions here?

@definelicht
Copy link
Contributor

You can see what I did for GEMM, it's a test but not a unit test

@ChrisPattison
Copy link
Collaborator Author

There's a nice routine to search for the kernel at Apfp::FindKernel. It might be useful to reuse elsewhere, but I left it where it is for now

Copy link
Contributor

@definelicht definelicht left a comment

Choose a reason for hiding this comment

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

There are still several unaddressed comments from last review. Did you miss them, or is it stuff you want to postpone?

#pragma HLS LOOP_FLATTEN
DramLine num[1];
num[0] = mem[(n0 * kTileSizeN + n1) * size_k + k];
num[0] = mem[((n0 * kTileSizeN + n1) + k * size_n) * kLinesPerNumber];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
num[0] = mem[((n0 * kTileSizeN + n1) + k * size_n) * kLinesPerNumber];
num[0] = mem[k * size_n + n0 * kTileSizeN + n1];

#pragma HLS PIPELINE II = 1
#pragma HLS LOOP_FLATTEN
num[i] = mem[((n0 * kTileSizeN + n1) * size_k + k) * kLinesPerNumber + i];
num[i] = mem[((n0 * kTileSizeN + n1) + k * size_n) * kLinesPerNumber + i];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
num[i] = mem[((n0 * kTileSizeN + n1) + k * size_n) * kLinesPerNumber + i];
num[i] = mem[(k * size_n + n0 * kTileSizeN + n1) * kLinesPerNumber + i];

#pragma HLS PIPELINE II = 1
#pragma HLS LOOP_FLATTEN
num[i] = mem[(k * size_m + m0 * kTileSizeM + m1) * kLinesPerNumber + i];
num[i] = mem[(k + (m0 * kTileSizeM + m1) * size_k) * kLinesPerNumber + i];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
num[i] = mem[(k + (m0 * kTileSizeM + m1) * size_k) * kLinesPerNumber + i];
num[i] = mem[((m0 * kTileSizeM + m1) * size_k + k) * kLinesPerNumber + i];

#pragma HLS LOOP_FLATTEN
DramLine num[1];
num[0] = mem[k * size_m + m0 * kTileSizeM + m1];
num[0] = mem[(k + (m0 * kTileSizeM + m1) * size_k) * kLinesPerNumber];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
num[0] = mem[(k + (m0 * kTileSizeM + m1) * size_k) * kLinesPerNumber];
num[0] = mem[(m0 * kTileSizeM + m1) * size_k + k];

@definelicht definelicht force-pushed the main branch 6 times, most recently from 43d8a88 to 3860e6e Compare May 17, 2022 03:27
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