Files
ColossalAI/colossalai/fx/tracer/meta_patch/patched_function/activation_function.py
Frank Lee 7531c6271f [fx] refactored the file structure of patched function and module (#1238)
* [fx] refactored the file structure of patched function and module

* polish code
2022-07-12 15:01:58 +08:00

7 lines
214 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')