File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 11#include " sampling.h"
22
33#include " common.h"
4+ #include " log.h"
45
56#include < cmath>
67#include < unordered_map>
@@ -534,14 +535,16 @@ std::vector<common_sampler_type> common_sampler_types_from_names(const std::vect
534535 auto sampler = sampler_canonical_name_map.find (name);
535536 if (sampler != sampler_canonical_name_map.end ()) {
536537 samplers.push_back (sampler->second );
537- } else {
538- if (allow_alt_names) {
539- sampler = sampler_alt_name_map.find (name);
540- if (sampler != sampler_alt_name_map.end ()) {
541- samplers.push_back (sampler->second );
542- }
538+ continue ;
539+ }
540+ if (allow_alt_names) {
541+ sampler = sampler_alt_name_map.find (name);
542+ if (sampler != sampler_alt_name_map.end ()) {
543+ samplers.push_back (sampler->second );
544+ continue ;
543545 }
544546 }
547+ LOG_WRN (" %s: unable to match sampler by name '%s'\n " , __func__, name.c_str ());
545548 }
546549
547550 return samplers;
@@ -568,6 +571,8 @@ std::vector<common_sampler_type> common_sampler_types_from_chars(const std::stri
568571 const auto sampler = sampler_name_map.find (c);
569572 if (sampler != sampler_name_map.end ()) {
570573 samplers.push_back (sampler->second );
574+ } else {
575+ LOG_WRN (" %s: unable to match sampler by char '%c'\n " , __func__, c);
571576 }
572577 }
573578
You can’t perform that action at this time.
0 commit comments