Skip to content

Commit 69d4600

Browse files
committed
Rebase fixes
Signed-off-by: Ryan Nett <[email protected]>
1 parent 6845d9f commit 69d4600

File tree

18 files changed

+626
-144
lines changed

18 files changed

+626
-144
lines changed

pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,10 @@
237237
</profile>
238238

239239
<!--
240-
Profile that enables format checks on compilation
241-
Can auto-format using spotless:apply.
240+
Profile to run spotless:apply on builds. Will run before format's check.
242241
-->
243242
<profile>
244-
<id>check-format</id>
243+
<id>apply-format</id>
245244
<build>
246245
<plugins>
247246
<plugin>
@@ -255,7 +254,7 @@
255254
<id>spotless-apply</id>
256255
<phase>initialize</phase>
257256
<goals>
258-
<goal>check</goal>
257+
<goal>apply</goal>
259258
</goals>
260259
</execution>
261260
</executions>
@@ -265,10 +264,11 @@
265264
</profile>
266265

267266
<!--
268-
Profile to run spotless:apply on builds. Will run before format's check.
267+
Profile that enables format checks on compilation
268+
Can auto-format using spotless:apply.
269269
-->
270270
<profile>
271-
<id>apply-format</id>
271+
<id>check-format</id>
272272
<build>
273273
<plugins>
274274
<plugin>
@@ -282,7 +282,7 @@
282282
<id>spotless-check</id>
283283
<phase>initialize</phase>
284284
<goals>
285-
<goal>apply</goal>
285+
<goal>check</goal>
286286
</goals>
287287
</execution>
288288
</executions>

tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@
172172
import org.tensorflow.op.core.RefSelect;
173173
import org.tensorflow.op.core.RefSwitch;
174174
import org.tensorflow.op.core.RemoteCall;
175-
import org.tensorflow.op.core.RemoteFusedGraphExecute;
176175
import org.tensorflow.op.core.Reshape;
177176
import org.tensorflow.op.core.ResourceCountUpTo;
178177
import org.tensorflow.op.core.ResourceGather;
@@ -301,6 +300,7 @@
301300
import org.tensorflow.op.core.XlaSetDynamicDimensionSize;
302301
import org.tensorflow.op.core.XlaSpmdFullToShardShape;
303302
import org.tensorflow.op.core.XlaSpmdShardToFullShape;
303+
import org.tensorflow.op.core.XlaVariadicSort;
304304
import org.tensorflow.op.core.Zeros;
305305
import org.tensorflow.op.core.ZerosLike;
306306
import org.tensorflow.types.TBool;
@@ -4356,27 +4356,6 @@ public RemoteCall remoteCall(Operand<TString> target, Iterable<Operand<?>> args,
43564356
return RemoteCall.create(scope, target, args, Tout, f);
43574357
}
43584358

