Skip to content

[BUG] Does deepspeed work with torch amp autocast? #5573

@liqiangniu

Description

@liqiangniu

During training, fp16 is set to true.
But for some submodules, i want to using fp32.
with torch.cuda.amp.autocast(enabled=False):
x = self.model(x.float())

An error occur, show half vs float type not matching

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtraining

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions