agrabows commented on code in PR #21115:
URL: https://github.com/apache/incubator-mxnet/pull/21115#discussion_r946718143
##########
src/operator/subgraph/dnnl/dnnl_transformer.cc:
##########
@@ -86,8 +111,21 @@ static bool SgDNNLSelfAttQKInferType(const nnvm::NodeAttrs&
attrs,
<< "QuantizedSelfAttentionQK only supports int8 input, while " <<
in_types->at(0)
<< " is given.";
- TYPE_ASSIGN_CHECK(*in_types, 1, mshadow::kFloat32);
- TYPE_ASSIGN_CHECK(*in_types, 2, mshadow::kFloat32);
+ if constexpr (qk_mode == qk_common::mode::without_split) {
+ if (in_types->at(1) == mshadow::kBfloat16) {
+ return false;
+ }
+ CHECK(in_types->at(1) == mshadow::kInt8)
+ << "QuantizedSelfAttentionQK only supports int8 input, while " <<
in_types->at(1)
+ << " is given.";
Review Comment:
done
##########
src/operator/subgraph/dnnl/dnnl_transformer.cc:
##########
@@ -86,8 +111,21 @@ static bool SgDNNLSelfAttQKInferType(const nnvm::NodeAttrs&
attrs,
<< "QuantizedSelfAttentionQK only supports int8 input, while " <<
in_types->at(0)
<< " is given.";
- TYPE_ASSIGN_CHECK(*in_types, 1, mshadow::kFloat32);
- TYPE_ASSIGN_CHECK(*in_types, 2, mshadow::kFloat32);
+ if constexpr (qk_mode == qk_common::mode::without_split) {
+ if (in_types->at(1) == mshadow::kBfloat16) {
+ return false;
+ }
Review Comment:
done
--
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]