-
Notifications
You must be signed in to change notification settings - Fork 236
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
Why does rnn_bench uses training routines for inference pass? #114
Comments
@sharannarang : wanted to ping you on this too, in case you know why. |
@mattsinc , I think you are correct. We should be using the From the
So, there will be some overhead in using the training function instead of inference function. |
Thanks @sharannarang ! This is exactly what I was seeing/thinking as well. I have tested and pushed a pull request for this change for both NVIDIA and AMD (#117). Matt |
Hi everyone,
I'm attempting to understand the code in the RNN benchmark. Looking at both NVIDIA and AMD's implementations, I see that both are using what appear to be documented as training passes for what I believe to be the inference pass.
For example, for the AMD implementation I see that miopenRNNForwardTraining and miopenRNNBackwardData are used. I thought that miopenRNNForwardTraining was being used for the inference half of the benchmark, and miopenRNNBackwardData was being used for the training half of the benchmark – purely based on context clues from the benchmark (e.g., the !inference call https://github.com/ROCmSoftwarePlatform/DeepBench/blob/master/code/amd/rnn_bench_rocm.cpp#L239 means we’re also doing training too, and miopenRNNBackwardData gets called via that code).
However, according to the AMD documentation, both miopenRNNForwardTraining (https://rocmsoftwareplatform.github.io/MIOpen/doc/html/rnn.html#miopenrnnforwardtraining) and miopenRNNBackwardData (https://rocmsoftwareplatform.github.io/MIOpen/doc/html/rnn.html#miopenrnnbackwarddata) are passes to use when doing training. I also noticed that the NVIDIA implementation appears to do exactly the same thing: https://github.com/baidu-research/DeepBench/blob/master/code/nvidia/rnn_bench.cu#L196, https://github.com/baidu-research/DeepBench/blob/master/code/nvidia/rnn_bench.cu#L221.
So, I was wondering why an inference-only pass wouldn't use something specifically for inference-only passes, e.g., miopenRNNForwardInference (https://rocmsoftwareplatform.github.io/MIOpen/doc/html/rnn.html#miopenrnnforwardinference) or the equivalent cuDNN call? Does DeepBench have a requirement requirement for the backward path that necessitates this approach? @dagamayank , not sure if you know who the right person to ask here is (or if you know the answer)?
Looking through the open issues, I believe this is distinct from #87 .
Thanks,
Matt
The text was updated successfully, but these errors were encountered: