File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ @testset " lowprecarrays" begin
2
+ A = rand (Float32, 10 ,10 )
3
+ lpA = LowPrecArray (A)
4
+
5
+ @test lpA isa LowPrecArray
6
+ @test size (A) == size (lpA)
7
+
8
+ lpA[3 ] = 4
9
+ @test lpA[3 ] == A[3 ]
10
+
11
+ a = rand (Float32)
12
+ ab = BFloat16s. ExpandingBFloat16 (a)
13
+ b = rand (Float32)
14
+ bb = BFloat16s. ExpandingBFloat16 (b)
15
+
16
+ @test ab isa BFloat16s. ExpandingBFloat16
17
+ @test ab. a isa BFloat16
18
+ @test ab * bb isa Float32
19
+
20
+ B = LowPrecArray (rand (Float32, 10 ,10 ))
21
+ C = LowPrecArray (rand (Float32, 10 ,10 ))
22
+
23
+ lpA .= B* C
24
+
25
+ end # @testset "lowprecarrays"
Original file line number Diff line number Diff line change 243
243
244
244
include (" structure.jl" )
245
245
include (" mathfuncs.jl" )
246
+ include (" lowprecarrays.jl" )
246
247
247
248
end # @testset "BFloat16s"
You can’t perform that action at this time.
0 commit comments