-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow bf16 computations on CPU with IPEX
Modern CPUs have native AVX512 BF16 instructions, which significantly improves matmul and conv2d operations. At this moment PyTorch has almost no native support of these optimization (even with oneDNN it does not use optimal methods), however IPEX adds everything needed. There is a known issue with IPEX: it significantly reduces performance on AMD CPUs, but such situations can be detected and mitigated, see https://documentation.sigma2.no/jobs/mkl.html After mitigation, UNET steps are 40-50% faster on both AMD and Intel CPUs. There are minor visible changes with bf16, but no avalanche effects, so this feature is enabled by default with new `--autocast=auto` option. It can be disabled with `--autocast=no` even if IPEX is installed and CPU is compatible. Signed-off-by: Sv. Lockal <[email protected]>
- Loading branch information
Showing
3 changed files
with
95 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ Pillow | |
scipy | ||
tqdm | ||
psutil | ||
py-cpuinfo | ||
|
||
#non essential dependencies: | ||
kornia>=0.7.1 | ||
|