Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Bogoychev <nheart@gmail.com>2021-03-24 00:32:01 +0300
committerGitHub <noreply@github.com>2021-03-24 00:32:01 +0300
commitffd997e36015e1022a122095ebb8e147c5b59650 (patch)
tree2119738a8f2edfbb1328be39205d00475fb9a286
parentb36d0bbbab1fa4d435e517c974c3fde96e3145fe (diff)
Properly copy the entire vector in the int16_t case (#845)
Fixes #842 #843 #844
-rw-r--r--CHANGELOG.md1
-rw-r--r--VERSION2
-rw-r--r--src/tensors/cpu/integer_common.h2
3 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 496de92c..d300bb69 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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.
diff --git a/VERSION b/VERSION
index c820106f..f9ec16e1 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-v1.10.12
+v1.10.13
diff --git a/src/tensors/cpu/integer_common.h b/src/tensors/cpu/integer_common.h
index 6e96f8cd..cb372a74 100644
--- a/src/tensors/cpu/integer_common.h
+++ b/src/tensors/cpu/integer_common.h
@@ -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),