Commit d0b7e37
Update main.py tutorial, set persistent_workers, make GPU execution much faster
Since we are setting num_workers to 1, we should either make this worker persistent or not set the num_workers. On my machine, running this script as is takes 2.21 mins, setting the workers to persistent or removing num_workers (setting to its default of 0) makes it a good deal faster at 1.44 and 1.66 mins respectively.
I would opt for adding the persistent_workers setting as it is a little faster and makes it trivial for even a beginner to speed it up further by increasing the num_workers (setting to 10 reduced my run time to 0.53 mins1 parent 4206858 commit d0b7e37
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
0 commit comments