Skip to content

Making multiplication and inner product more efficient#1

Open
goforashutosh wants to merge 6 commits intoDCMMC:mainfrom
goforashutosh:main
Open

Making multiplication and inner product more efficient#1
goforashutosh wants to merge 6 commits intoDCMMC:mainfrom
goforashutosh:main

Conversation

@goforashutosh
Copy link

Hi, we used this repo for matrix multiplication, which involved a large number of multiplications and inner products. The diff below shows a lot of changes due to the formatting differences in our code, but this fork only modifies two functions, which were in the original repo- signed_div_scale and inner_product.

For signed_div_scale, we implement |q|<2^3p bound by translating q by 2^3p and doing a range check. This reduces the number of cells required per multiplication call from ~250 to ~90 (for lookup bits = 12).

For inner_product, we change the implementation so that signed_div_scale is called only once since this is the expensive call. This makes the number of cells go from 90*N to N+90 where is the size of the vectors for inner product.

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