From 32572a37b0b88a757249ba8b4fbfefc39464a511 Mon Sep 17 00:00:00 2001 From: Yongfeng Gu Date: Wed, 17 Jul 2019 23:20:16 -0400 Subject: [PATCH] Fix a bug in the previous commit by returning Unimplemented. --- tensorflow/compiler/xla/service/gpu/cudnn_conv_rewriter.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tensorflow/compiler/xla/service/gpu/cudnn_conv_rewriter.cc b/tensorflow/compiler/xla/service/gpu/cudnn_conv_rewriter.cc index d6024313036384..1dfd87f8c3b241 100755 --- a/tensorflow/compiler/xla/service/gpu/cudnn_conv_rewriter.cc +++ b/tensorflow/compiler/xla/service/gpu/cudnn_conv_rewriter.cc @@ -560,7 +560,7 @@ CudnnConvBackendConfig GetDefaultBackendConfig() { StatusOr RunOnInstruction(HloInstruction* conv) { CHECK_EQ(conv->opcode(), HloOpcode::kConvolution); - HloInstruction* custom_call = [&]() -> HloInstruction* { + HloInstruction* custom_call = [&]() -> StatusOr { bool match; Window window; ConvolutionDimensionNumbers dnums; @@ -586,7 +586,7 @@ StatusOr 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 " @@ -600,7 +600,7 @@ StatusOr RunOnInstruction(HloInstruction* conv) { } return nullptr; - }(); + }().ValueOrDie(); if (custom_call == nullptr) { return false;