Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
rename fluid to base (sync with PaddlePaddle/Paddle#56576)
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo committed Sep 7, 2023
1 parent 32f8634 commit 3b97989
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions sot/infer_meta.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import paddle
from paddle.amp.auto_cast import amp_state
from paddle.fluid.unique_name import UniqueNameGenerator
from paddle.fluid.unique_name import guard as UniqueNameGuard
from paddle.base.unique_name import UniqueNameGenerator
from paddle.base.unique_name import guard as UniqueNameGuard
from paddle.static import Program
from paddle.utils import flatten, is_sequence

Expand Down Expand Up @@ -107,7 +107,7 @@ def get_variable(self, meta):
return self.var_cache[var_feature_name]

def infer_meta(self, func, *args, **kwargs):
with paddle.fluid.framework._dygraph_guard(None), UniqueNameGuard(
with paddle.base.framework._dygraph_guard(None), UniqueNameGuard(
self.var_name_generator
):
args, kwargs = convert_meta_to_variable(
Expand Down
2 changes: 1 addition & 1 deletion sot/opcode_translator/executor/variables/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ def main_info(self) -> dict[str, Any]:

@VariableFactory.register_from_value()
def from_value(value: Any, graph: FunctionGraph, tracker: Tracker):
if isinstance(value, paddle.fluid.dygraph.tracer.Tracer):
if isinstance(value, paddle.base.dygraph.tracer.Tracer):
return DygraphTracerVariable(value, graph, tracker)
return None

Expand Down
2 changes: 1 addition & 1 deletion sot/symbolic/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def replace_symbol(
def _append_opstack_between(start, end, stack):
# NOTE(xiongkun): we don't sync for speed. careful!!
# [start, end)
from paddle.fluid import core
from paddle.framework import core

op_maker = core.op_proto_and_checker_maker
callstack_attr_name = op_maker.kOpCreationCallstackAttrName()
Expand Down
2 changes: 1 addition & 1 deletion sot/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class GraphLogger:
graph_num: int
op_num: int
graphs: list[Program]
ops: list[paddle.fluid.framework.Operator]
ops: list[paddle.base.framework.Operator]

def __init__(self):
self.clear()
Expand Down

0 comments on commit 3b97989

Please sign in to comment.