Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions deepspeed/runtime/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,9 @@ def _supported_optims(self):

# Validate configuration based on command line arguments
def _do_sanity_check(self):
if self.fp16_enabled() and not get_accelerator().is_fp16_supported():
raise ValueError("Type fp16 is not supported.")

expected_optim_types = self._supported_optims()
expected_optim_types += [type(None), Callable]
assert isinstance(self.client_optimizer, tuple(expected_optim_types)), \
Expand Down