Skip to content

Use square dot tiles when B is packed per split of n and A doesn't fit in cache. - #11713

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1000733554
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1000733554

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Use square dot tiles when B is packed per split of n and A doesn't fit in cache.

With a dynamic B, B is packed outside the loop over m, so A is read once per
split of n. With AVX2 kernels (block_n = 16) and large k,
choose_split_factors picked tall 128x32 tiles, so an A larger than the cache
was streamed from memory n / 32 times. Square tiles are now used when one pass
over A exceeds 32 MB, which halves the reads of A. AVX-512 kernels already get
64x64 tiles for k >= 512, so on those CPUs only tall dots with small k change.

…t in cache.

With a dynamic B, B is packed outside the loop over m, so A is read once per
split of n. With AVX2 kernels (block_n = 16) and large k,
`choose_split_factors` picked tall 128x32 tiles, so an A larger than the cache
was streamed from memory n / 32 times. Square tiles are now used when one pass
over A exceeds 32 MB, which halves the reads of A. AVX-512 kernels already get
64x64 tiles for k >= 512, so on those CPUs only tall dots with small k change.

PiperOrigin-RevId: 1000733554
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.

1 participant