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

Fix numpy_ops gemm output semantics when BLIS is used #521

Merged
merged 1 commit into from
Aug 16, 2021

Conversation

danieldk
Copy link
Contributor

@danieldk danieldk commented Aug 11, 2021

I am reading various parts of the thinc source code to see how things work, I found a small inconsistency in the numpy gemm op:

The out keyword argument of the gemm op specifies an output array. However, the semantics were different depending on whether BLIS is used:

  • use_blis==False: the values of out array are overwritten.
  • use_blis==True: the values of out are added to the result.

With this change, the values of out are also overwritten with use_blis=True.

The `out` keyword argument of the `gemm` op specifies an output array.
However, the semantics were different depending on whether BLIS is used:

* `use_blis==False`: the values of out array are overwritten.
* `use_blis==True`: the values of out are added to the result.

With this change, the values of `out` are also overwritten with
`use_blis=True`.
@svlandeg svlandeg added bug Bugs and behaviour differing from documentation feat / ops Backends and maths labels Aug 16, 2021
@svlandeg svlandeg merged commit 44a63a2 into explosion:master Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs and behaviour differing from documentation feat / ops Backends and maths
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants