diff options
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java index 16302ddff49..9d3505e932f 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java @@ -69,6 +69,7 @@ public class SearchNode extends AbstractService implements private AbstractService serviceLayerService; private final Optional<Tuning> tuning; private final Optional<ResourceLimits> resourceLimits; + private final boolean useFastValueTensorImplementation; /** Whether this search node is co-located with a container node on a hosted system */ private final boolean combined; @@ -99,31 +100,31 @@ public class SearchNode extends AbstractService implements @Override protected SearchNode doBuild(DeployState deployState, AbstractConfigProducer ancestor, Element producerSpec) { - return new SearchNode(ancestor, name, contentNode.getDistributionKey(), nodeSpec, clusterName, contentNode, + return new SearchNode(deployState.getProperties(), ancestor, name, contentNode.getDistributionKey(), nodeSpec, clusterName, contentNode, flushOnShutdown, tuning, resourceLimits, deployState.isHosted(), combined); } } - public static SearchNode create(AbstractConfigProducer parent, String name, int distributionKey, NodeSpec nodeSpec, + public static SearchNode create(ModelContext.Properties props, AbstractConfigProducer parent, String name, int distributionKey, NodeSpec nodeSpec, String clusterName, AbstractService serviceLayerService, boolean flushOnShutdown, Optional<Tuning> tuning, Optional<ResourceLimits> resourceLimits, boolean isHostedVespa, boolean combined) { - return new SearchNode(parent, name, distributionKey, nodeSpec, clusterName, serviceLayerService, + return new SearchNode(props, parent, name, distributionKey, nodeSpec, clusterName, serviceLayerService, flushOnShutdown, tuning, resourceLimits, isHostedVespa, combined); } - private SearchNode(AbstractConfigProducer parent, String name, int distributionKey, NodeSpec nodeSpec, + private SearchNode(ModelContext.Properties props, AbstractConfigProducer parent, String name, int distributionKey, NodeSpec nodeSpec, String clusterName, AbstractService serviceLayerService, boolean flushOnShutdown, Optional<Tuning> tuning, Optional<ResourceLimits> resourceLimits, boolean isHostedVespa, boolean combined) { - this(parent, name, nodeSpec, clusterName, flushOnShutdown, tuning, resourceLimits, isHostedVespa, combined); + this(props, parent, name, nodeSpec, clusterName, flushOnShutdown, tuning, resourceLimits, isHostedVespa, combined); this.distributionKey = distributionKey; this.serviceLayerService = serviceLayerService; setPropertiesElastic(clusterName, distributionKey); } - private SearchNode(AbstractConfigProducer parent, String name, NodeSpec nodeSpec, String clusterName, + private SearchNode(ModelContext.Properties props, AbstractConfigProducer parent, String name, NodeSpec nodeSpec, String clusterName, boolean flushOnShutdown, Optional<Tuning> tuning, Optional<ResourceLimits> resourceLimits, boolean isHostedVespa, boolean combined) { super(parent, name); @@ -141,6 +142,7 @@ public class SearchNode extends AbstractService implements // Properties are set in DomSearchBuilder this.tuning = tuning; this.resourceLimits = resourceLimits; + this.useFastValueTensorImplementation = props.featureFlags().useFastValueTensorImplementation(); } private void setPropertiesElastic(String clusterName, int distributionKey) { @@ -295,6 +297,9 @@ public class SearchNode extends AbstractService implements tuning.ifPresent(t -> t.getConfig(builder)); resourceLimits.ifPresent(l -> l.getConfig(builder)); } + if (useFastValueTensorImplementation) { + builder.tensor_implementation(ProtonConfig.Tensor_implementation.FAST_VALUE); + } } @Override |