-
Notifications
You must be signed in to change notification settings - Fork 42
prepare.py slow speed #18
Comments
Here are my notes from investigating the time to prepare dev-clean, including writing llc files. Below I show various setups. TL:DR: the following statements:
need to be moved to OUTSIDE OF MAIN() for a 100-fold speed imrovement.
|
Also notice there is about a factor of 300 in speed between the last 2 runs, if you look at the |
Let me try it under your suggestion and make a PR to fix it. |
Yes, it is much faster! 👍 Use 48 cores on
Use 72 cores on
It is slower than Dan's result, I think it should be caused by the NFS delay of my home directory. |
🎉 |
I have disabled the OpenMP support for This should remove the suspected cause of crashing (GNU OpenMP and Intel OpenMP co-exist and interfere), and will allow you to go back to the We have minor release scheduled in the early December, so we appreciate if you can test it and confirm it resolves the issue (or not). pytorch/audio#1021 |
@jimbozhang would you mind testing this? (I think what is required is testing that the speed is ok after you revert the "spawn"->"fork" and remove the stuff about setting torch num_threads). |
OK, I'll work on this (and |
With the latest version's $ time python prepare.py
Didn't modify the job number setting, so the job number |
I think to test what he's asking about, you need to install the latest
version of TorchAudio (available through the nightly builds)... at least
I think that is what he was saying. You might need to install PyTorch
1.7.0 in order to do that.
Perhaps you should talk to Haowen about this to-morrow. On our test
machine we have cuda 10.1 and you are probably using PyTorch 1.6.0, so
you'll have to see whether there
Also you'd need to change the snowfall prepare.py code to use "fork"
instead of "spawn", and probably remove the 2 statements setting
torch's num-threads to 0, to verify that it still works the same after
those changes.
…On Tue, Nov 24, 2020 at 3:09 PM Junbo Zhang ***@***.***> wrote:
With the latest version's k2+lhotse+snowfall, under the path
snowfall/egs/librispeech/asr/simple_v1:
$ time python prepare.py
dev-clean
Extracting and storing features in parallel: 100%|_________| 2703/2703 [00:07<00:00, 364.28it/s]
test-clean
Extracting and storing features in parallel: 100%|_________| 2620/2620 [00:07<00:00, 342.19it/s]
train-clean-100
Extracting and storing features in parallel: 100%|_________| 28539/28539 [01:26<00:00, 331.35it/s]
real 3m41.975s
user 33m55.149s
sys 5m25.221s
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZFLO625JHOMXUVMTN4UGDSRNKS3ANCNFSM4TWZ42KA>
.
|
Ah, apologies. I misunderstood it. I didn't notice mthrok's comment at all 😓 and just simply tested the latest snowfall. Sorry about that ... I'll try |
I tested it. The But after I removed the |
I have been running some experiments to debug why prepare.py is so slow.
I'll post the results here in a bit, but let me just give you a preview of why I believe it's so slow.
By default, torch seems to use a lot of threads, but it does so in a very inefficient way which actually just wastes CPU.
We attempt to get around this with:
but now that we are using "spawn" as the parallelization method and the main() is guarded by:
that code is never reached.
The text was updated successfully, but these errors were encountered: