aojunzz / NM-sparsity

212 stars 29 forks source link

SparseConv for the first conv? #9

Closed CYang0515 closed 2 years ago

CYang0515 commented 2 years ago

The SparseConv splits weight into group. However, for the fisrt conv in resnet, the filter dims are 3 7 7 that is not evenly divided by 4, so the group will cross filter. Is this practical?

aojunzz commented 2 years ago

Yes, if you want to deploy the sparse model on Nvidia ampere GPUs, the first layer of resnet50 should be kept dense, you can refer to the nvidia.asp setting, asp kept the first layer dense. for 2:4 sparsity, the sparse or dense first layer have little influence on accuracy.