larroy commented on a change in pull request #14977: Add an utility for 
operator benchmarks
URL: https://github.com/apache/incubator-mxnet/pull/14977#discussion_r293638557
 
 

 ##########
 File path: benchmark/opperf/nd_operations/nn_basic_operators.py
 ##########
 @@ -0,0 +1,83 @@
+# 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.
+
+import mxnet as mx
+from mxnet import nd
+from benchmark.opperf.utils.benchmark_utils import run_performance_test
+from benchmark.opperf.utils.common_utils import merge_map_list
+
+"""Performance benchmark tests for MXNet NDArray basic NN Operators.
+
+1. FullyConnected
+2. Dropout
+3. BatchNorm
+
+"""
+
+
+def run_nn_basic_operators_benchmarks(ctx=mx.cpu(), dtype='float32', 
warmup=10, runs=50):
+    # FullyConnnected operator benchmarks
+    fc_benchmark_res = run_performance_test([nd.FullyConnected],
+                                            run_backward=True,
+                                            dtype=dtype,
+                                            ctx=ctx,
+                                            inputs=[{"data": (32, 3, 256, 256),
 
 Review comment:
   I think the shapes we should autodiscover actually

----------------------------------------------------------------
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