4359-
/**
4360-
* Execute a sub graph on a remote processor.
4361-
* The graph specifications(such as graph itself, input tensors and output names)
4362-
* are stored as a serialized protocol buffer of RemoteFusedGraphExecuteInfo
4363-
* as serialized_remote_fused_graph_execute_info.
4364-
* The specifications will be passed to a dedicated registered
4365-
* remote fused graph executor. The executor will send the graph specifications
4366-
* to a remote processor and execute that graph. The execution results
4367-
* will be passed to consumer nodes as outputs of this node.
4368-
*
4369-
* @param inputs Arbitrary number of tensors with arbitrary data types
4370-
* @param Toutputs the value of the Toutputs property
4371-
* @param serializedRemoteFusedGraphExecuteInfo Serialized protocol buffer
4372-
* of RemoteFusedGraphExecuteInfo which contains graph specifications.
4373-
* @return a new instance of RemoteFusedGraphExecute
4374-
*/
4375-
public RemoteFusedGraphExecute remoteFusedGraphExecute(Iterable<Operand<?>> inputs,
4376-
List<Class<? extends TType>> Toutputs, String serializedRemoteFusedGraphExecuteInfo) {
4377-
return RemoteFusedGraphExecute.create(scope, inputs, Toutputs, serializedRemoteFusedGraphExecuteInfo);
4378-
}
4379-
43804359
/**
43814360
* Reshapes a tensor.
43824361
* Given {@code tensor}, this operation returns a tensor that has the same values
@@ -8239,6 +8218,26 @@ public <T extends TType> XlaSpmdShardToFullShape<T> xlaSpmdShardToFullShape(Oper
82398218
return XlaSpmdShardToFullShape.create(scope, input, manualSharding, fullShape);
82408219
}
82418220

8221+
/**
8222+
* Wraps the XLA Sort operator, documented at
8223+
* https://www.tensorflow.org/performance/xla/operation_semantics#sort
8224+
* .
8225+
* <p>Sorts one or more tensors, with support for custom comparator, dimension, and
8226+
* is_stable attributes.
8227+
*
8228+
* @param inputs A list of {@code Tensor} of identical shape but possibly different types.
8229+
* @param dimension The dimension along which to sort. Must be a compile-time constant.
8230+
* @param comparator A comparator function to apply to 2*N scalars and returning a
8231+
* boolean. N is the number of sort inputs. If you want to sort in ascending
8232+
* order then the comparator should perform a less-than comparison.
8233+
* @param isStable Whether to use stable sort.
8234+
* @return a new instance of XlaVariadicSort
8235+
*/
8236+
public XlaVariadicSort xlaVariadicSort(Iterable<Operand<?>> inputs, Operand<TInt32> dimension,
8237+
ConcreteFunction comparator, Boolean isStable) {
8238+
return XlaVariadicSort.create(scope, inputs, dimension, comparator, isStable);
8239+
}
8240+
82428241
/**
82438242
* Creates a zeroed tensor given its type and shape.
82448243
*

tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/XlaOps.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,8 @@ public XlaSetBound xlaSetBound(Operand<TInt32> input, Operand<TInt32> bound) {
607607
}
608608

609609
/**
610-
* Wraps the variadic XLA Reduce operator, documented at
610+
* Wraps the variadic XLA Reduce operator.
611+
* Semantics are documented at
611612
* https://www.tensorflow.org/performance/xla/operation_semantics#variadic_reduce.
612613
*
613614
* @param <T> data type for {@code output} output
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
=======================================================================*/
15+
16+
// This class has been generated, DO NOT EDIT!
17+
18+
package org.tensorflow.op.core;
19+
20+
import java.util.Arrays;
21+
import java.util.Iterator;
22+
import java.util.List;
23+
import org.tensorflow.ConcreteFunction;
24+
import org.tensorflow.Operand;
25+
import org.tensorflow.Operation;
26+
import org.tensorflow.OperationBuilder;
27+
import org.tensorflow.Output;
28+
import org.tensorflow.op.Operands;
29+
import org.tensorflow.op.RawOp;
30+
import org.tensorflow.op.Scope;
31+
import org.tensorflow.op.annotation.Endpoint;
32+
import org.tensorflow.op.annotation.Operator;
33+
import org.tensorflow.types.TInt32;
34+
import org.tensorflow.types.family.TType;
35+
36+
/**
37+
* Wraps the XLA Sort operator, documented at
38+
* https://www.tensorflow.org/performance/xla/operation_semantics#sort
39+
* .
40+
* <p>Sorts one or more tensors, with support for custom comparator, dimension, and
41+
* is_stable attributes.
42+
*/
43+
@Operator
44+
public final class XlaVariadicSort extends RawOp implements Iterable<Operand<TType>> {
45+
/**
46+
* The name of this op, as known by TensorFlow core engine
47+
*/
48+
public static final String OP_NAME = "XlaVariadicSort";
49+
50+
private List<Output<?>> outputs;
51+
52+
@SuppressWarnings("unchecked")
53+
private XlaVariadicSort(Operation operation) {
54+
super(operation);
55+
int outputIdx = 0;
56+
int outputsLength = operation.outputListLength("outputs");
57+
outputs = Arrays.asList(operation.outputList(outputIdx, outputsLength));
58+
outputIdx += outputsLength;
59+
}
60+
61+
/**
62+
* Factory method to create a class wrapping a new XlaVariadicSort operation.
63+
*
64+
* @param scope current scope
65+
* @param inputs A list of {@code Tensor} of identical shape but possibly different types.
66+
* @param dimension The dimension along which to sort. Must be a compile-time constant.
67+
* @param comparator A comparator function to apply to 2*N scalars and returning a
68+
* boolean. N is the number of sort inputs. If you want to sort in ascending
69+
* order then the comparator should perform a less-than comparison.
70+
* @param isStable Whether to use stable sort.
71+
* @return a new instance of XlaVariadicSort
72+
*/
73+
@Endpoint(
74+
describeByClass = true
75+
)
76+
public static XlaVariadicSort create(Scope scope, Iterable<Operand<?>> inputs,
77+
Operand<TInt32> dimension, ConcreteFunction comparator, Boolean isStable) {
78+
OperationBuilder opBuilder = scope.env().opBuilder(OP_NAME, scope.makeOpName("XlaVariadicSort"));
79+
opBuilder.addInputList(Operands.asOutputs(inputs));
80+
opBuilder.addInput(dimension.asOutput());
81+
opBuilder = scope.apply(opBuilder);
82+
opBuilder.setAttr("comparator", comparator);
83+
opBuilder.setAttr("is_stable", isStable);
84+
return new XlaVariadicSort(opBuilder.build());
85+
}
86+
87+
/**
88+
* Gets outputs.
89+
* A list of {@code Tensor} of same shape and types as the {@code input}.
90+
* @return outputs.
91+
*/
92+
public List<Output<?>> outputs() {
93+
return outputs;
94+
}
95+
96+
@Override
97+
@SuppressWarnings({"rawtypes", "unchecked"})
98+
public Iterator<Operand<TType>> iterator() {
99+
return (Iterator) outputs.iterator();
100+
}
101+
}

tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/SnapshotDataset.java

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ public static SnapshotDataset create(Scope scope, Operand<? extends TType> input
101101
if (opts.writerPrefix != null) {
102102
opBuilder.setAttr("writer_prefix", opts.writerPrefix);
103103
}
104+
if (opts.hashValid != null) {
105+
opBuilder.setAttr("hash_valid", opts.hashValid);
106+
}
107+
if (opts.hash != null) {
108+
opBuilder.setAttr("hash", opts.hash);
109+
}
104110
}
105111
}
106112
return new SnapshotDataset(opBuilder.build());
@@ -136,6 +142,26 @@ public static Options writerPrefix(String writerPrefix) {
136142
return new Options().writerPrefix(writerPrefix);
137143
}
138144

145+
/**
146+
* Sets the hashValid option.
147+
*
148+
* @param hashValid the hashValid option
149+
* @return this Options instance.
150+
*/
151+
public static Options hashValid(Boolean hashValid) {
152+
return new Options().hashValid(hashValid);
153+
}
154+
155+
/**
156+
* Sets the hash option.
157+
*
158+
* @param hash the hash option
159+
* @return this Options instance.
160+
*/
161+
public static Options hash(Long hash) {
162+
return new Options().hash(hash);
163+
}
164+
139165
/**
140166
* Gets handle.
141167
*
@@ -161,6 +187,10 @@ public static class Options {
161187

162188
private String writerPrefix;
163189

190+
private Boolean hashValid;
191+
192+
private Long hash;
193+
164194
private Options() {
165195
}
166196

@@ -196,5 +226,27 @@ public Options writerPrefix(String writerPrefix) {
196226
this.writerPrefix = writerPrefix;
197227
return this;
198228
}
229+
230+
/**
231+
* Sets the hashValid option.
232+
*
233+
* @param hashValid the hashValid option
234+
* @return this Options instance.
235+
*/
236+
public Options hashValid(Boolean hashValid) {
237+
this.hashValid = hashValid;
238+
return this;
239+
}
240+
241+
/**
242+
* Sets the hash option.
243+
*
244+
* @param hash the hash option
245+
* @return this Options instance.
246+
*/
247+
public Options hash(Long hash) {
248+
this.hash = hash;
249+
return this;
250+
}
199251
}
200252
}

0 commit comments

Comments
 (0)