Properly copy the entire vector in the int16_t case (#845)

Fixes #842 #843 #844
This commit is contained in:
Nikolay Bogoychev 2021-03-23 21:32:01 +00:00 committed by GitHub
parent b36d0bbbab
commit ffd997e360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -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.

View File

@ -1 +1 @@
v1.10.12
v1.10.13

View File

@ -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),