Repository navigation
v0.18.2 #849
ValerianRey
announced in
Announcements
v0.18.2
#849
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
🥭 Device and autojac fixes
This patch makes
.to()move the tensors given to many aggregators, weightings and scalarizers (Constant,UPGrad,DualProj,STCH, ...), and fixesjac_to_gradwith repeated tensors andbackward/mtl_backwardwith expanded.jacor.gradfields. Thanks a lot to @SajalDevX for all these fixes!Changelog
Fixed
.to()not moving the tensors given to theConstant,STCH,PBIandCOSMOSscalarizers (weightsandreference). These tensors are now registered as non-persistent buffers, so they follow the dtype and device of the scalarizer without being added to itsstate_dict.FAMO'smin_lossesbuffer is also no longer in itsstate_dict..to()not moving the tensors given toConstant,ConstantWeighting,UPGrad,UPGradWeighting,DualProj,DualProjWeighting,AlignedMTL,AlignedMTLWeighting,ConFIG,SDMGradWeighting,CRMOGMWeightingandGradDrop(weights,pref_vector,initial_weightsandleak). These tensors are now registered as non-persistent buffers, so they follow the dtype and device of the aggregator or weighting without being added to itsstate_dict.jac_to_gradfailing with anAttributeError(or, withretain_jac=True, accumulating a wrong gradient) when a tensor is repeated intensors. Repeated tensors are now only considered once.backwardandmtl_backwardfailing with aRuntimeErrorwhen the.jacor.gradfield held an expanded tensor (e.g. when a parameter is directly summed into a loss) and was then accumulated into by another call, or when such a.gradwas modified in-place (e.g. withclip_grad_norm_). Expanded gradients are now materialized before being stored in.grad, and an expanded.jacis now only materialized when another Jacobian is accumulated into it.This discussion was created from the release v0.18.2.
All reactions