[fx] added apex normalization to patched modules (#1300)

* [fx] added apex normalization to patched modules

* remove unused imports
This commit is contained in:
Frank Lee
2022-07-14 14:24:13 +08:00
committed by GitHub
parent 4165eabb1e
commit 4f4d8c3656
3 changed files with 11 additions and 20 deletions

View File

@@ -2,15 +2,6 @@ import pytest
import transformers
import torch
from hf_utils import split_model_and_compare_output
from colossalai.fx.tracer.meta_patch import meta_patched_module
try:
import apex
@meta_patched_module.register(apex.normalization.FusedRMSNorm)
def apex_fused_layernorm(self, input):
return torch.empty(input.shape, device='meta')
except ImportError:
pass
BATCH_SIZE = 1
SEQ_LENGHT = 16