connorgoggins opened a new pull request #17502: [OpPerf] Implement remaining 
random sampling ops
URL: https://github.com/apache/incubator-mxnet/pull/17502
 
 
   ## Description ##
   This PR serves to implement the remaining operators from the Random Sampling 
category (`BilinearSampler`, `GridGenerator`, and `sample_multinomial`) in 
opperf. To achieve this, I added a list to track ops requiring `custom_data` in 
`op_registry_utils.py` (same strategy @ChaiBapchya used) and added the new 
random sampling ops to the list, which allowed me to add custom data dimensions 
for each new op in `default_params.py`. I then added these new ops to the 
comments in `random_sampling_operators.py`.
   
   Furthermore, I investigated the `sample_multinomial` op, a Random Sampling 
op which had previously been added to the `unique_ops` tuple in 
`op_registry_utils.py`. This inclusion of the op in `unique_ops` effectively 
removed the op from opperf. While the documentation claimed that this op only 
worked when all values on the last axis summed to 1, I tested the op 
extensively and found that the op did in fact work on random data. With this in 
mind, I added this op to opperf and assigned its data parameter to lower 
dimensional data than the standard data shape to facilitate quick testing (on 
the standard data shape, the op took several minutes to complete a single 
forward pass).
   
   ## Checklist ##
   ### Essentials ###
   Please feel free to remove inapplicable items for your PR.
   - [x] Changes are complete (i.e. I finished coding on this PR)
   - [x] All changes have test coverage
   - [x] Code is well-documented
   - [x] To the best of my knowledge, examples are either not affected by this 
change, or have been fixed to be compatible with this change
   
   ### Changes ###
   - M benchmark/opperf/nd_operations/random_sampling_operators.py
   - M benchmark/opperf/utils/op_registry_utils.py
   - M benchmark/opperf/rules/default_params.py
   
   ## Comments ##
   Tested on p2.16xl w/ubuntu 16.04 and Mac OS with:
   1. Checkout branch and call function 
`run_mx_random_sampling_operators_benchmarks` - runs all Random Sampling ops on 
relevant data
   2. Checkout branch and run `opperf.py` (full run of all ops)
   
   ## Performance Results ##
   [Group of operator test - all Random Sampling ops 
(CPU)](https://gist.github.com/connorgoggins/de07fe539b84a37ebb916cb4c5f0af4f)
   [Full OpPerf test 
(CPU)](https://gist.github.com/connorgoggins/a2ea86e186c62154fbb2b98f0ec5d262)
   
   [Group of operator test - all Random Sampling ops 
(GPU)](https://gist.github.com/connorgoggins/adb2195c4bb409ccca68c22b3bcf4459)
   [Full OpPerf test 
(GPU)](https://gist.github.com/connorgoggins/f156bfbfadd9f39cf015f8c6fa685dcf)
   
   @apeforest @access2rohit @ChaiBapchya 
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to