@@ -32,14 +32,7 @@ arrayts = (Array, JLArray)
3232 @test blockstoredlength (a) == 2
3333 @test storedlength (a) == 2 * 4 + 3 * 3
3434
35- # TODO : Broken on GPU.
36- if arrayt ≠ Array
37- a = dev (BlockSparseArray {elt} (undef, [2 , 3 ], [3 , 4 ]))
38- @test_broken a[Block (1 , 2 )] .= 2
39- end
40-
41- # TODO : Broken on GPU.
42- a = BlockSparseArray {elt} (undef, [2 , 3 ], [3 , 4 ])
35+ a = dev (BlockSparseArray {elt} (undef, [2 , 3 ], [3 , 4 ]))
4336 a[Block (1 , 2 )] .= 2
4437 @test eltype (a) == elt
4538 @test all (== (2 ), a[Block (1 , 2 )])
@@ -49,14 +42,7 @@ arrayts = (Array, JLArray)
4942 @test blockstoredlength (a) == 1
5043 @test storedlength (a) == 2 * 4
5144
52- # TODO : Broken on GPU.
53- if arrayt ≠ Array
54- a = dev (BlockSparseArray {elt} (undef, [2 , 3 ], [3 , 4 ]))
55- @test_broken a[Block (1 , 2 )] .= 0
56- end
57-
58- # TODO : Broken on GPU.
59- a = BlockSparseArray {elt} (undef, [2 , 3 ], [3 , 4 ])
45+ a = dev (BlockSparseArray {elt} (undef, [2 , 3 ], [3 , 4 ]))
6046 a[Block (1 , 2 )] .= 0
6147 @test eltype (a) == elt
6248 @test iszero (a[Block (1 , 1 )])
@@ -87,12 +73,12 @@ arrayts = (Array, JLArray)
8773 # Regression test for 0-dimensional in-place broadcasting.
8874 rng = StableRNG (123 )
8975 a = dev (BlockSparseArray {elt} (undef))
90- a[] = randn (rng, elt)
76+ @allowscalar a[] = randn (rng, elt)
9177 b = dev (BlockSparseArray {elt} (undef))
92- b[] = randn (rng, elt)
78+ @allowscalar b[] = randn (rng, elt)
9379 c = similar (a)
9480 c .= 2 .* a .+ 3 .* b
95- @test c[] == 2 * a[] + 3 * b[]
81+ @allowscalar @ test c[] == 2 * a[] + 3 * b[]
9682
9783 a = dev (BlockSparseArray {elt} (undef, ([2 , 3 ], [3 , 4 ])))
9884 @views for b in [Block (1 , 2 ), Block (2 , 1 )]
0 commit comments