-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[ Hackathon 3rd No.2 ] add paddle.iinfo #45321
[ Hackathon 3rd No.2 ] add paddle.iinfo #45321
Conversation
remove paddle.int8 from test
你的PR提交成功,感谢你对开源项目的贡献! |
很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。 |
中文文档地址: |
收到,谢谢,我再研究一下 |
…o-and-task2-add-iinfo-version002
@cxxly PR-CI-Coverage的报错已解决,麻烦再看一下 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
python/paddle/framework/dtype.py
Outdated
dtype: str, The string name of the argument dtype. | ||
|
||
Raises: | ||
ValueError: If the input "dtype" is not an integer paddle.dtype, it will raise an ValueError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raises删掉,这部分内容不建议在文档中体现,规范参考 API 文档书写规范
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
python/paddle/framework/dtype.py
Outdated
print(iinfo_uint8.min) | ||
print(iinfo_uint8.max) | ||
print(iinfo_uint8.bits) | ||
print(iinfo_uint8.dtype) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
示例代码中,print的输出以注释的形式做展示,加在后面就好
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
python/paddle/framework/dtype.py
Outdated
|
||
paddle.iinfo is a function that returns an object that represents the numerical properties of | ||
an integer paddle.dtype | ||
(i.e. paddle.uint8, paddle.int8, paddle.int16, paddle.int32, and paddle.int64). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是不是和args中的dtype重复了?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
python/paddle/framework/dtype.py
Outdated
paddle.iinfo is a function that returns an object that represents the numerical properties of | ||
an integer paddle.dtype | ||
(i.e. paddle.uint8, paddle.int8, paddle.int16, paddle.int32, and paddle.int64). | ||
This is similar to numpy.iinfo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
给一个numpy.iinfo文档的超链接吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
收到,我尽快处理 |
@Ligoml 我已经按要求修改完了,麻烦再看一下 |
python/paddle/framework/dtype.py
Outdated
|
||
paddle.iinfo is a function that returns an object that represents the numerical properties of | ||
an integer paddle.dtype. | ||
This is similar to [numpy.iinfo](https://numpy.org/doc/stable/reference/generated/numpy.iinfo.html#numpy-iinfo). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
超链接的解析是rst的方式,建议修改一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Args: | ||
dtype(paddle.dtype): One of paddle.uint8, paddle.int8, paddle.int16, paddle.int32, and paddle.int64. | ||
|
||
Returns: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
收到,我尽快处理 |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In file explorer, search "data_type.h" and "data_type.cc". After studying all the files, you may find a way to handle with paddle.float16, paddle.bfloat16, paddle.complex128 in paddle.finfo()"C:\Users\Administrator\Desktop\contests\20220704_paddle_hackathon\Paddle\paddle\fluid\framework\data_type.h" |
PR types
New features
PR changes
APIs
Describe
add new API paddle.iinfo
docs: PaddlePaddle/docs#5235
The previous PR is closed by myself:
#44797