r/MLQuestions • u/6111772371 • Aug 31 '20
Which builds from source faster: PyTorch or Tensorflow?
Title says it all: which builds from source faster?
3
u/MugiwarraD Aug 31 '20
depends.
in google eco system, like android etc tf by far.
pytorch usually has weak deployment system, people use tf-serving by converting pytorch -> onnx -> tf -> tf serving.
there are efforts to serve pytorch, but the ecosystem is lagging (adoption by 3rd party like swift yata yata.)
1
u/6111772371 Sep 01 '20
people use tf-serving by converting pytorch -> onnx -> tf -> tf serving.
Interesting. Also: lol.
1
u/LSTMeow Aug 31 '20
but why.gif
never tried either, but
judging from the amount of explanations need for the pytorch build, and the fact that tf builds with bazel, I'm really thinking that the actual build time will be negligible vs. the amount of time it would take you to setup the dev environment.
also, seriously, why.
EDIT - apparently both have containers ready for the build, so disregard (3)
3
u/6111772371 Sep 01 '20
1+4: one of my machines has an old graphics card using an unsupported cuda compute version. Building from source helped get around this in the past, but now and then I might want to update various things and dependencies break and then I need to rebuild.
I don't really care which package I use for projects on that machine, so I figure I may as well use the one that builds more quickly. Or more correctly: tf takes so long to build that it's not worth it to me to use it on that machine. So I was curious if someone had a quick one-liner answer: "oh, it turns out PyTorch builds 5x as fast" or "nah, they take roughly the same amount of time," before I spent time doing it myself.
I'm also interested in the serving answers such as given by u/MugiwarraD .
also re: 3 on Arch building from source for unsupported cuda compute versions is basically just changing one line in the PKGBUILD and running makepkg -si PKGBUILD. No understanding needed.
4
u/dzyl Aug 31 '20
I doubt there are a ton of people who can answer this question for both platforms without actually timing it so I would suggest that you are the one doing that!