Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Update amc_pruner.py #4139

Closed
wants to merge 1 commit into from
Closed

Update amc_pruner.py #4139

wants to merge 1 commit into from

Conversation

mstczuo
Copy link
Contributor

@mstczuo mstczuo commented Sep 1, 2021

fix #4117 :
move torch.backends.cudnn.deterministic = True into the internal function of AMCPruner.

move `torch.backends.cudnn.deterministic = True` into the internal function of `AMCPruner`.
@@ -207,7 +205,10 @@ def __init__(


def compress(self):
_previous_cudnn_deterministic = torch.backends.cudnn.deterministic
torch.backends.cudnn.deterministic = True
Copy link
Contributor

@zheng-ningxin zheng-ningxin Sep 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to set the deterministic here, to reproduce the number in the paper(I guess)? Can we just remove the deterministic?

@chicm-ms

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I check with @chicm-ms , and this line can be removed.

@mstczuo thanks for your finding, could you please remove this line directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. new PR here: #4161

@mstczuo mstczuo closed this Sep 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cudnn.deterministic been set while import, suggestion to avoid this kind of behavior
3 participants