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/03/23 08:27:17 UTC

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

mjpost commented on issue #10205: [Operator] Accelerate the CPU side performance of topk
URL: https://github.com/apache/incubator-mxnet/issues/10205#issuecomment-375578285
 
 
   Our solution in Sockeye is to switch on the architecture context. In CPU context, we convert our matrix to numpy and use its version. The relevant lines are as follows:
   
   - [Copy to numpy](https://github.com/awslabs/sockeye/blob/335124558e33538543e1574edba755e9458ea506/sockeye/inference.py#L1282)
   - Call [`smallest_k()` (CPU)](https://github.com/awslabs/sockeye/blob/335124558e33538543e1574edba755e9458ea506/sockeye/utils.py#L245) or [`smallest_k_mx()` (GPU)](https://github.com/awslabs/sockeye/blob/335124558e33538543e1574edba755e9458ea506/sockeye/utils.py#L268)

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