VainF / Torch-Pruning

[CVPR 2023] DepGraph: Towards Any Structural Pruning
https://arxiv.org/abs/2301.12900
MIT License
2.66k stars 329 forks source link

PyTorch version #301

Closed janthmueller closed 10 months ago

janthmueller commented 10 months ago

I noticed in your recommendations that you suggest using PyTorch version 1.12.1 and above. I started off with your fantastic package on PyTorch 1.8.0 but eventually shifted to 1.13.1. I employed a MagnitudePruner with MagnitudeImportance for iterative pruning. However, I observed differences in actual pruning outcomes (measured by MACs and params) between these PyTorch versions. Is this recommendation based on specific package development or certain features? I took precautions like setting seeds and enforcing deterministic algorithms to rule out non-determinism as a cause, but the issue persisted. Any insights into why this discrepancy might occur?

VainF commented 10 months ago

Hi @janthmueller, thanks for reaching out. Network tracing can be easier with newer PyTorch but this will not affect the pruning behaviour. Will check it soon.

janthmueller commented 10 months ago

I've identified the issue—I overlooked implementing additional integrity tests for my GPU models. Inconsistencies arose in a custom layer using different CUDA versions. Given that it's unrelated to your repository, I'll be closing this issue.