ganler commented on code in PR #11728:
URL: https://github.com/apache/tvm/pull/11728#discussion_r898283093
##########
src/relay/op/nn/nn.cc:
##########
@@ -399,6 +399,27 @@ where :math:`*` is an channelwise multiplication for each
sample in the batch.
// relay.softmax
TVM_REGISTER_NODE_TYPE(SoftmaxAttrs);
+bool SoftmaxRel(const Array<Type>& types, int num_inputs, const Attrs& attrs,
+ const TypeReporter& reporter) {
+ ICHECK_EQ(types.size(), 2);
+ const auto* data = types[0].as<TensorTypeNode>();
+ if (data == nullptr) return false;
+
+ const SoftmaxAttrs* param = attrs.as<SoftmaxAttrs>();
+ ICHECK(param != nullptr);
+ int axis = param->axis;
+ int ndim = static_cast<int>(data->shape.size());
+ if (axis >= ndim || axis < -ndim) {
+ reporter->GetDiagCtx().EmitFatal(Diagnostic::Error(reporter->GetSpan())
+ << "The axis is not in range [" << -ndim
<< ", " << ndim
Review Comment:
It seems the value of variable 'axis' still has not been printed?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]