diff options
author | Håvard Pettersen <havardpe@yahooinc.com> | 2024-05-03 14:38:20 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@yahooinc.com> | 2024-05-03 14:38:20 +0000 |
commit | 18adc4f729c5c0afe993e1bee13e971959031fa6 (patch) | |
tree | 6f84fbb6e2faad999e2507aef2fe54992b7f39af | |
parent | df5586db4480974e5fb9e1d10117b7c80c9c40ee (diff) |
Avoid compiling gbdt models with many conditions
The average path length grows slower with larger trees (you need to
traverse a smaller part of the total model). This makes it
harder(slower) for llvm to compile and run the code compared to the
VMForest option.
-rw-r--r-- | eval/src/vespa/eval/eval/gbdt.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/eval/src/vespa/eval/eval/gbdt.cpp b/eval/src/vespa/eval/eval/gbdt.cpp index 3422228b03c..7ab4c4ae822 100644 --- a/eval/src/vespa/eval/eval/gbdt.cpp +++ b/eval/src/vespa/eval/eval/gbdt.cpp @@ -154,6 +154,9 @@ Optimize::select_best(const ForestStats &stats, if ((stats.tree_sizes.back().size > 12) && (path_len > 2500.0)) { return apply_chain(VMForest::optimize_chain, stats, trees); } + if (stats.total_size > 25000) { + return apply_chain(VMForest::optimize_chain, stats, trees); + } return Optimize::Result(); } |