Skip to content

performance: skip over any zero diagonal rows in a 2-D conv#2460

Merged
copybara-service[bot] merged 1 commit intomainfrom
test_842323494
Dec 9, 2025
Merged

performance: skip over any zero diagonal rows in a 2-D conv#2460
copybara-service[bot] merged 1 commit intomainfrom
test_842323494

Conversation

@copybara-service
Copy link
Contributor

performance: skip over any zero diagonal rows in a 2-D conv

a 2-D convolution is transformed into a large matrix vector product. when we diagonalize this filter matrix to evaluate this with halevi-shoup, we find many zero diagonals. this calculates the zero diagonals from the layout relation of the expanded diagonalized filter matrix and skips over the corresponding summands in the halevi-shoup implementation.

Adds

  • fuzz testing, comparing both the diagonal skipping implementation and no skipping, and the naive impl
  • e2e test testing that only a restricted # of diagonals are multiplied
  • unit tests verifying that the calculation of the zero diagonals in right

a 2-D convolution is transformed into a large matrix vector product. when we diagonalize this filter matrix to evaluate this with halevi-shoup, we find many zero diagonals. this calculates the zero diagonals from the layout relation of the expanded diagonalized filter matrix and skips over the corresponding summands in the halevi-shoup implementation.

Adds
* fuzz testing, comparing both the diagonal skipping implementation and no skipping, and the naive impl
* e2e test testing that only a restricted # of diagonals are multiplied
* unit tests verifying that the calculation of the zero diagonals in right

PiperOrigin-RevId: 842382620
@copybara-service copybara-service bot merged commit 7338398 into main Dec 9, 2025
@copybara-service copybara-service bot deleted the test_842323494 branch December 9, 2025 21:54
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