Repository navigation
Optimize convert_vec_soft_to_tensor_hard by 50x - #160
Conversation
Signed-off-by: Ben Howe <bhowe@nvidia.com>
melody-ren
left a comment
There was a problem hiding this comment.
Looks good. Thanks, Ben.
Curious though - (1) why is the change not applied to the 2D version of convert_vec_hard_to_soft? (2) What prompted this change? Based on a bug, profiling results or something else?
The key change that had a big improvement was to I made these discoveries while working on the sliding window decoder prototypes, which was performing very poorly until these changes were made. |
This small PR optimizes one of our utility functions by >50x.
In the long term, we need to consider accessor methods for
cudaqx::tensorthat don't incur the performance penalty of allocating and deallocating vectors on every.at()access. As best as I can tell, this is not supported very well by the underlying xtensor class.