2022-10-18 02:44:23 +00:00
|
|
|
from .._compatibility import is_compatible_with_meta
|
|
|
|
|
|
|
|
if is_compatible_with_meta():
|
2022-09-07 03:21:04 +00:00
|
|
|
from .opcount import flop_mapping
|
2022-09-14 01:36:43 +00:00
|
|
|
from .profiler import profile_function, profile_method, profile_module
|
2022-10-26 06:24:41 +00:00
|
|
|
from .shard_utils import (
|
|
|
|
calculate_bwd_time,
|
|
|
|
calculate_fwd_in,
|
|
|
|
calculate_fwd_out,
|
|
|
|
calculate_fwd_time,
|
|
|
|
calculate_fwd_tmp,
|
|
|
|
)
|
2022-10-18 02:44:23 +00:00
|
|
|
from .tensor import MetaTensor
|
2022-09-07 03:21:04 +00:00
|
|
|
else:
|
2023-09-19 06:20:26 +00:00
|
|
|
from .experimental import (
|
|
|
|
meta_profiler_function,
|
|
|
|
meta_profiler_module,
|
|
|
|
profile_function,
|
|
|
|
profile_method,
|
|
|
|
profile_module,
|
|
|
|
calculate_fwd_in,
|
|
|
|
calculate_fwd_tmp,
|
|
|
|
calculate_fwd_out,
|
|
|
|
)
|
2022-09-07 03:21:04 +00:00
|
|
|
|
2022-09-14 01:36:43 +00:00
|
|
|
from .dataflow import GraphInfo
|
2022-10-26 06:24:41 +00:00
|
|
|
from .memory_utils import activation_size, is_inplace, parameter_size
|