diff options
author | Arne H Juul <arnej27959@users.noreply.github.com> | 2023-03-30 10:18:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-30 10:18:28 +0200 |
commit | 73f5b777ba374c3a0a92ca661ce8cbb35beb509f (patch) | |
tree | 1670e438523278819105c072ac7cba8686274c51 | |
parent | 50e8eb5dcd0e3c40bfb9cd28c8a185e7b57f614c (diff) | |
parent | b5a5aa3e618d3f3b931024e8f36df3f58045e274 (diff) |
Merge pull request #26626 from vespa-engine/bjorncs/fail-on-global-phase-with-sorting
Allow configuration of execution mode from rank profile
3 files changed, 10 insertions, 1 deletions
diff --git a/config-model/src/main/javacc/SchemaParser.jj b/config-model/src/main/javacc/SchemaParser.jj index 61e8574bc87..714e481d0e2 100644 --- a/config-model/src/main/javacc/SchemaParser.jj +++ b/config-model/src/main/javacc/SchemaParser.jj @@ -189,6 +189,9 @@ TOKEN : | < INTRAOPTHREADS: "intraop-threads"> | < INTEROPTHREADS: "interop-threads"> | < GPUDEVICE: "gpu-device"> +| < EXECUTIONMODE: "execution-mode"> +| < PARALLEL: "parallel"> +| < SEQUENTIAL: "sequential"> | < MODEL: "model" > | < MUTATE: "mutate" > | < QUERY: "query" > @@ -1606,6 +1609,8 @@ void onnxModelItem(OnnxModel onnxModel) : <GPUDEVICE> <COLON> num = integer() { onnxModel.setGpuDevice(num, false); } | <INTRAOPTHREADS> <COLON> num = integer() { onnxModel.setStatelessIntraOpThreads(num); } | <INTEROPTHREADS> <COLON> num = integer() { onnxModel.setStatelessInterOpThreads(num); } | + <EXECUTIONMODE> <COLON> ( <PARALLEL> { onnxModel.setStatelessExecutionMode("parallel"); } + | <SEQUENTIAL> { onnxModel.setStatelessExecutionMode("sequential"); } ) | (<ONNX_INPUT_SL>) { String name = token.image.substring(5, token.image.lastIndexOf(":")).trim(); if (name.startsWith("\"")) { name = name.substring(1, name.length() - 1); } @@ -2606,6 +2611,7 @@ String identifier() : { } | <ENABLEONLYBITVECTOR> | <EXACT> | <EXACTTERMINATOR> + | <EXECUTIONMODE> | <FALSE> | <FASTACCESS> | <FASTRANK> @@ -2654,6 +2660,7 @@ String identifier() : { } | <ON> | <ONDEMAND> | <ORDER> + | <PARALLEL> | <PREFIX> | <PRIMARY> | <PROPERTIES> @@ -2674,6 +2681,7 @@ String identifier() : { } | <SEARCH> | <SECONDARY> | <SECONDPHASE> + | <SEQUENTIAL> | <SORTING> | <SOURCE> | <PAGED> diff --git a/config-model/src/test/derived/globalphase_onnx_inside/onnx-models.cfg b/config-model/src/test/derived/globalphase_onnx_inside/onnx-models.cfg index f705f896540..d63e85e2f19 100644 --- a/config-model/src/test/derived/globalphase_onnx_inside/onnx-models.cfg +++ b/config-model/src/test/derived/globalphase_onnx_inside/onnx-models.cfg @@ -25,7 +25,7 @@ model[].input[].source "rankingExpression(indirect_x)" model[].output[].name "vector_Y" model[].output[].as "foobar" model[].dry_run_on_setup true -model[].stateless_execution_mode "" +model[].stateless_execution_mode "parallel" model[].stateless_interop_threads 5 model[].stateless_intraop_threads 3 model[].gpu_device 2 diff --git a/config-model/src/test/derived/globalphase_onnx_inside/test.sd b/config-model/src/test/derived/globalphase_onnx_inside/test.sd index cd3dfcea3d0..f7749e648e0 100644 --- a/config-model/src/test/derived/globalphase_onnx_inside/test.sd +++ b/config-model/src/test/derived/globalphase_onnx_inside/test.sd @@ -52,6 +52,7 @@ schema test { intraop-threads: 3 interop-threads: 5 gpu-device: 2 + execution-mode: parallel } first-phase { expression: sum(attribute(aa)) |