-
Notifications
You must be signed in to change notification settings - Fork 15
swap axis for optimization in Tensor3dCopy() #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks-- could you please test if there is any effect on speed, using that On Sat, Oct 24, 2015 at 4:12 PM, Yiming Wang [email protected]
|
... also the function is getting a little long-- it might be better to On Sat, Oct 24, 2015 at 6:06 PM, Daniel Povey [email protected] wrote:
|
Pushed the new commit. The speedup on Tensor3dCopy seems not significant (8.79502s vs 8.62674s as shown below). The first 3 significant digits of these two time intervals keep the same over multiple runs (8.79 and 8.62 respectively). By printing out the more info, it appears that every time when the swap happens, there is only one ystride (src or dst, but not both) being 1, and x is always swapped with y. Before optimization: After optimization: |
OK, thanks- I'll look at it and maybe merge it to-morrow. On Sun, Oct 25, 2015 at 12:19 AM, Yiming Wang [email protected]
|
@@ -24,11 +24,45 @@ | |||
namespace kaldi { | |||
namespace ctc { | |||
|
|||
void SwapDimsForX(int32& xdim, int32& ydim, int32& zdim, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry- it's against the Google style guide to use non-const references in function parameters. These should be pointers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declared static. and move the comments from header file to .cc file.
@@ -24,11 +24,45 @@ | |||
namespace kaldi { | |||
namespace ctc { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a comment here briefly explaining what the does; and since this function is not exported, it's good practice to declare it 'static'.
swap axis for optimization in Tensor3dCopy()
Add ivector support to online nnet3 decoder
Wrap fstext/deterministic-fst.h
No description provided.