Skip to content

Commit

Permalink
Fix a bug in the previous commit by returning Unimplemented.
Browse files Browse the repository at this point in the history
  • Loading branch information
yongfeng-nv committed Aug 12, 2019
1 parent d14050b commit 32572a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tensorflow/compiler/xla/service/gpu/cudnn_conv_rewriter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ CudnnConvBackendConfig GetDefaultBackendConfig() {
StatusOr<bool> RunOnInstruction(HloInstruction* conv) {
CHECK_EQ(conv->opcode(), HloOpcode::kConvolution);

HloInstruction* custom_call = [&]() -> HloInstruction* {
HloInstruction* custom_call = [&]() -> StatusOr<HloInstruction*> {
bool match;
Window window;
ConvolutionDimensionNumbers dnums;
Expand All @@ -586,7 +586,7 @@ StatusOr<bool> RunOnInstruction(HloInstruction* conv) {
if (primitive_util::IsIntegralType(
conv->operand(0)->shape().element_type()) &&
conv->shape().element_type() != F32) {
Unimplemented(
return Unimplemented(
"The convolution instruction with integer inputs only allows "
"float outputs. Insert a clamp instruction with range [-128, 127) "
"followed by a convert "
Expand All @@ -600,7 +600,7 @@ StatusOr<bool> RunOnInstruction(HloInstruction* conv) {
}

return nullptr;
}();
}().ValueOrDie();

if (custom_call == nullptr) {
return false;
Expand Down

0 comments on commit 32572a3

Please sign in to comment.