mmengine icon indicating copy to clipboard operation
mmengine copied to clipboard

Several Improvements for the latest PyTorch Framework

Open MGAMZ opened this issue 1 year ago • 2 comments
trafficstars

Motivation

Fix torch Future Warning: FutureWarning: torch.cuda.amp.GradScaler(args...) is deprecated. Please use torch.amp.GradScaler('cuda', args...) instead.

Modification

Deprecate torch.cuda.amp and transfer to torch.amp, and partial it with device='cuda'. The modification will not introduce any influence on the following codes in this file

MGAMZ avatar Jul 21 '24 09:07 MGAMZ

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 21 '24 09:07 CLAassistant

Motivation

When using torch.compile, the 'disable' key compile could override the compile. When disable is set to True, there should be no prompt like 'The model has been compiled'.

Modification

Add a simple check when compile is a dict, and check if there exists a key 'disable'.

MGAMZ avatar Jul 26 '24 02:07 MGAMZ

The pull request contains bad implementations, I will refine to a better version soon.

MGAMZ avatar Jan 06 '25 02:01 MGAMZ