Skip to content

Commit 0564a19

Browse files
XiaobingSuperEikanWang
authored andcommitted
int8: change auto_mix_precision to AutoMixPrecision
1 parent 6ad4be0 commit 0564a19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

intel_pytorch_extension_py/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ def enable_auto_optimization(mixed_dtype = None, train = False):
8686

8787
def enable_auto_mix_precision(mixed_dtype = torch.bfloat16, train = False):
8888
running_mode = 'training' if train else 'inference'
89-
auto_mix_precision(AmpConf(mixed_dtype), running_mode).__enter__()
89+
AutoMixPrecision(AmpConf(mixed_dtype), running_mode).__enter__()
9090

9191
def get_auto_optimization():
9292
return get_auto_mix_precision
9393

9494
def get_train():
9595
return core.get_train()
9696

97-
class auto_mix_precision(_DecoratorContextManager):
97+
class AutoMixPrecision(_DecoratorContextManager):
9898
def __init__(self, conf, running_mode = 'inference'):
9999
self.pre_mixed_dtype = get_auto_mix_precision()
100100
self.pre_running_mode = get_train()

0 commit comments

Comments
 (0)