Skip to content

Commit

Permalink
Previously we didn't have an implementation of BatchNormInference and…
Browse files Browse the repository at this point in the history
… BatchNormTraining, which gives a linker error if anyone ever tries to call that. A dummy implementation is friendlier than a linker error.

PiperOrigin-RevId: 159645612
  • Loading branch information
tensorflower-gardener committed Jun 21, 2017
1 parent f671c5c commit 26239c7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tensorflow/compiler/xla/client/computation_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1438,6 +1438,26 @@ ComputationDataHandle ComputationBuilder::BatchNormTraining(
return ParseOpResponse(s, &response);
}

ComputationDataHandle ComputationBuilder::BatchNormInference(
const ComputationDataHandle& operand, const ComputationDataHandle& scale,
const ComputationDataHandle& offset, const ComputationDataHandle& mean,
const ComputationDataHandle& variance, float epsilon, int64 feature_index) {
// TODO(b/62843645): Implement BatchNormInference.
NoteError(Unimplemented("BatchNormInference is not implemented yet."));
return ComputationDataHandle();
}

ComputationDataHandle ComputationBuilder::BatchNormGrad(
const ComputationDataHandle& operand, const ComputationDataHandle& scale,
const ComputationDataHandle& batch_mean,
const ComputationDataHandle& batch_var,
const ComputationDataHandle& grad_output, float epsilon,
int64 feature_index) {
// TODO(b/62843645): Implement BatchNormGrad.
NoteError(Unimplemented("BatchNormGrad is not implemented yet."));
return ComputationDataHandle();
}

ComputationDataHandle ComputationBuilder::CrossReplicaSum(
const ComputationDataHandle& operand) {
if (!first_error_.ok() || !PrepareComputation().ok()) {
Expand Down

0 comments on commit 26239c7

Please sign in to comment.