Skip to content

Commit

Permalink
Properly copy the entire vector in the int16_t case (#845)
Browse files Browse the repository at this point in the history
Fixes #842 #843 #844
  • Loading branch information
XapaJIaMnu authored Mar 23, 2021
1 parent b36d0bb commit ffd997e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fix compilation with OMP

### Fixed
- Fixed an issue when loading intgemm16 models from unaligned memory.
- Fix building marian with gcc 9.3+ and FBGEMM
- Find MKL installed under Ubuntu 20.04 via apt-get
- Support for CUDA 11.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.10.12
v1.10.13
2 changes: 1 addition & 1 deletion src/tensors/cpu/integer_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void prepareAndTransposeB(io::Item& item, const char * input) {
cols(item.shape)); //rows here returns the columns of the transposed input matrix, and cols -> the rows
} else {
Integer * aligned_input = reinterpret_cast<Integer *>(genericMalloc(512, rows(item.shape)*cols(item.shape)*sizeof(Integer)));
std::copy(input, input + rows(item.shape)*cols(item.shape), aligned_input);
std::copy(reinterpret_cast<const Integer *>(input), reinterpret_cast<const Integer *>(input) + rows(item.shape)*cols(item.shape), aligned_input);
Integer * aligned_output = reinterpret_cast<Integer *>(genericMalloc(512, rows(item.shape)*cols(item.shape)*sizeof(Integer)));
intgemm_<vtype>::width::PrepareBQuantizedTransposed(reinterpret_cast<const Integer *>(aligned_input),
reinterpret_cast<Integer *>(aligned_output),
Expand Down

0 comments on commit ffd997e

Please sign in to comment.