mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-23 10:30:03 +00:00
[fx] support module with bias addition (#1780)
* [autoparallel] refactor tracer to fix bias addition issue * [fx] support module with bias addition * create bias_addition_module * refactor file structure * polish code * fix unit test
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import torch
|
||||
from ..registry import meta_patched_module
|
||||
|
||||
from ...registry import meta_patched_module
|
||||
|
||||
|
||||
@meta_patched_module.register(torch.nn.Embedding)
|
||||
def torch_nn_embedding(self, input):
|
||||
result_shape = input.shape + (self.embedding_dim,)
|
||||
return torch.empty(result_shape, device='meta')
|
||||
return torch.empty(result_shape, device='meta')
|
||||
|
Reference in New Issue
Block a user