mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2026-04-27 02:03:13 +00:00
* [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
9 lines
217 B
Python
9 lines
217 B
Python
import torch
|
|
|
|
from ...registry import meta_patched_function
|
|
|
|
|
|
@meta_patched_function.register(torch.nn.functional.relu)
|
|
def torch_nn_func_relu(input, inplace=False):
|
|
return torch.empty(input.shape, device='meta')
|