summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2020-10-14 15:35:38 +0000
committerGeir Storli <geirst@verizonmedia.com>2020-10-14 15:35:38 +0000
commitd34d3c7efe2c9eb8f95a05e2c9d509065341de38 (patch)
tree533a7c8c9f60181923972aa8866a29b218341374 /config-model/src/main/java/com/yahoo
parent129d199ff9c387c1419bc9d8372abf5fd57a5e8c (diff)
Add feature flag to use fast value tensor implementation on all content nodes.
Diffstat (limited to 'config-model/src/main/java/com/yahoo')
-rw-r--r--config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java7
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java2
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java19
3 files changed, 21 insertions, 7 deletions
diff --git a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
index 2c6608c37ad..00c5f6e326f 100644
--- a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
+++ b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
@@ -38,6 +38,7 @@ public class TestProperties implements ModelContext.Properties {
private boolean useContentNodeBtreeDb = false;
private boolean useThreePhaseUpdates = false;
private boolean useDirectStorageApiRpc = false;
+ private boolean useFastValueTensorImplementation = false;
private boolean tlsUseFSync = false;
private String tlsCompressionType = "NONE";
private double defaultTermwiseLimit = 1.0;
@@ -79,6 +80,7 @@ public class TestProperties implements ModelContext.Properties {
@Override public boolean useContentNodeBtreeDb() { return useContentNodeBtreeDb; }
@Override public boolean useThreePhaseUpdates() { return useThreePhaseUpdates; }
@Override public boolean useDirectStorageApiRpc() { return useDirectStorageApiRpc; }
+ @Override public boolean useFastValueTensorImplementation() { return useFastValueTensorImplementation; }
@Override public Optional<AthenzDomain> athenzDomain() { return Optional.ofNullable(athenzDomain); }
@Override public Optional<ApplicationRoles> applicationRoles() { return Optional.ofNullable(applicationRoles); }
@Override public String responseSequencerType() { return responseSequencerType; }
@@ -128,6 +130,11 @@ public class TestProperties implements ModelContext.Properties {
return this;
}
+ public TestProperties setUseFastValueTensorImplementation(boolean useFastValueTensorImplementation) {
+ this.useFastValueTensorImplementation = useFastValueTensorImplementation;
+ return this;
+ }
+
public TestProperties setThreadPoolSizeFactor(double threadPoolSizeFactor) {
this.threadPoolSizeFactor = threadPoolSizeFactor;
return this;
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java
index 2198b6e278b..2c158e89ff7 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java
@@ -263,7 +263,7 @@ public class ContentSearchCluster extends AbstractConfigProducer implements Prot
TransactionLogServer tls;
Optional<Tuning> tuning = Optional.ofNullable(this.tuning);
if (element == null) {
- searchNode = SearchNode.create(parent, "" + node.getDistributionKey(), node.getDistributionKey(), spec,
+ searchNode = SearchNode.create(deployState.getProperties(), parent, "" + node.getDistributionKey(), node.getDistributionKey(), spec,
clusterName, node, flushOnShutdown, tuning, resourceLimits, parentGroup.isHosted(), combined);
searchNode.setHostResource(node.getHostResource());
searchNode.initService(deployState.getDeployLogger());
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 534bab4677c..51393cf51cf 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
@@ -2,6 +2,8 @@
package com.yahoo.vespa.model.search;
import com.yahoo.cloud.config.filedistribution.FiledistributorrpcConfig;
+import com.yahoo.config.model.api.Model;
+import com.yahoo.config.model.api.ModelContext;
import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.config.model.producer.AbstractConfigProducer;
import com.yahoo.metrics.MetricsmanagerConfig;
@@ -67,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;
@@ -97,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);
@@ -139,6 +142,7 @@ public class SearchNode extends AbstractService implements
// Properties are set in DomSearchBuilder
this.tuning = tuning;
this.resourceLimits = resourceLimits;
+ this.useFastValueTensorImplementation = props.useFastValueTensorImplementation();
}
private void setPropertiesElastic(String clusterName, int distributionKey) {
@@ -293,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