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 2017/10/19 22:37:30 UTC
[GitHub] zheng-da commented on a change in pull request #7931: MKL-DNN integration: request for reviews
zheng-da commented on a change in pull request #7931: MKL-DNN integration: request for reviews
URL: https://github.com/apache/incubator-mxnet/pull/7931#discussion_r145817839
##########
File path: src/operator/mkl/mkldnn_elemwise_sum-inl.h
##########
@@ -0,0 +1,233 @@
+/*******************************************************************************
+* Copyright 2016-2017 Intel Corporation
+*
+* Licensed 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 mkldnn_elemwise_sum-inl.h
+* \brief
+* \author young.jin.kim@intel.com
+* ashok.emani@intel.com
+* deepthi.karkada@intel.com
+* louis.feng@intel.com
+* adam.d.straw@intel.com
+*
+*
+*******************************************************************************/
+
+#pragma once
+
+#include <dmlc/logging.h>
+#include <cstring>
+#include <vector>
+#include <mkldnn_types.h>
+#include "../operator_common.h"
+#include "../tensor/elemwise_binary_op.h"
+#include "../elemwise_op_common.h"
+#include "../mshadow_op.h"
+#include "../mxnet_op.h"
+#include "mkl_util-inl.h"
+
+namespace mxnet {
+namespace op {
+
+/**
+ * Adds n input data element-wise and store output to a single output buffer.
+ * @tparam xpu
+ * @tparam DType
+ * @param attrs
+ * @param ctx
+ * @param in_data
+ * @param req
+ * @param out_data
+ */
+template<typename xpu, typename DType>
Review comment:
Why do you need xpu for any MKLDNN functions? Doesn't the code always run on CPU?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services