Performance of Pytorch vs pure Torch #12400
adrianomartinelli
started this conversation in
General
Replies: 2 comments 1 reply
-
Can you also share the terminal calls for each run? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I tried running your benchmark script and noticed that the experiments run only for a few seconds per iteration (<5 seconds). IMO, this might not be an ideal case to compare scripts where the difference will come out to be (0.5-1 sec) but the % might look huge. To make it comparable I used 100 layers in your large model and found out that the average time per iteration in both cases was similar (~23.5 sec) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I very much like the lightning library and recently started to experiment with it. However, I observed that the lightning training takes significantly longer than pure torch (I also saw that you just opened an issue (#12398 @carmocca) related to performance yourself). I performed a little benchmark and wondered if these results are expected and if performance differences are less on gpu.
Benchmark
I tested two model sizes (small model with a few thousand parameters and a large one with millions) and compared the duration of training the models for 10 or 250 epochs on a large data set (1e6 observations) and a small data set (1e3 observations) with a batch size of 256. I tried to disable all lightning functionalities that may slowdown training that I am aware of (like checkpoints or progress bars). The machine was only used for the benchmark (see
machine_info.txt
for details).Observations:
Thanks!
Adriano
Supporting Material
benchmark.txt: output of running
benchmark.py.txt
machine_info.txt: information about the machine used to run the benchmark
Beta Was this translation helpful? Give feedback.
All reactions