jroesch commented on a change in pull request #6274:
URL: https://github.com/apache/incubator-tvm/pull/6274#discussion_r499059406
##########
File path: src/relay/op/nn/convolution.h
##########
@@ -141,26 +142,43 @@ bool Conv2DRel(const Array<Type>& types, int num_inputs,
const Attrs& attrs,
const Layout kernel_layout(param->kernel_layout);
const auto trans_in_layout = tir::BijectiveLayout(in_layout, kNCHW);
- CHECK(trans_in_layout.defined())
- << "Conv only support input layouts that are convertible from NCHW."
- << " But got " << in_layout;
+ if (!trans_in_layout.defined()) {
Review comment:
I am in favor of using the ICHECK macros only for internal errors and
requiring people to type out error handling code when they are doing it. We
could add an extra macro but I think the secondary indirection obfuscates
people's understanding of how the error handling actually works and by
extension people don't have a good grasp on the error handling strategies in
TVM.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]