@@ -441,38 +441,37 @@ for V in spacelist
441441 @test tp ≈ tp * tp
442442 end
443443 end
444- @timedtestset " Multiplication and inverse: test via CPU" begin
445- W1 = V1 ⊗ V2 ⊗ V3
446- W2 = V4 ⊗ V5
447- for T in (Float32, Float64, ComplexF32, ComplexF64)
448- t1 = CUDA. rand (T, W1, W1)
449- t2 = CUDA. rand (T, W2, W2)
450- t = CUDA. rand (T, W1, W2)
451- ht1 = TensorKit. to_cpu (t1)
452- ht2 = TensorKit. to_cpu (t2)
453- ht = TensorKit. to_cpu (t)
454- @test TensorKit. to_cpu (t1 * t) ≈ ht1 * ht
455- @test TensorKit. to_cpu (t1' * t) ≈ ht1' * ht
456- @test TensorKit. to_cpu (t2 * t' ) ≈ ht2 * ht'
457- @test TensorKit. to_cpu (t2' * t' ) ≈ ht2' * ht'
444+ @timedtestset " Multiplication and inverse: test via CPU" begin
445+ W1 = V1 ⊗ V2 ⊗ V3
446+ W2 = V4 ⊗ V5
447+ for T in (Float32, Float64, ComplexF32, ComplexF64)
448+ t1 = CUDA. rand (T, W1, W1)
449+ t2 = CUDA. rand (T, W2, W2)
450+ t = CUDA. rand (T, W1, W2)
451+ ht1 = TensorKit. to_cpu (t1)
452+ ht2 = TensorKit. to_cpu (t2)
453+ ht = TensorKit. to_cpu (t)
454+ @test TensorKit. to_cpu (t1 * t) ≈ ht1 * ht
455+ @test TensorKit. to_cpu (t1' * t) ≈ ht1' * ht
456+ @test TensorKit. to_cpu (t2 * t' ) ≈ ht2 * ht'
457+ @test TensorKit. to_cpu (t2' * t' ) ≈ ht2' * ht'
458458
459- @test TensorKit. to_cpu (inv (t1)) ≈ inv (ht1)
460- @test TensorKit. to_cpu (pinv (t)) ≈ pinv (ht)
459+ @test TensorKit. to_cpu (inv (t1)) ≈ inv (ht1)
460+ @test TensorKit. to_cpu (pinv (t)) ≈ pinv (ht)
461461
462- if T == Float32 || T == ComplexF32
463- continue
464- end
462+ if T == Float32 || T == ComplexF32
463+ continue
464+ end
465465
466- @test TensorKit. to_cpu (t1 \ t) ≈ ht1 \ ht
467- @test TensorKit. to_cpu (t1' \ t) ≈ ht1' \ ht
468- @test TensorKit. to_cpu (t2 \ t' ) ≈ ht2 \ ht'
469- @test TensorKit. to_cpu (t2' \ t' ) ≈ ht2' \ ht'
466+ @test TensorKit. to_cpu (t1 \ t) ≈ ht1 \ ht
467+ @test TensorKit. to_cpu (t1' \ t) ≈ ht1' \ ht
468+ @test TensorKit. to_cpu (t2 \ t' ) ≈ ht2 \ ht'
469+ @test TensorKit. to_cpu (t2' \ t' ) ≈ ht2' \ ht'
470470
471- @test TensorKit. to_cpu (t2 / t) ≈ ht2 / ht
472- @test TensorKit. to_cpu (t2' / t) ≈ ht2' / ht
473- @test TensorKit. to_cpu (t1 / t' ) ≈ ht1 / ht'
474- @test TensorKit. to_cpu (t1' / t' ) ≈ ht1' / ht'
475- end
471+ @test TensorKit. to_cpu (t2 / t) ≈ ht2 / ht
472+ @test TensorKit. to_cpu (t2' / t) ≈ ht2' / ht
473+ @test TensorKit. to_cpu (t1 / t' ) ≈ ht1 / ht'
474+ @test TensorKit. to_cpu (t1' / t' ) ≈ ht1' / ht'
476475 end
477476 end
478477 if BraidingStyle (I) isa Bosonic && hasfusiontensor (I)
0 commit comments