From 03ad5b4400a5869015f1205538eb9faedd67d97e Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Wed, 14 Aug 2024 14:30:58 -0400 Subject: [PATCH] Add a scalar diag test --- NDTensors/test/test_diag.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NDTensors/test/test_diag.jl b/NDTensors/test/test_diag.jl index 997ca497dd..cedf9a6b21 100644 --- a/NDTensors/test/test_diag.jl +++ b/NDTensors/test/test_diag.jl @@ -63,7 +63,7 @@ using .NDTensorsTestUtils: devices_list, is_supported_eltype @test x == dev(diagm(0 => vr)) @test x == D end - + @test sqrt(contract(D, (-1,-2), D, (-1,-2))[]) ≈ norm(D) # This if statement corresponds to the reported bug: # https://github.com/JuliaGPU/Metal.jl/issues/364 if !(dev == NDTensors.mtl && elt === ComplexF32)