Skip to content

[Rocm] fix tests of inplace_abn_op & grid_sampler_op#32703

Merged
qili93 merged 2 commits intoPaddlePaddle:developfrom
Ray2020BD:rocm_fix_inplace_gridsampler
May 6, 2021
Merged

[Rocm] fix tests of inplace_abn_op & grid_sampler_op#32703
qili93 merged 2 commits intoPaddlePaddle:developfrom
Ray2020BD:rocm_fix_inplace_gridsampler

Conversation

@Ray2020BD
Copy link
Contributor

PR types

Bug fixes

PR changes

APIs

Describe

[Rocm] fix tests of inplace_abn_op & grid_sampler_op
image

@paddle-bot-old
Copy link

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

if (cudnn_version is not None
) and align_corners and mode == 'bilinear' and padding_mode == 'zeros':
if (
cudnn_version is not None
Copy link
Contributor

Choose a reason for hiding this comment

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

这个格式有点奇怪,为什么括号会单独一行?最好修正一下格式

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这是pre-commit自动修改的,原本格式不是这样的

Copy link
Contributor

Choose a reason for hiding this comment

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

可以尝试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()):

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

dtype = helper.input_dtype()

if core.is_compiled_with_rocm():
dtype = 'float32'
Copy link
Contributor

Choose a reason for hiding this comment

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

grid_sampler 的 use_cudnn 为 False,因此不使用MIOPEN,为什么这里的dtype要改成fp32?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已删除

if (cudnn_version is not None
) and align_corners and mode == 'bilinear' and padding_mode == 'zeros':
if (
cudnn_version is not None
Copy link
Contributor

Choose a reason for hiding this comment

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

可以尝试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
Copy link
Contributor

qili93 commented May 6, 2021

LGTM

@qili93 qili93 merged commit 7c27541 into PaddlePaddle:develop May 6, 2021
@Ray2020BD Ray2020BD deleted the rocm_fix_inplace_gridsampler branch May 6, 2021 09:14
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.

2 participants