[Rocm] fix tests of inplace_abn_op & grid_sampler_op#32703
Merged
qili93 merged 2 commits intoPaddlePaddle:developfrom May 6, 2021
Merged
[Rocm] fix tests of inplace_abn_op & grid_sampler_op#32703qili93 merged 2 commits intoPaddlePaddle:developfrom
qili93 merged 2 commits intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
qili93
requested changes
Apr 30, 2021
| if (cudnn_version is not None | ||
| ) and align_corners and mode == 'bilinear' and padding_mode == 'zeros': | ||
| if ( | ||
| cudnn_version is not None |
Contributor
There was a problem hiding this comment.
这个格式有点奇怪,为什么括号会单独一行?最好修正一下格式
Contributor
Author
There was a problem hiding this comment.
这是pre-commit自动修改的,原本格式不是这样的
Contributor
There was a problem hiding this comment.
可以尝试pre-commit uninstall之后再提交,或者手动断行,类似这个样子
while not (os.path.exists(DATA_OUT_PATH) and
os.path.getsize(DATA_OUT_PATH) == BIN_FULLSIZE and BIN_TARGETHASH
== hashlib.md5(open(DATA_OUT_PATH, 'rb').read()).hexdigest()):
qili93
requested changes
May 6, 2021
python/paddle/fluid/layers/nn.py
Outdated
| dtype = helper.input_dtype() | ||
|
|
||
| if core.is_compiled_with_rocm(): | ||
| dtype = 'float32' |
Contributor
There was a problem hiding this comment.
grid_sampler 的 use_cudnn 为 False,因此不使用MIOPEN,为什么这里的dtype要改成fp32?
| if (cudnn_version is not None | ||
| ) and align_corners and mode == 'bilinear' and padding_mode == 'zeros': | ||
| if ( | ||
| cudnn_version is not None |
Contributor
There was a problem hiding this comment.
可以尝试pre-commit uninstall之后再提交,或者手动断行,类似这个样子
while not (os.path.exists(DATA_OUT_PATH) and
os.path.getsize(DATA_OUT_PATH) == BIN_FULLSIZE and BIN_TARGETHASH
== hashlib.md5(open(DATA_OUT_PATH, 'rb').read()).hexdigest()):
Contributor
|
LGTM |
qili93
approved these changes
May 6, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR types
Bug fixes
PR changes
APIs
Describe
[Rocm] fix tests of inplace_abn_op & grid_sampler_op
