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

Add support for page size > max prefetch cmd size for interleaved buffers #17677

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

sagarwalTT
Copy link
Contributor

#16861

This PR adds support for interleaved buffers to have page sizes which are greater than the max prefetch command size.

Checklist

@sagarwalTT sagarwalTT force-pushed the sagarwal/multi_page_buffer branch 3 times, most recently from 9ea6615 to adb30f7 Compare February 19, 2025 15:30
@sagarwalTT sagarwalTT force-pushed the sagarwal/multi_page_buffer branch 2 times, most recently from 1a338a7 to 1110f4b Compare February 19, 2025 15:51
@sagarwalTT sagarwalTT force-pushed the sagarwal/multi_page_buffer branch 2 times, most recently from 555056f to 7d0af92 Compare February 19, 2025 22:00
const uint32_t pcie_alignment = hal.get_alignment(HalMemType::HOST);
uint32_t mem_alignment = 0;
if (buffer.is_dram()) {
mem_alignment = hal.get_alignment(HalMemType::DRAM);
Copy link
Contributor

Choose a reason for hiding this comment

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

beyond the scope of this change, but buffer should return the hal memory type of the buffer to avoid mess like this

TT_ASSERT(buffer.is_l1());
mem_alignment = hal.get_alignment(HalMemType::L1);
}
while (partial_page_size % pcie_alignment != 0 || partial_page_size % mem_alignment != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be calculated explicitly not in a loop. hal could be improved to generate "max_alignment" during init so this doesn't have to get re-calculated

@sagarwalTT sagarwalTT force-pushed the sagarwal/multi_page_buffer branch from 7d0af92 to 9e7d015 Compare February 20, 2025 21:20
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