Skip to content

Commit 94ee822

Browse files
committed
[Rocm] fix tests of inplace_abn_op & grid_sampler_op
1 parent 5707baa commit 94ee822

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

python/paddle/fluid/layers/nn.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3000,8 +3000,6 @@ def inplace_abn(input,
30003000
'inplace_abn')
30013001
dtype = helper.input_dtype()
30023002

3003-
if core.is_compiled_with_rocm():
3004-
dtype = 'float32'
30053003
input_shape = input.shape
30063004
if data_layout == 'NCHW':
30073005
channel_num = input_shape[1]

python/paddle/nn/functional/vision.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,9 @@ def grid_sample(x,
265265

266266
cudnn_version = get_cudnn_version()
267267
use_cudnn = False
268-
if (
268+
if not core.is_compiled_with_rocm() and (
269269
cudnn_version is not None
270-
) and align_corners and mode == 'bilinear' and padding_mode == 'zeros' and not core.is_compiled_with_rocm(
271-
):
270+
) and align_corners and mode == 'bilinear' and padding_mode == 'zeros':
272271
use_cudnn = True
273272
# CUDNN always computes gradients for all inputs
274273
x.stop_gradient = False

0 commit comments

Comments
 (0)