mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-06-20 04:32:47 +00:00
[amp] Add naive amp demo (#3774)
* [mixed_precison] add naive amp demo * [mixed_precison] add naive amp demo
This commit is contained in:
parent
48bd056761
commit
2703a37ac9
@ -1,17 +1,19 @@
|
||||
from .bf16 import BF16MixedPrecision
|
||||
from .fp8 import FP8MixedPrecision
|
||||
from .fp16_apex import FP16ApexMixedPrecision
|
||||
from .fp16_naive import FP16NaiveMixedPrecision
|
||||
from .fp16_torch import FP16TorchMixedPrecision
|
||||
from .mixed_precision_base import MixedPrecision
|
||||
|
||||
__all__ = [
|
||||
'MixedPrecision', 'mixed_precision_factory', 'FP16_Apex_MixedPrecision', 'FP16_Torch_MixedPrecision',
|
||||
'FP32_MixedPrecision', 'BF16_MixedPrecision', 'FP8_MixedPrecision'
|
||||
'FP32_MixedPrecision', 'BF16_MixedPrecision', 'FP8_MixedPrecision', 'FP16NaiveMixedPrecision'
|
||||
]
|
||||
|
||||
_mixed_precision_mapping = {
|
||||
'fp16': FP16TorchMixedPrecision,
|
||||
'fp16_apex': FP16ApexMixedPrecision,
|
||||
'fp16_naive': FP16NaiveMixedPrecision,
|
||||
'bf16': BF16MixedPrecision,
|
||||
'fp8': FP8MixedPrecision
|
||||
}
|
||||
|
5
colossalai/booster/mixed_precision/fp16_naive.py
Normal file
5
colossalai/booster/mixed_precision/fp16_naive.py
Normal file
@ -0,0 +1,5 @@
|
||||
from .mixed_precision_base import MixedPrecision
|
||||
|
||||
|
||||
class FP16NaiveMixedPrecision(MixedPrecision):
|
||||
pass
|
Loading…
Reference in New Issue
Block a user