Skip to content

Commit 94cdefe

Browse files
committed
test: disable dilation!=1 tests on MIOpen
1 parent 6330dcd commit 94cdefe

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

test/nn/luxlib.jl

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using LuxLib, Reactant, Enzyme, NNlib, Test
22

3+
const MightUseMIOpen = contains(lowercase(string(Reactant.devices()[1])), "rocm")
4+
35
@testset "Fused Dense" begin
46
sumabs2fuseddense(act, weight, x, bias) =
57
sum(abs2, fused_dense_bias_activation(act, weight, x, bias))
@@ -182,15 +184,23 @@ end
182184
padding in ((0, 0), (2, 2), (2, 0)),
183185
dilation in ((1, 1), (1, 2))
184186

187+
if any(!=(1), dilation) && MightUseMIOpen
188+
continue # MIOpen doesn't support dilation != 1 yet
189+
end
190+
191+
might_fail = MightUseMIOpen && any(!=(1), dilation)
192+
185193
conv_dims = DenseConvDims(x, weight; stride, padding, dilation, groups)
186194

187-
reactant_res = @jit fused_conv_bias_activation(
188-
act, weight_reactant, x_reactant, bias_reactant, conv_dims
189-
)
195+
@test begin
196+
reactant_res = @jit fused_conv_bias_activation(
197+
act, weight_reactant, x_reactant, bias_reactant, conv_dims
198+
)
190199

191-
luxlib_res = fused_conv_bias_activation(act, weight, x, bias, conv_dims)
200+
luxlib_res = fused_conv_bias_activation(act, weight, x, bias, conv_dims)
192201

193-
@test reactant_res luxlib_res atol = 1e-5 rtol = 1e-2
202+
reactant_res luxlib_res
203+
end atol = 1e-5 rtol = 1e-2 broken = might_fail
194204
end
195205

196206
# TODO: test for gradients

0 commit comments

Comments
 (0)