You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2022/02/21 16:31:17 UTC
[GitHub] [incubator-mxnet] agrabows opened a new pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
agrabows opened a new pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904
## Description ##
By using dnnl_eltwise primitive oneDNN will be used now to count power() operator cases where exponential is a scalar.
## Checklist ##
### Essentials ###
- [x] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
- [x] Changes are complete (i.e. I finished coding on this PR)
### Changes ###
- [x] Integrate oneDNN support for power() operator in MXNet NumPy module
- [x] Integrate oneDNN support for power() operator in MXNet NDArray module
[dnnl_eltwise_pow](https://oneapi-src.github.io/oneDNN/enum_dnnl_alg_kind_t.html#doxid-group-dnnl-api-primitives-common-1gga96946c805f6c4922c38c37049ab95d23aa1d0f7a69b7dfbfbd817623552558054)
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1081498796
Jenkins CI successfully triggered : [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1081498681
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] bartekkuncer commented on a change in pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
bartekkuncer commented on a change in pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#discussion_r827412144
##########
File path: src/operator/tensor/elemwise_binary_scalar_op_extended.cc
##########
@@ -49,8 +49,38 @@ MXNET_OPERATOR_REGISTER_BINARY(_backward_minimum_scalar)
.set_attr_parser(ParamParser<NumpyBinaryScalarParam>)
.set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Backward<cpu, mshadow_op::le>);
+#if MXNET_USE_ONEDNN == 1
+bool PowerStorageType(const nnvm::NodeAttrs& attrs,
+ const int dev_mask,
+ DispatchMode* dispatch_mode,
+ std::vector<int>* inputs,
+ std::vector<int>* outputs) {
+ CHECK_EQ(inputs->size(), 1);
+ CHECK_EQ(outputs->size(), 1);
+
+ return DNNLStorageType(attrs, dev_mask, true, dispatch_mode, inputs, outputs);
+}
+
+void PowerComputeExCPU(const nnvm::NodeAttrs& attrs,
+ const OpContext& ctx,
+ const std::vector<mxnet::NDArray>& inputs,
+ const std::vector<OpReqType>& req,
+ const std::vector<mxnet::NDArray>& outputs) {
+ if (SupportDNNL(inputs[0])) {
Review comment:
This function allows only ndim equal to 1, 2 and 4. Are you sure this function should be so strict?
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] bartekkuncer commented on a change in pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
bartekkuncer commented on a change in pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#discussion_r827390330
##########
File path: src/operator/tensor/elemwise_binary_scalar_op_extended.cc
##########
@@ -49,8 +49,38 @@ MXNET_OPERATOR_REGISTER_BINARY(_backward_minimum_scalar)
.set_attr_parser(ParamParser<NumpyBinaryScalarParam>)
.set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Backward<cpu, mshadow_op::le>);
+#if MXNET_USE_ONEDNN == 1
+bool PowerStorageType(const nnvm::NodeAttrs& attrs,
+ const int dev_mask,
+ DispatchMode* dispatch_mode,
+ std::vector<int>* inputs,
+ std::vector<int>* outputs) {
+ CHECK_EQ(inputs->size(), 1);
+ CHECK_EQ(outputs->size(), 1);
+
+ return DNNLStorageType(attrs, dev_mask, true, dispatch_mode, inputs, outputs);
+}
+
+void PowerComputeExCPU(const nnvm::NodeAttrs& attrs,
+ const OpContext& ctx,
+ const std::vector<mxnet::NDArray>& inputs,
+ const std::vector<OpReqType>& req,
+ const std::vector<mxnet::NDArray>& outputs) {
+ if (SupportDNNL(inputs[0])) {
+ DNNLRun(DNNLPowerForward, attrs, ctx, inputs[0], req[0], outputs[0]);
Review comment:
Why the call is not encompassed with usual DNNL_OPCHECK_INIT and DNNL_OPCHECK_RUN macros?
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1047054252
Hey @agrabows , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:
- To trigger all jobs: @mxnet-bot run ci [all]
- To trigger specific jobs: @mxnet-bot run ci [job1, job2]
***
**CI supported jobs**: [centos-gpu, website, miscellaneous, windows-cpu, sanity, centos-cpu, unix-cpu, edge, windows-gpu, clang, unix-gpu]
***
_Note_:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1060360016
Jenkins CI successfully triggered : [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1060359912
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1067786543
Jenkins CI successfully triggered : [centos-gpu, windows-gpu, sanity]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1055254141
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1070623150
Jenkins CI successfully triggered : [unix-cpu, windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] bartekkuncer commented on a change in pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
bartekkuncer commented on a change in pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#discussion_r827347959
##########
File path: src/operator/nn/dnnl/dnnl_power-inl.h
##########
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * \file dnnl_power-inl.h
+ * \author: Adam Grabowski, adam.grabowski@intel.com
+ */
+
+#ifndef MXNET_OPERATOR_NN_DNNL_DNNL_POWER_INL_H_
+#define MXNET_OPERATOR_NN_DNNL_DNNL_POWER_INL_H_
+
+#if MXNET_USE_ONEDNN == 1
+
+#include "dnnl_base-inl.h"
+#include "dnnl_ops-inl.h"
+#include "operator/tensor/elemwise_binary_scalar_op.h"
+#include "operator/tensor/elemwise_binary_broadcast_op.h"
+
+namespace mxnet {
+namespace op {
+
+using eltwise_fwd_t = dnnl::eltwise_forward;
+using eltwise_fwd_pd_t = dnnl::eltwise_forward::primitive_desc;
+
+class DNNLPowerFwd {
+ public:
+ static DNNLPowerFwd& GetPowerForward(const nnvm::NodeAttrs& attrs,
+ const NDArray& input,
+ const NDArray& outputs);
+
+ DNNLPowerFwd(const NDArray& input, const float exponent);
+
+ void Execute(const NDArray& input, const OpReqType& req, const NDArray& output);
+
+ private:
+ std::shared_ptr<eltwise_fwd_t> fwd;
+ std::shared_ptr<eltwise_fwd_pd_t> fwd_pd;
+};
+
+typedef OpSignature DNNLPowerSignature;
+
+void DNNLPowerForward(const nnvm::NodeAttrs& attrs,
Review comment:
Please move this declaration to src/operator/nn/dnnl/dnnl_ops-inl.h file.
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1061618603
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on a change in pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on a change in pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#discussion_r818625592
##########
File path: src/operator/nn/dnnl/dnnl_power-inl.h
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * \file dnnl_power-inl.h
+ * \author: Adam Grabowski, adam.grabowski@intel.com
+ */
+
+#ifndef MXNET_OPERATOR_NN_DNNL_DNNL_POWER_INL_H_
+#define MXNET_OPERATOR_NN_DNNL_DNNL_POWER_INL_H_
+
+#if MXNET_USE_ONEDNN == 1
+
+#include <vector>
+#include "./dnnl_base-inl.h"
+#include "./dnnl_ops-inl.h"
+#include "../../tensor/elemwise_binary_scalar_op.h"
Review comment:
Dots removed.
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows removed a comment on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows removed a comment on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1062703721
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1076434181
@mxnet-bot run ci [windows-gpu, unix-cpu, unix-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1072450204
Jenkins CI successfully triggered : [unix-cpu, windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] bartekkuncer commented on a change in pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
bartekkuncer commented on a change in pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#discussion_r827390330
##########
File path: src/operator/tensor/elemwise_binary_scalar_op_extended.cc
##########
@@ -49,8 +49,38 @@ MXNET_OPERATOR_REGISTER_BINARY(_backward_minimum_scalar)
.set_attr_parser(ParamParser<NumpyBinaryScalarParam>)
.set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Backward<cpu, mshadow_op::le>);
+#if MXNET_USE_ONEDNN == 1
+bool PowerStorageType(const nnvm::NodeAttrs& attrs,
+ const int dev_mask,
+ DispatchMode* dispatch_mode,
+ std::vector<int>* inputs,
+ std::vector<int>* outputs) {
+ CHECK_EQ(inputs->size(), 1);
+ CHECK_EQ(outputs->size(), 1);
+
+ return DNNLStorageType(attrs, dev_mask, true, dispatch_mode, inputs, outputs);
+}
+
+void PowerComputeExCPU(const nnvm::NodeAttrs& attrs,
+ const OpContext& ctx,
+ const std::vector<mxnet::NDArray>& inputs,
+ const std::vector<OpReqType>& req,
+ const std::vector<mxnet::NDArray>& outputs) {
+ if (SupportDNNL(inputs[0])) {
+ DNNLRun(DNNLPowerForward, attrs, ctx, inputs[0], req[0], outputs[0]);
Review comment:
Why the call is not surrounded with usual DNNL_OPCHECK_INIT and DNNL_OPCHECK_RUN calls?
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] bartekkuncer commented on a change in pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
bartekkuncer commented on a change in pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#discussion_r827268928
##########
File path: src/operator/nn/dnnl/dnnl_power-inl.h
##########
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * \file dnnl_power-inl.h
+ * \author: Adam Grabowski, adam.grabowski@intel.com
+ */
+
+#ifndef MXNET_OPERATOR_NN_DNNL_DNNL_POWER_INL_H_
+#define MXNET_OPERATOR_NN_DNNL_DNNL_POWER_INL_H_
+
+#if MXNET_USE_ONEDNN == 1
+
+#include "dnnl_base-inl.h"
+#include "dnnl_ops-inl.h"
+#include "operator/tensor/elemwise_binary_scalar_op.h"
+#include "operator/tensor/elemwise_binary_broadcast_op.h"
Review comment:
is this broadcast include necessary here?
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1068131495
Jenkins CI successfully triggered : [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1054132159
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1055254269
Jenkins CI successfully triggered : [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1077623812
Jenkins CI successfully triggered : [clang]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1082060191
Jenkins CI successfully triggered : [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on a change in pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on a change in pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#discussion_r818622470
##########
File path: tests/python/dnnl/test_bf16_operator.py
##########
@@ -69,26 +69,26 @@ def check_operator_accuracy(sym_fp32, sym_bf16, data_shape, num_input_data=1, bf
arg_names = sym_fp32.list_arguments()
aux_names = sym_fp32.list_auxiliary_states()
- exe_fp32 = sym_fp32._simple_bind(ctx=mx.cpu(), **data_shape)
+ #exe_fp32 = sym_fp32._simple_bind(ctx=mx.cpu(), **data_shape)
Review comment:
No, it was a mistake from other commit, thanks for pointing it out.
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1076434273
Jenkins CI successfully triggered : [unix-cpu, windows-gpu, unix-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1080506011
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1080506111
Jenkins CI successfully triggered : [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1050704758
Jenkins CI successfully triggered : [website, centos-gpu, windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1050704665
@mxnet-bot run ci [centos-gpu, website, windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1072450204
Jenkins CI successfully triggered : [unix-cpu, windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1054132204
Jenkins CI successfully triggered : [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1058163454
Jenkins CI successfully triggered : [unix-cpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1080309428
Jenkins CI successfully triggered : [clang, windows-gpu, unix-cpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1084521693
Jenkins CI successfully triggered : [unix-cpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1081808190
Jenkins CI successfully triggered : [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1082058869
Jenkins CI successfully triggered : [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1080309350
@mxnet-bot run ci [windows-gpu, unix-cpu, clang]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1082060111
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1082058736
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1070622889
@mxnet-bot run ci [windows-gpu, unix-cpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] bartekkuncer commented on a change in pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
bartekkuncer commented on a change in pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#discussion_r818636800
##########
File path: src/operator/tensor/elemwise_binary_scalar_op_extended.cc
##########
@@ -49,8 +49,47 @@ MXNET_OPERATOR_REGISTER_BINARY(_backward_minimum_scalar)
.set_attr_parser(ParamParser<NumpyBinaryScalarParam>)
.set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Backward<cpu, mshadow_op::le>);
+#if MXNET_USE_ONEDNN == 1
+bool PowerStorageType(const nnvm::NodeAttrs& attrs,
+ const int dev_mask,
+ DispatchMode* dispatch_mode,
+ std::vector<int>* inputs,
+ std::vector<int>* outputs) {
+ CHECK_EQ(inputs->size(), 1);
+ CHECK_EQ(outputs->size(), 1);
+
+ return DNNLStorageType(attrs, dev_mask, true, dispatch_mode, inputs, outputs);
+}
+
+void DNNLPowerForward(const nnvm::NodeAttrs& attrs,
Review comment:
Why is this function declared here? I believe that usually we add the declaration of this kind of functions to dnnl_ops-inl.h file and definition to dnnl_*op_name*.cc file. Is this operator's implementation somehow preventing that or maybe is there any other reason to do it in this way?
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1058163342
@mxnet-bot run ci [unix-cpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on a change in pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on a change in pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#discussion_r818836565
##########
File path: src/operator/tensor/elemwise_binary_scalar_op_extended.cc
##########
@@ -49,8 +49,47 @@ MXNET_OPERATOR_REGISTER_BINARY(_backward_minimum_scalar)
.set_attr_parser(ParamParser<NumpyBinaryScalarParam>)
.set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Backward<cpu, mshadow_op::le>);
+#if MXNET_USE_ONEDNN == 1
+bool PowerStorageType(const nnvm::NodeAttrs& attrs,
+ const int dev_mask,
+ DispatchMode* dispatch_mode,
+ std::vector<int>* inputs,
+ std::vector<int>* outputs) {
+ CHECK_EQ(inputs->size(), 1);
+ CHECK_EQ(outputs->size(), 1);
+
+ return DNNLStorageType(attrs, dev_mask, true, dispatch_mode, inputs, outputs);
+}
+
+void DNNLPowerForward(const nnvm::NodeAttrs& attrs,
Review comment:
Definition and implementation are moved to dnnl files now.
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1073635055
Jenkins CI successfully triggered : [windows-gpu, unix-cpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1077623711
@mxnet-bot run ci [clang]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] bartekkuncer commented on a change in pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
bartekkuncer commented on a change in pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#discussion_r818505673
##########
File path: src/operator/nn/dnnl/dnnl_power-inl.h
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * \file dnnl_power-inl.h
+ * \author: Adam Grabowski, adam.grabowski@intel.com
+ */
+
+#ifndef MXNET_OPERATOR_NN_DNNL_DNNL_POWER_INL_H_
+#define MXNET_OPERATOR_NN_DNNL_DNNL_POWER_INL_H_
+
+#if MXNET_USE_ONEDNN == 1
+
+#include <vector>
+#include "./dnnl_base-inl.h"
+#include "./dnnl_ops-inl.h"
+#include "../../tensor/elemwise_binary_scalar_op.h"
Review comment:
I believe that since Mateusz's change we are trying to avoid dots in includes.
##########
File path: src/operator/nn/dnnl/dnnl_power.cc
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * \file dnnl_power.cc
+ * \author: Adam Grabowski, adam.grabowski@intel.com
+ */
+
+#if MXNET_USE_ONEDNN == 1
+
+#include "./dnnl_power-inl.h"
+
+namespace mxnet {
+namespace op {
+
+DNNLPowerFwd& DNNLPowerFwd::GetPowerForward(const nnvm::NodeAttrs& attrs,
+ const std::vector<NDArray>& inputs,
+ const std::vector<NDArray>& outputs) {
+ const NumpyBinaryScalarParam& param = nnvm::get<NumpyBinaryScalarParam>(attrs.parsed);
+#if DMLC_CXX11_THREAD_LOCAL
+ static thread_local std::unordered_map<DNNLPowerSignature, DNNLPowerFwd, OpHash> fwds;
+#else
+ static MX_THREAD_LOCAL std::unordered_map<DNNLPowerSignature, DNNLPowerFwd, OpHash> fwds;
+#endif
+ DNNLPowerSignature key;
+ key.AddSign(static_cast<float>(param.scalar));
+ key.AddSign(inputs[0]);
Review comment:
You might consider passing only first input and output to avoid having to use everywhere inputs[0]/outputs[0].
##########
File path: tests/python/dnnl/test_bf16_operator.py
##########
@@ -69,26 +69,26 @@ def check_operator_accuracy(sym_fp32, sym_bf16, data_shape, num_input_data=1, bf
arg_names = sym_fp32.list_arguments()
aux_names = sym_fp32.list_auxiliary_states()
- exe_fp32 = sym_fp32._simple_bind(ctx=mx.cpu(), **data_shape)
+ #exe_fp32 = sym_fp32._simple_bind(ctx=mx.cpu(), **data_shape)
Review comment:
Did you actually mean to comment these lines in this file?
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1061618663
Jenkins CI successfully triggered : [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on a change in pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on a change in pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#discussion_r818623796
##########
File path: src/operator/nn/dnnl/dnnl_power.cc
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * \file dnnl_power.cc
+ * \author: Adam Grabowski, adam.grabowski@intel.com
+ */
+
+#if MXNET_USE_ONEDNN == 1
+
+#include "./dnnl_power-inl.h"
+
+namespace mxnet {
+namespace op {
+
+DNNLPowerFwd& DNNLPowerFwd::GetPowerForward(const nnvm::NodeAttrs& attrs,
+ const std::vector<NDArray>& inputs,
+ const std::vector<NDArray>& outputs) {
+ const NumpyBinaryScalarParam& param = nnvm::get<NumpyBinaryScalarParam>(attrs.parsed);
+#if DMLC_CXX11_THREAD_LOCAL
+ static thread_local std::unordered_map<DNNLPowerSignature, DNNLPowerFwd, OpHash> fwds;
+#else
+ static MX_THREAD_LOCAL std::unordered_map<DNNLPowerSignature, DNNLPowerFwd, OpHash> fwds;
+#endif
+ DNNLPowerSignature key;
+ key.AddSign(static_cast<float>(param.scalar));
+ key.AddSign(inputs[0]);
Review comment:
Alternate version of DNNLRun() function with single inputs was used. It is input/output now in all dnnl files.
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1059061767
Jenkins CI successfully triggered : [windows-gpu, unix-cpu, centos-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1059061674
@mxnet-bot run ci [unix-cpu, centos-gpu, windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1062703721
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1064895086
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1068131374
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1081808121
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1084521605
@mxnet-bot run ci [unix-cpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] bartekkuncer commented on a change in pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
bartekkuncer commented on a change in pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#discussion_r827390330
##########
File path: src/operator/tensor/elemwise_binary_scalar_op_extended.cc
##########
@@ -49,8 +49,38 @@ MXNET_OPERATOR_REGISTER_BINARY(_backward_minimum_scalar)
.set_attr_parser(ParamParser<NumpyBinaryScalarParam>)
.set_attr<FCompute>("FCompute<cpu>", BinaryScalarOp::Backward<cpu, mshadow_op::le>);
+#if MXNET_USE_ONEDNN == 1
+bool PowerStorageType(const nnvm::NodeAttrs& attrs,
+ const int dev_mask,
+ DispatchMode* dispatch_mode,
+ std::vector<int>* inputs,
+ std::vector<int>* outputs) {
+ CHECK_EQ(inputs->size(), 1);
+ CHECK_EQ(outputs->size(), 1);
+
+ return DNNLStorageType(attrs, dev_mask, true, dispatch_mode, inputs, outputs);
+}
+
+void PowerComputeExCPU(const nnvm::NodeAttrs& attrs,
+ const OpContext& ctx,
+ const std::vector<mxnet::NDArray>& inputs,
+ const std::vector<OpReqType>& req,
+ const std::vector<mxnet::NDArray>& outputs) {
+ if (SupportDNNL(inputs[0])) {
+ DNNLRun(DNNLPowerForward, attrs, ctx, inputs[0], req[0], outputs[0]);
Review comment:
Why the call is not surrounded with usual DNNL_OPCHECK_INIT and DNNL_OPCHECK_RUN macros?
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1072450130
@mxnet-bot run ci [windows-gpu, unix-cpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1072450130
@mxnet-bot run ci [windows-gpu, unix-cpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1067786480
@mxnet-bot run ci [sanity, centos-gpu, windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1073634985
@mxnet-bot run ci [windows-gpu, unix-cpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1080507676
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1080507779
Jenkins CI successfully triggered : [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1077464705
Jenkins CI successfully triggered : [windows-gpu, unix-cpu, unix-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1077464550
@mxnet-bot run ci [windows-gpu, unix-cpu, unix-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows commented on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows commented on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1062971547
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] agrabows removed a comment on pull request #20904: [FEATURE] Integrate oneDNN support for scalar power() operator
Posted by GitBox <gi...@apache.org>.
agrabows removed a comment on pull request #20904:
URL: https://github.com/apache/incubator-mxnet/pull/20904#issuecomment-1062971547
@mxnet-bot run ci [windows-gpu]
--
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: commits-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org