Skip to content

Commit ae62bc0

Browse files
committed
try to find out where we are
1 parent 6294622 commit ae62bc0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/rulesets/LinearAlgebra/norm.jl

+9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
),
99
T in (Float64, ComplexF64),
1010
sz in [(3,), (3, 3), (3, 2, 1)]
11+
println("starting unexported fnorm=$fnorm, T=$T, sz=$sz")
1112

1213
x = randn(T, sz)
1314
# finite differences is unstable if maxabs (minabs) values are not well
@@ -37,6 +38,7 @@
3738
@test rrule(fnorm, x)[2](Zero())[2] isa Zero
3839
end
3940
ndims(x) > 1 && @testset "non-strided" begin
41+
println("... non-strided")
4042
xp = if x isa Matrix
4143
view(x, [1,2,3], 1:3)
4244
elseif x isa Array{T,3}
@@ -51,6 +53,7 @@
5153
rrule_test(fnorm, ȳ, (xp, x̄))
5254
end
5355
T == Float64 && ndims(x) == 1 && @testset "Integer input" begin
56+
println("... integer")
5457
x = [1,2,3]
5558
int_fwd, int_back = rrule(fnorm, x)
5659
float_fwd, float_back = rrule(fnorm, float(x))
@@ -61,6 +64,7 @@
6164
@testset "norm(x::Array{$T,$(length(sz))})" for
6265
T in (Float64, ComplexF64),
6366
sz in [(0,), (3,), (3, 3), (3, 2, 1)]
67+
println("starting exported norm T=$T, sz=$sz")
6468

6569
x = randn(T, sz)
6670

@@ -84,6 +88,7 @@
8488
@test rrule(norm, x)[2](Zero())[2] isa Zero
8589
end
8690
ndims(x) > 1 && @testset "non-strided" begin
91+
println("... non-strided'")
8792
xp = if x isa Matrix
8893
view(x, [1,2,3], 1:3)
8994
elseif x isa Array{T,3}
@@ -103,6 +108,7 @@
103108
p in (1.0, 2.0, Inf, -Inf, 2.5),
104109
T in (Float64, ComplexF64),
105110
sz in (fnorm === norm ? [(0,), (3,), (3, 3), (3, 2, 1)] : [(3,), (3, 3), (3, 2, 1)])
111+
println("starting p-norm p=$p, T=$T, sz=$sz")
106112

107113
x = randn(T, sz)
108114
# finite differences is unstable if maxabs (minabs) values are not well
@@ -142,6 +148,7 @@
142148
@test unthunk(unthunk(int_back(1.0)[2])) unthunk(unthunk(float_back(1.0)[2]))
143149
end
144150
end
151+
println("starting adjoint/transpose norm T=$T")
145152
@testset "norm($fdual(::Vector{$T}), p)" for
146153
T in (Float64, ComplexF64),
147154
fdual in (adjoint, transpose)
@@ -155,13 +162,15 @@
155162
end
156163
@testset "norm(x::$T, p)" for T in (Float64, ComplexF64)
157164
@testset "p = $p" for p in (-1.0, 2.0, 2.5)
165+
println("starting the other set of p-norm tests, p=$p, T=$T, sz=$sz")
158166
test_frule(norm, randn(T), p)
159167
test_rrule(norm, randn(T), p)
160168

161169
_, back = rrule(norm, randn(T), p)
162170
@test back(Zero()) == (NO_FIELDS, Zero(), Zero())
163171
end
164172
@testset "p = 0" begin
173+
println("starting 0-norm tests, T=$T, sz=$sz")
165174
p = 0.0
166175
x = randn(T)
167176
y = norm(x, p)

0 commit comments

Comments
 (0)