From 274c1a3b5f769c1082e3888e79590c5480cb47f5 Mon Sep 17 00:00:00 2001 From: Frank Lee Date: Thu, 21 Jul 2022 15:29:11 +0800 Subject: [PATCH] [fx] fixed apex normalization patch exception (#1352) --- colossalai/fx/tracer/meta_patch/patched_module/normalization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colossalai/fx/tracer/meta_patch/patched_module/normalization.py b/colossalai/fx/tracer/meta_patch/patched_module/normalization.py index 120874e70..e83b31b67 100644 --- a/colossalai/fx/tracer/meta_patch/patched_module/normalization.py +++ b/colossalai/fx/tracer/meta_patch/patched_module/normalization.py @@ -26,5 +26,5 @@ try: meta_patched_module.register(apex.normalization.FusedRMSNorm)(torch_nn_normalize) meta_patched_module.register(apex.normalization.MixedFusedLayerNorm)(torch_nn_normalize) meta_patched_module.register(apex.normalization.MixedFusedRMSNorm)(torch_nn_normalize) -except ImportError: +except (ImportError, AttributeError): pass