mirror of
https://github.com/marian-nmt/marian.git
synced 2024-10-05 19:17:10 +03:00
Fix guaranteed YAML::InvalidNode
when compiled with COMPILE_CPU=Off
(#944)
This commit is contained in:
parent
bf5eafab0c
commit
7d654603bf
@ -54,8 +54,10 @@ void ConfigValidator::validateOptionsTranslation() const {
|
||||
ABORT_IF(models.empty() && configs.empty(),
|
||||
"You need to provide at least one model file or a config file");
|
||||
|
||||
#ifdef COMPILE_CPU
|
||||
ABORT_IF(get<bool>("model-mmap") && get<size_t>("cpu-threads") == 0,
|
||||
"Model MMAP is CPU-only, please use --cpu-threads");
|
||||
#endif
|
||||
|
||||
for(const auto& modelFile : models) {
|
||||
filesystem::Path modelPath(modelFile);
|
||||
|
Loading…
Reference in New Issue
Block a user