@@ -195,37 +195,37 @@ bool conv2dIsSupported(
195
195
if (input.dtype != c10::ScalarType::Float ||
196
196
weight.dtype != c10::ScalarType::Float ||
197
197
bias.dtype != c10::ScalarType::Float) {
198
- GRAPH_DEBUG (" conv2dIsSupported: only float32 allowed" );
198
+ GRAPH_DEBUG (" only float32 allowed" );
199
199
return false ;
200
200
}
201
201
if (input.dims .size () != 4 || weight.dims .size () != 4 ||
202
202
bias.dims .size () != 1 ) {
203
- GRAPH_DEBUG (" conv2dIsSupported: inputs are the wrong size" );
203
+ GRAPH_DEBUG (" inputs are the wrong size" );
204
204
return false ;
205
205
}
206
206
auto Cin = input.dims [1 ];
207
207
auto Cout = weight.dims [0 ];
208
208
auto CperG = weight.dims [1 ];
209
209
if (Cin != Cout || Cin != groups || CperG != 1 ) {
210
- GRAPH_DEBUG (" conv2dIsSupported: not depthwise" );
210
+ GRAPH_DEBUG (" not depthwise" );
211
211
return false ;
212
212
}
213
213
auto KH = weight.dims [2 ];
214
214
auto KW = weight.dims [3 ];
215
215
if (KH != 3 || KW != 3 ) {
216
- GRAPH_DEBUG (" conv2dIsSupported: not 3x3" );
216
+ GRAPH_DEBUG (" not 3x3" );
217
217
return false ;
218
218
}
219
219
if (stride.size () != 2 || stride[0 ] != stride[1 ]) {
220
- GRAPH_DEBUG (" conv2dIsSupported: unsupported stride" );
220
+ GRAPH_DEBUG (" unsupported stride" );
221
221
return false ;
222
222
}
223
223
if (pad.size () != 2 || pad[0 ] != pad[1 ]) {
224
- GRAPH_DEBUG (" conv2dIsSupported: unsupported pad" );
224
+ GRAPH_DEBUG (" unsupported pad" );
225
225
return false ;
226
226
}
227
227
if (dilation.size () != 2 || dilation[0 ] != 1 || dilation[1 ] != 1 ) {
228
- GRAPH_DEBUG (" conv2dIsSupported: unsupported dilation" );
228
+ GRAPH_DEBUG (" unsupported dilation" );
229
229
return false ;
230
230
}
231
231
return true ;
@@ -720,10 +720,7 @@ std::vector<ExprHandle> TensorExprKernel::inferSizesForValue(
720
720
default : {
721
721
GRAPH_DEBUG (" Can't infer sizes for the node: " , *v->node ());
722
722
GRAPH_DEBUG (" Full fusion group graph:\n " , *v->node ()->owningGraph ());
723
- std::string msg =
724
- std::string (" Unhandled node kind (in inferSizesForValue): " ) +
725
- v->node ()->kind ().toQualString ();
726
- throw malformed_input (msg);
723
+ throw std::runtime_error (" Unhandled node kind" );
727
724
}
728
725
}
729
726
}
@@ -2672,8 +2669,7 @@ Tensor* tensorexpr::computeOperandValue(
2672
2669
} break ;
2673
2670
default : {
2674
2671
std::string msg =
2675
- std::string (" Unhandled node kind (in computeOperandValue): " ) +
2676
- op.toQualString ();
2672
+ std::string (" Unhandled node kind: " ) + op.toQualString ();
2677
2673
throw malformed_input (msg);
2678
2674
}
2679
2675
}
@@ -2821,7 +2817,7 @@ Tensor* TensorExprKernel::computeValue(const torch::jit::Value* v) {
2821
2817
} break ;
2822
2818
2823
2819
default : {
2824
- std::string msg = std::string (" Unhandled node kind (in computeValue) : " ) +
2820
+ std::string msg = std::string (" Unhandled node kind: " ) +
2825
2821
v->node ()->kind ().toQualString ();
2826
2822
throw malformed_input (msg);
2827
2823
}
0 commit comments