mirror of
https://github.com/marian-nmt/marian.git
synced 2024-11-03 20:13:47 +03:00
Merge branch 'master' of github.com:marian-nmt/marian-dev into pmaster
This commit is contained in:
commit
309bd748ab
@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- Dynamic gradient-scaling with `--dynamic-gradient-scaling`.
|
||||
- Add unit tests for binary files.
|
||||
- Fix compilation with OMP
|
||||
- Compute aligned memory sizes using exact sizing
|
||||
|
||||
### Fixed
|
||||
- Missing depth-scaling in transformer FFN
|
||||
|
@ -175,8 +175,9 @@ public:
|
||||
reserve(bytes);
|
||||
}
|
||||
|
||||
size_t alignedSize(size_t size) {
|
||||
return (size_t)(ceil(size / (double)alignment_) * alignment_);
|
||||
size_t alignedSize(size_t size) const {
|
||||
size_t over = size + alignment_ - 1;
|
||||
return over - (over % alignment_);
|
||||
}
|
||||
|
||||
void throwAtReallocation(bool throwRealloc) { throw_ = throwRealloc; }
|
||||
|
@ -15,8 +15,9 @@ protected:
|
||||
size_t size_{0};
|
||||
size_t alignment_;
|
||||
|
||||
size_t align(size_t size) {
|
||||
return (size_t)(ceil(size / (float)alignment_) * alignment_);
|
||||
size_t align(size_t size) const {
|
||||
size_t over = size + alignment_ - 1;
|
||||
return over - (over % alignment_);
|
||||
}
|
||||
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user