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 2018/08/08 13:00:46 UTC

[GitHub] ciyongch commented on issue #10205: [Operator] Accelerate the CPU side performance of topk

ciyongch commented on issue #10205: [Operator] Accelerate the CPU side performance of topk
URL: https://github.com/apache/incubator-mxnet/issues/10205#issuecomment-411396570
 
 
   Hi @sxjscience , @pengzhao-intel 
   
   I made some enhancement (https://github.com/apache/incubator-mxnet/pull/12085) based on the latest code, also I did some test with single topk Op and sockeye translate model, the results shows good with this enhancement.
   
   1) Single Topk Op performance boost
     
      With input ndarray `np.random.rand(10, 3, 1000, 1000)`,  `ret_type='value'`, and `k=3`, the optimized version shows greate performance speedup over the out-of-box version, especially when the axis is `-1`.
   
   | axis        | out-of-box version | optimized version | speedup |
   | ----------- | ------------------ | ----------------- | ------- |
   | default(-1) | 601.46 ms          | 7.40 ms           | 81.3x   |
   | 0           | 1436.65 ms         | 553.22 ms         | 2.6x    |
   | 1           | 1617.92 ms         | 423.96 ms         | 3.82x   |
   | 2           | 922.24 ms          | 400.52 ms         | 2.30x   |
   
   
   2) Sockeye performance boost with the optimized topk
      
      Tested with [sockeye](https://github.com/awslabs/sockeye.git) translate model, with `batch_size=64` and `beam_size=10`, the optimized topk contributed a 3.43x speedup over the out-of-box version.
   
   | out-of-box version | optimized version | speedup |
   | ------------------ | ----------------- | ------- |
   | 5.35 sent/sec      | 18.37 sent/sec    | 3.43x   |
   

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