mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-11 22:10:37 +00:00
[fx] added apex normalization to patched modules (#1300)
* [fx] added apex normalization to patched modules * remove unused imports
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user