reminisce commented on a change in pull request #15984: [DO NOT REVIEW] [DO NOT 
MERGE] General reduce compute for tvm ops and TVM version of sum
URL: https://github.com/apache/incubator-mxnet/pull/15984#discussion_r317239519
 
 

 ##########
 File path: src/operator/contrib/tvmop/reduce.cc
 ##########
 @@ -0,0 +1,141 @@
+/*
+ * 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.
+ */
+
+/*!
+ * Copyright (c) 2019 by Contributors
+ * \file ufunc.cc
+ * \brief
+ * \author Yizhi Liu
+ */
+#ifdef MXNET_USE_TVM_OP
+#include <tvm/runtime/packed_func.h>
+#include <tvm/runtime/registry.h>
+#include <tvm/runtime/c_runtime_api.h>
+#include <mxnet/base.h>
+#include <string>
+#include "../../tensor/elemwise_binary_broadcast_op.h"
+#include "../../tvmop/op_module.h"
+#include "../../tensor/elemwise_binary_op.h"
+#include "../../numpy/np_broadcast_reduce_op.h"
+
+namespace mxnet {
+namespace op {
+
+static constexpr char func_sum_cpu[] = "tvm_sum";
+static constexpr char func_sum_gpu[] = "cuda_tvm_sum";
+// static constexpr char func_bakcward_vadd_cpu[] = "backward_vadd";
+// static constexpr char func_bakcward_vadd_gpu[] = "cuda_backward_vadd";
+static constexpr int max_dim = 5;
+
+TBlob padding_reduce(const TBlob& tblob, const int max_dim) {
 
 Review comment:
   To be exact, call this `PrependAxes`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to