mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-24 19:17:30 +00:00
[fx/meta/rpc] move _meta_registration.py to fx folder / register fx functions with compatibility checks / remove color debug (#1710)
* [fx] move meta registration * [fx] fix tests. * [fx] fix test. * [fx] fix. * [meta] refactor meta registration.py. * [fx] add compatibility descriptions. * [fx] polish import. * [fx] add a decorator. * [fx] fix tests. * [fx] remove print. * [fx] edit raise error. * [fx] edit raise error. * [fx] add type hint. * [fx] fix import in experimental. * [rpc] remove color debug. * [meta] fix naming.
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
from ... import META_COMPATIBILITY
|
||||
if META_COMPATIBILITY:
|
||||
from .._compatibility import is_compatible_with_meta
|
||||
|
||||
if is_compatible_with_meta():
|
||||
from .memory import calculate_fwd_in, calculate_fwd_out, calculate_fwd_tmp
|
||||
from .opcount import flop_mapping
|
||||
from .tensor import MetaTensor
|
||||
from .profiler import profile_function, profile_method, profile_module
|
||||
from .memory import calculate_fwd_in, calculate_fwd_tmp, calculate_fwd_out
|
||||
from .tensor import MetaTensor
|
||||
else:
|
||||
from .experimental import meta_profiler_function, meta_profiler_module, profile_function, profile_method, profile_module, calculate_fwd_in, calculate_fwd_tmp, calculate_fwd_out
|
||||
|
||||
from .dataflow import GraphInfo
|
||||
from .memory import parameter_size, activation_size, is_inplace
|
||||
from .memory import activation_size, is_inplace, parameter_size
|
||||
|
Reference in New Issue
Block a user