Skip to content

Conversation

@PenghuiCheng
Copy link
Contributor

Matrix multiplication with bias $Y = A * B + Bias$, where A has size (M x K) or (Batch_size x M x k), B has size (K x N), Bias has size (n), and Y will have a size (M x N) or (Batch_size x M x N). To transpose A or B before multiplication, pass 1 to the trans_a and/or trans_b arguments, which separate the first and second dimensions of the respective matrices using axis_a and axis_b.

This patch depend on #19955.
Change-Id: Iea33d609f814a062d4e2b1b48a96e8a1da9f1072

@pytorchbot pytorchbot added caffe2 module: pybind Related to our Python bindings / interactions with other Python libraries labels May 5, 2019
@PenghuiCheng
Copy link
Contributor Author

@jgong5
Copy link
Collaborator

jgong5 commented May 5, 2019

@bddppq This is how we leverage inner_product to do matrix multiplication in C2. FYI.

  Matrix multiplication with bias $Y = A * B + Bias$, where `A` has size (M x K) or (Batch_size x M x k),
  `B` has size (K x N), `Bias` has size (n), and `Y` will have a size (M x N) or (Batch_size x M x N).
  To transpose `A` or `B` before multiplication, pass 1 to the `trans_a` and/or `trans_b` arguments,
  which  separate the first and second dimensions of the respective matrices using `axis_a` and `axis_b`.

  This patch depend on pytorch#19955.
Change-Id: Iea33d609f814a062d4e2b1b48a96e8a1da9f1072
@gujinghui
Copy link
Collaborator

this PR depends on #20569 now.

@facebook-github-bot
Copy link
Contributor

Hi @PenghuiCheng!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@github-actions
Copy link
Contributor

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label May 28, 2022
@github-actions github-actions bot closed this Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

caffe2 module: pybind Related to our Python bindings / interactions with other Python libraries open source Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants