blchu commented on issue #20636: URL: https://github.com/apache/incubator-mxnet/issues/20636#issuecomment-1010446977
I've done some additional profiling of the code, and have noticed that certain parts of the code are being slowed down by functions that currently call `asnumpy()` and use the numpy array equivalent function instead. Directly implementing these functions should improve the performance considerably. Also, the `__getitem__` function is slower than the numpy version, and moving the code to the backend would improve array indexing performance. I've attached an image of the profile visualization of the related part of the code (getting the best translations at the end of decoding). <img width="896" alt="mx2_profile_visual" src="https://user-images.githubusercontent.com/8587304/149035517-c2e37ce9-73c0-49ad-9bf5-2cc55c5dd941.PNG"> -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
