11

I've recently downloaded all packages from PyPI. One interesting observation was that of the Top-15 of the biggest packages, all execept one are deep learning packages:

I looked at mxnet-cu90. It has exactly one huge file: libmxnet.so (936.7MB). What does this file contain? Is there any way to make it smaller?

I'm especially astonished that those libraries are so huge considering that one usually uses them on top of CUDA + cuDNN, which I thought would do the heavy lifting.

As a comparison, I looked at related libraries with which you can also build deep learning libraries:

  • numpy: 6MB
  • sympy: 6MB
  • pycuda: 3.6MB
  • tensorflow-cpu: 116MB (so the GPU version needs 241 MB more or around 3x the size!)
8
  • 3
    Not sure I follow the question. Why do you think that they should be smaller than they are? What do you mean by "huge"? Jan 13, 2020 at 17:15
  • 2
    They are by far the biggest ones on PyPI. mxnet-cu90 is 600 MB. Except for a pure-data package, the next biggest package is less than 350 MB (I need to check how much less). Also, numpy is ~6MB. So 1% of mxnet. sympy is 6MB as well. pycuda is 3.6MB. Jan 13, 2020 at 17:27
  • 1
    @EJoshuaS-ReinstateMonica I've added a couple of numbers for comparison. Jan 13, 2020 at 18:03
  • 1
    Yeah, those numbers do seem weirdly high now that you include those details. I'll vote to reopen. Jan 13, 2020 at 18:12
  • 2
    it is large because they packaged cudnn inside
    – snowflake
    Jan 16, 2020 at 11:59

1 Answer 1

6

Deep learning frameworks are large because they package CuDNN from NVIDIA into their wheels. This is done for the convenience of downstream users.

CuDNN are the primitives that the frameworks call to execute highly optimised neural network ops (e.g. LSTM)

The unzipped version of CuDNN for windows 10 is 435MB.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.