Our specific goal would be to prune pytorch’s distributed whl to get it < 2GB.
Here is what that looks like:
# get
wget https://download.pytorch.org/whl/cu110/torch-1.7.0%2Bcu110-cp37-cp37m-linux_x86_64.whl
unzip https://download.pytorch.org/whl/cu110/torch-1.7.0%2Bcu110-cp37-cp37m-linux_x86_64.whl

# see info
du -h torch/lib/libtorch_cuda.so
2.1G torch/lib/libtorch_cuda.so

file torch/lib/libtorch_cuda.so
torch/lib/libtorch_cuda.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=e88b68dc083cd4dc547483c896d95ef6bedd64fc, with debug_info, not stripped

# see info after stripping
strip torch/lib/libtorch_cuda.so
file torch/lib/libtorch_cuda.so
torch/lib/libtorch_cuda.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=e88b68dc083cd4dc547483c896d95ef6bedd64fc, stripped

du -h torch/lib/libtorch_cuda.so
2.0G torch/lib/libtorch_cuda.so

# try prune
nvprune torch/lib/libtorch_cuda.so -arch sm_35 -o shrink_me.so
nvprune fatal : Input file 'torch/lib/libtorch_cuda.so' not relocatable