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

rename fluid to base (sync with PaddlePaddle/Paddle#56576) #384

Merged
merged 3 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
14 changes: 11 additions & 3 deletions tests/run_all_paddle_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ disabled_tests=(
${PADDLE_TEST_BASE}/test_ptb_lm_v2.py # There is accuracy problem of the model in SOT
${PADDLE_TEST_BASE}/test_cycle_gan.py # This test has a precision problem when it reaches the maximum cache size
${PADDLE_TEST_BASE}/test_inplace_assign.py # This test waiting for #301
# These unittests are introduced after #347, fix them later
${PADDLE_TEST_BASE}/test_backward_without_params.py
${PADDLE_TEST_BASE}/test_bert.py
${PADDLE_TEST_BASE}/test_cpu_cuda_to_tensor.py
${PADDLE_TEST_BASE}/test_jit_setitem.py
${PADDLE_TEST_BASE}/test_mnist_amp.py
${PADDLE_TEST_BASE}/test_to_tensor.py
${PADDLE_TEST_BASE}/test_yolov3.py
)

for file in ${PADDLE_TEST_BASE}/*.py; do
Expand All @@ -34,15 +42,15 @@ for file in ${PADDLE_TEST_BASE}/*.py; do
# 执行文件
# python "$file" 2>&1 >>/home/data/output.txt
python -u "$file"
if [[ -n "$GITHUB_ACTIONS" ]]; then
echo "::endgroup::"
fi
if [ $? -ne 0 ]; then
echo "run $file failed"
failed_tests+=("$file")
else
echo "run $file success"
fi
if [[ -n "$GITHUB_ACTIONS" ]]; then
echo "::endgroup::"
fi
fi
done

Expand Down
Loading