Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add common dtypes as paddle's dtypes #32012

Merged
merged 3 commits into from
Apr 14, 2021

Conversation

iclementine
Copy link

PR types

Function optimization

PR changes

APIs

Describe

add common dtypes as attribute of paddle. paddle.float32, paddle.float64 are now objects. They can be used as dtype argument in many functions.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Apr 1, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@willthefrog willthefrog left a comment

Choose a reason for hiding this comment

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

this approach would result in similar behavior as paddle.Tensor, i.e., print(uint8) # VarType.UINT8

@iclementine
Copy link
Author

iclementine commented Apr 2, 2021

this approach would result in similar behavior as paddle.Tensor, i.e., print(uint8) # VarType.UINT8

The repr of VarDesc.VarType has already been change by

# NOTE(zhiqiu): pybind11 will set a default __str__ method of enum class.

图片

what I meant is the type of dtype, e.g., type(uint8) or print(uint8)

Copy link
Contributor

@willthefrog willthefrog left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@jzhang533 jzhang533 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

@iclementine iclementine merged commit 95939b5 into PaddlePaddle:develop Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants