Skip to content

Commit fe84061

Browse files
caisqtensorflower-gardener
authored andcommitted
Merge changes from github.
PiperOrigin-RevId: 178185697
1 parent 8ad62af commit fe84061

105 files changed

Lines changed: 8798 additions & 1219 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AUTHORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
# The email address is not required for organizations.
88

99
Google Inc.
10-
10+
Yuan Tang <[email protected]>

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ pylint --rcfile=/tmp/pylintrc myfile.py
114114
* [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html)
115115
* [Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html)
116116
* [Google Shell Style Guide](https://google.github.io/styleguide/shell.xml)
117+
* [Google Objective-C Style Guide](http://google.github.io/styleguide/objcguide.html)
117118

118119
#### Running sanity check
119120

configure.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,6 +1088,28 @@ def toolkit_exists(toolkit_path):
10881088
computecpp_toolkit_path)
10891089

10901090

1091+
def set_trisycl_include_dir(environ_cp):
1092+
"""Set TRISYCL_INCLUDE_DIR."""
1093+
ask_trisycl_include_dir = ('Please specify the location of the triSYCL '
1094+
'include directory. (Use --config=sycl_trisycl '
1095+
'when building with Bazel) '
1096+
'[Default is %s]: ') % _DEFAULT_TRISYCL_INCLUDE_DIR
1097+
while True:
1098+
trisycl_include_dir = get_from_env_or_user_or_default(
1099+
environ_cp, 'TRISYCL_INCLUDE_DIR', ask_trisycl_include_dir,
1100+
_DEFAULT_TRISYCL_INCLUDE_DIR)
1101+
if os.path.exists(trisycl_include_dir):
1102+
break
1103+
1104+
print('Invalid triSYCL include directory, %s cannot be found'
1105+
% (trisycl_include_dir))
1106+
1107+
# Set TRISYCL_INCLUDE_DIR
1108+
environ_cp['TRISYCL_INCLUDE_DIR'] = trisycl_include_dir
1109+
write_action_env_to_bazelrc('TRISYCL_INCLUDE_DIR',
1110+
trisycl_include_dir)
1111+
1112+
10911113
def set_trisycl_include_dir(environ_cp):
10921114
"""Set TRISYCL_INCLUDE_DIR."""
10931115

tensorflow/cc/gradients/nn_grad.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,18 @@ Status MaxPoolGradV2Helper(const Scope& scope, const Operation& op,
196196
}
197197
REGISTER_GRADIENT_OP("MaxPoolV2", MaxPoolGradV2Helper);
198198

199+
Status LRNGradHelper(const Scope& scope, const Operation& op,
200+
const std::vector<Output>& grad_inputs,
201+
std::vector<Output>* grad_outputs){
202+
internal::LRNGrad::Attrs grad_attrs;
203+
204+
auto dx = internal::LRNGrad(scope, grad_inputs[0], op.input(0), op.output(0),
205+
grad_attrs);
206+
grad_outputs->push_back(dx);
207+
return scope.status();
208+
}
209+
REGISTER_GRADIENT_OP("LRN", LRNGradHelper);
210+
199211
} // anonymous namespace
200212
} // namespace ops
201213
} // namespace tensorflow

tensorflow/cc/gradients/nn_grad_test.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,5 +191,12 @@ TEST_F(NNGradTest, MaxPoolGradV2Helper) {
191191
RunTest(x, x_init_value, y, y_shape);
192192
}
193193

194+
TEST_F(NNGradTest, LRN){
195+
TensorShape x_shape({1, 1, 2, 1});
196+
auto x = Placeholder(scope_, DT_FLOAT, Placeholder::Shape(x_shape));
197+
auto y = LRN(scope_, x);
198+
RunTest(x, x_shape, y, x_shape);
199+
}
200+
194201
} // namespace
195202
} // namespace tensorflow

tensorflow/compiler/xla/service/cpu/disassembler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct DisassemblerResult {
3737
DisassemblerResult(const string& text, size_t code_size_bytes)
3838
: text(text), code_size_bytes(code_size_bytes) {}
3939

40-
// The dissassembled text sections of the object file.
40+
// The disassembled text sections of the object file.
4141
string text;
4242
// The total number of bytes of executable code in the object file.
4343
uint64_t code_size_bytes;
@@ -53,7 +53,7 @@ class Disassembler {
5353
// Returns a DisassemblerResult for the given object file, containing the
5454
// disassembled code.
5555
//
56-
// If we couldnt' retrieve a disassembler for this platform, an error status
56+
// If we couldn't retrieve a disassembler for this platform, an error status
5757
// is returned.
5858
StatusOr<DisassemblerResult> DisassembleObjectFile(
5959
const llvm::object::ObjectFile& object_file) const;

tensorflow/compiler/xla/service/hlo_instruction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ class HloInstruction {
428428
Status RemoveControlDependencyTo(HloInstruction* instruction);
429429

430430
// Returns the set of control predecessors (successors) of this
431-
// instruction. Control predecessors (sucessors) must execute before (after)
431+
// instruction. Control predecessors (successors) must execute before (after)
432432
// the current instruction.
433433
const std::vector<HloInstruction*>& control_predecessors() const {
434434
return control_predecessors_;

tensorflow/contrib/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ py_library(
6464
"//tensorflow/contrib/nearest_neighbor:nearest_neighbor_py",
6565
"//tensorflow/contrib/nn:nn_py",
6666
"//tensorflow/contrib/opt:opt_py",
67+
"//tensorflow/contrib/periodic_resample:init_py",
6768
"//tensorflow/contrib/predictor",
6869
"//tensorflow/contrib/quantization:quantization_py",
6970
"//tensorflow/contrib/quantize:quantize_graph",

tensorflow/contrib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
from tensorflow.contrib import nccl
5656
from tensorflow.contrib import nn
5757
from tensorflow.contrib import opt
58+
from tensorflow.contrib import periodic_resample
5859
from tensorflow.contrib import predictor
5960
from tensorflow.contrib import quantization
6061
from tensorflow.contrib import quantize

tensorflow/contrib/cloud/BUILD

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ tf_py_test(
6060
size = "small",
6161
srcs = ["python/ops/bigquery_reader_ops_test.py"],
6262
additional_deps = [
63-
":bigquery_reader_ops_op_lib",
6463
":cloud_py",
65-
"//tensorflow/contrib/cloud/kernels:bigquery_reader_ops",
6664
"//tensorflow/core:protos_all_py",
6765
"//tensorflow/python:array_ops",
6866
"//tensorflow/python:client_testlib",

0 commit comments

Comments
 (0)