agrabows commented on code in PR #21115:
URL: https://github.com/apache/incubator-mxnet/pull/21115#discussion_r951289279
##########
src/operator/subgraph/dnnl/dnnl_transformer.cc:
##########
@@ -296,18 +368,33 @@ void SgDNNLSelfAttQKOp::Forward(const OpContext& ctx,
DNNLStream::Get()->Submit();
if (param_.quantized && !param_.enabled_float_output.has_value()) {
- float* output_min = outputs[1].data().dptr<float>();
- float* output_max = outputs[2].data().dptr<float>();
-
- *output_min = min_output_;
- *output_max = max_output_;
+ if constexpr (with_split) {
+ float* output_min = outputs[1].data().dptr<float>();
+ float* output_max = outputs[2].data().dptr<float>();
+ *output_min = min_output_;
+ *output_max = max_output_;
+ } else {
+ float* output_min_0 = outputs[2].data().dptr<float>();
+ float* output_max_0 = outputs[3].data().dptr<float>();
+ float* output_min_1 = outputs[4].data().dptr<float>();
+ float* output_max_1 = outputs[5].data().dptr<float>();
+ *output_min_0 = min_output_;
+ *output_max_0 = max_output_;
+ *output_min_1 = min_output_;
+ *output_max_1 = max_output_;
+ }
Review Comment:
it didn't but you are right, this code was incorrect
##########
src/operator/subgraph/dnnl/dnnl_transformer.cc:
##########
@@ -29,54 +29,78 @@
#include "operator/subgraph/common.h"
#include "dnnl_transformer-inl.h"
-// 3 tensors within one (queries key values) =
+// 3 tensors within one (queries key values)
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]