Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support engine with NPU backend. #572

Merged
merged 20 commits into from
Oct 24, 2022
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Update mmengine/runner/amp.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
  • Loading branch information
wangjiangben-hw and zhouzaida authored Oct 12, 2022
commit 9787ee22aec3f102534ea170efb498973c6cfbec
2 changes: 1 addition & 1 deletion mmengine/runner/amp.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def autocast(device_type: Optional[str] = None,
if is_npu_available():
with torch.npu.amp.autocast(enabled=enabled):
yield
elif torch.cuda.is_available():
elif is_cuda_available():
with torch.cuda.amp.autocast(enabled=enabled):
yield
else:
Expand Down