Skip to content

Commit

Permalink
import paddle.fluid.core_avx.VarDesc.VarType as paddle.dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
chenfeiyu committed Apr 8, 2021
1 parent cff61af commit 603b95e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
14 changes: 13 additions & 1 deletion python/paddle/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,19 @@
monkey_patch_variable()
monkey_patch_math_varbase()
import paddle.framework
from paddle.framework.dtype import *
from .framework.dtype import dtype as dtype
from paddle.framework.dtype import uint8
from paddle.framework.dtype import int8
from paddle.framework.dtype import int16
from paddle.framework.dtype import int32
from paddle.framework.dtype import int64
from paddle.framework.dtype import float16
from paddle.framework.dtype import float32
from paddle.framework.dtype import float64
from paddle.framework.dtype import bfloat16
from paddle.framework.dtype import bool
from paddle.framework.dtype import complex64
from paddle.framework.dtype import complex128
from .framework import VarBase as Tensor
import paddle.compat
import paddle.distributed
Expand Down
6 changes: 5 additions & 1 deletion python/paddle/framework/dtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
# limitations under the License.

__all__ = [
"uint8", "int8", "int16", "int32", "int64", "bfloat16", "float16",
"dtype", "uint8", "int8", "int16", "int32", "int64", "bfloat16", "float16",
"float32", "float64", "complex64", "complex128", "bool"
]

from ..fluid.core import VarDesc

dtype = VarDesc.VarType
dtype.__qualname__ = "dtype"
dtype.__module__ = "paddle"

uint8 = VarDesc.VarType.UINT8
int8 = VarDesc.VarType.INT8
int16 = VarDesc.VarType.INT16
Expand Down

1 comment on commit 603b95e

@paddle-bot-old
Copy link

@paddle-bot-old paddle-bot-old bot commented on 603b95e Apr 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵️ CI failures summary

🔍PR: #32012 Commit ID: 603b95e contains failed CI.

Please sign in to comment.