Skip to content

Commit

Permalink
Replace paddle.fluid imports with paddle.base
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Moon <tmoon@nvidia.com>
  • Loading branch information
timmoon10 committed Jan 26, 2024
1 parent 6c1a8bb commit df088dc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion qa/L0_paddle_lint/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ then
cp $TE_PATH/qa/L0_paddle_lint/pylintrc $TE_PATH
cd $TE_PATH
echo "Checking Python files"
pylint --recursive=y transformer_engine/common transformer_engine/paddle
python -m pylint --recursive=y transformer_engine/common transformer_engine/paddle
fi
8 changes: 6 additions & 2 deletions transformer_engine/paddle/layer/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@
import numpy as np

import paddle
from paddle.fluid import core
from paddle.fluid.framework import _dygraph_tracer
try:
from paddle.base import core
from paddle.base.framework import _dygraph_tracer
except ImportError:
from paddle.fluid import core
from paddle.fluid.framework import _dygraph_tracer

from ..constants import FP8BwdTensors, dist_group_type
from ..cpp_extensions import cast_transpose, cast_transpose_bgrad, cast_to_fp8, transpose
Expand Down
5 changes: 4 additions & 1 deletion transformer_engine/paddle/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@

from contextlib import contextmanager

from paddle.fluid import core
try:
from paddle.base import core
except ImportError:
from paddle.fluid import core


@contextmanager
Expand Down

0 comments on commit df088dc

Please sign in to comment.