Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[OpPerf] Implement remaining nn_conv ops in opperf #17500

Merged
merged 1 commit into from
Feb 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion benchmark/opperf/nd_operations/nn_conv_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
9. GlobalAvgPool2D
10.GlobalSumPool1D
11.GlobalSumPool2D
12.ROIPooling

(Under the hood uses mx.nd.pooling)

Expand Down Expand Up @@ -90,8 +91,23 @@ def run_pooling_operators_benchmarks(ctx=mx.cpu(), dtype='float32', profiler='na
],
warmup=warmup,
runs=runs)
# Run ROI Pooling performance runs
roipool_benchmark_res = []
for roipool_data in [(32, 3, 256, 256), (32, 3, 64, 64)]:
roipool_benchmark_res += run_performance_test([getattr(MX_OP_MODULE, "ROIPooling")],
run_backward=True,
dtype=dtype,
ctx=ctx,
profiler=profiler,
inputs=[{"data": roipool_data,
"rois": (32, 5),
"pooled_size": (2, 2),
"spatial_scale": .5}
],
warmup=warmup,
runs=runs)
# Prepare combined results
mx_pooling_op_results = merge_map_list(pool1d_benchmark_res + pool2d_benchmark_res)
mx_pooling_op_results = merge_map_list(pool1d_benchmark_res + pool2d_benchmark_res + roipool_benchmark_res)
return mx_pooling_op_results


Expand Down
2 changes: 1 addition & 1 deletion benchmark/opperf/rules/default_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,4 @@
"weight", "weight32", "grad", "mean", "var", "mom", "n", "d",
"v", "z", "g", "delta", "args", "indices", "shape_like", "y",
"x", "condition", "a", "index", "raveL_data", "label", "grid",
"A", "B", "C"]
"A", "B", "C", "rois"]