Skip to content

Commit b4f746f

Browse files
Print more type info in JET tests
1 parent 1a811cf commit b4f746f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

test/MatrixFields/matrix_field_test_utils.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ macro test_all(expression)
2828
local test_func() = $(esc(expression))
2929
@test test_func() # correctness
3030
@test (@allocated test_func()) == 0 # allocations
31-
@test_opt test_func() # type instabilities
31+
@test_opt stacktrace_types_limit=4 test_func() # type instabilities
3232
end
3333
end
3434

@@ -117,14 +117,14 @@ function test_field_broadcast(;
117117
# Test get_result and set_result! for type instabilities, and test
118118
# set_result! for allocations. Ignore the type instabilities in CUDA and
119119
# the allocations they incur.
120-
@test_opt ignored_modules = cuda_frames materialize(get_result)
121-
@test_opt ignored_modules = cuda_frames materialize!(result, set_result)
120+
@test_opt stacktrace_types_limit=4 ignored_modules = cuda_frames materialize(get_result)
121+
@test_opt stacktrace_types_limit=4 ignored_modules = cuda_frames materialize!(result, set_result)
122122
using_cuda || @test (@allocated materialize!(result, set_result)) == 0
123123

124124
if !isnothing(ref_set_result)
125125
# Test ref_set_result! for type instabilities and allocations to
126126
# ensure that the performance comparison is fair.
127-
@test_opt ignored_modules = cuda_frames materialize!(
127+
@test_opt stacktrace_types_limit=4 ignored_modules = cuda_frames materialize!(
128128
ref_result,
129129
ref_set_result,
130130
)

test/Operators/integrals.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function test_column_integral_definite!(center_space)
4848
@test max_relative_error <= 0.006 # Less than 0.6% error.
4949

5050
cuda = (AnyFrameModule(CUDA),)
51-
@test_opt ignored_modules = cuda column_integral_definite!(∫u_test, ᶜu)
51+
@test_opt stacktrace_types_limit=4 ignored_modules = cuda column_integral_definite!(∫u_test, ᶜu)
5252

5353
test_allocs(@allocated column_integral_definite!(∫u_test, ᶜu))
5454
end
@@ -70,7 +70,7 @@ function test_column_integral_indefinite!(center_space)
7070
@test max_relative_error <= 0.006 # Less than 0.6% error at the top level.
7171

7272
cuda = (AnyFrameModule(CUDA),)
73-
@test_opt ignored_modules = cuda column_integral_indefinite!(ᶠ∫u_test, ᶜu)
73+
@test_opt stacktrace_types_limit=4 ignored_modules = cuda column_integral_indefinite!(ᶠ∫u_test, ᶜu)
7474

7575
test_allocs(@allocated column_integral_indefinite!(ᶠ∫u_test, ᶜu))
7676
end
@@ -93,7 +93,7 @@ function test_column_integral_indefinite_fn!(center_space)
9393
@test max_relative_error <= 0.006 # Less than 0.6% error at the top level.
9494

9595
cuda = (AnyFrameModule(CUDA),)
96-
@test_opt ignored_modules = cuda column_integral_indefinite!(
96+
@test_opt stacktrace_types_limit=4 ignored_modules = cuda column_integral_indefinite!(
9797
fn,
9898
ᶠ∫u_test,
9999
)
@@ -132,7 +132,7 @@ function test_column_reduce_and_accumulate!(center_space)
132132
set_output! = () -> column_reduce!(f, output, input; init, transform)
133133
set_output!()
134134
@test output == reference_output
135-
@test_opt ignored_modules = (AnyFrameModule(CUDA),) set_output!()
135+
@test_opt stacktrace_types_limit=4 ignored_modules = (AnyFrameModule(CUDA),) set_output!()
136136
test_allocs(@allocated set_output!())
137137
end
138138

@@ -148,7 +148,7 @@ function test_column_reduce_and_accumulate!(center_space)
148148
() -> column_accumulate!(f, output, input; init, transform)
149149
set_output!()
150150
@test output == reference_output
151-
@test_opt ignored_modules = (AnyFrameModule(CUDA),) set_output!()
151+
@test_opt stacktrace_types_limit=4 ignored_modules = (AnyFrameModule(CUDA),) set_output!()
152152
test_allocs(@allocated set_output!())
153153
end
154154
end

0 commit comments

Comments
 (0)