|
73 | 73 |
|
74 | 74 | include("abi.jl") |
75 | 75 | include("typetree.jl") |
| 76 | +include("activity.jl") |
76 | 77 | include("passes.jl") |
77 | 78 | include("optimize.jl") |
78 | 79 | include("make_zero.jl") |
@@ -101,46 +102,7 @@ function vrec(start, x) |
101 | 102 | end |
102 | 103 | end |
103 | 104 |
|
104 | | -struct Ints{A, B} |
105 | | - v::B |
106 | | - q::Int |
107 | | -end |
108 | | - |
109 | | -mutable struct MInts{A, B} |
110 | | - v::B |
111 | | - q::Int |
112 | | -end |
113 | | - |
114 | 105 | @testset "Internal tests" begin |
115 | | - @static if VERSION < v"1.11-" |
116 | | - else |
117 | | - @assert Enzyme.Compiler.active_reg(Memory{Float64}, Base.get_world_counter()) == Enzyme.Compiler.DupState |
118 | | - end |
119 | | - @assert Enzyme.Compiler.active_reg(Type{Array}, Base.get_world_counter()) == Enzyme.Compiler.AnyState |
120 | | - @assert Enzyme.Compiler.active_reg(Ints{<:Any, Integer}, Base.get_world_counter()) == Enzyme.Compiler.AnyState |
121 | | - @assert Enzyme.Compiler.active_reg(Ints{<:Any, Float64}, Base.get_world_counter()) == Enzyme.Compiler.DupState |
122 | | - @assert Enzyme.Compiler.active_reg(Ints{Integer, <:Any}, Base.get_world_counter()) == Enzyme.Compiler.DupState |
123 | | - @assert Enzyme.Compiler.active_reg(Ints{Integer, <:Integer}, Base.get_world_counter()) == Enzyme.Compiler.AnyState |
124 | | - @assert Enzyme.Compiler.active_reg(Ints{Integer, <:AbstractFloat}, Base.get_world_counter()) == Enzyme.Compiler.DupState |
125 | | - @assert Enzyme.Compiler.active_reg(Ints{Integer, Float64}, Base.get_world_counter()) == Enzyme.Compiler.ActiveState |
126 | | - @assert Enzyme.Compiler.active_reg(MInts{Integer, Float64}, Base.get_world_counter()) == Enzyme.Compiler.DupState |
127 | | - |
128 | | - @assert Enzyme.Compiler.active_reg(Tuple{Float32,Float32,Int}, Base.get_world_counter()) == Enzyme.Compiler.ActiveState |
129 | | - @assert Enzyme.Compiler.active_reg(Tuple{NamedTuple{(), Tuple{}}, NamedTuple{(), Tuple{}}}, Base.get_world_counter()) == Enzyme.Compiler.AnyState |
130 | | - @assert Enzyme.Compiler.active_reg(Base.RefValue{Float32}, Base.get_world_counter()) == Enzyme.Compiler.DupState |
131 | | - @assert Enzyme.Compiler.active_reg(Ptr, Base.get_world_counter(), Base.get_world_counter()) == Enzyme.Compiler.DupState |
132 | | - @assert Enzyme.Compiler.active_reg(Base.RefValue{Float32}, Base.get_world_counter()) == Enzyme.Compiler.DupState |
133 | | - @assert Enzyme.Compiler.active_reg(Colon, Base.get_world_counter()) == Enzyme.Compiler.AnyState |
134 | | - @assert Enzyme.Compiler.active_reg(Symbol, Base.get_world_counter()) == Enzyme.Compiler.AnyState |
135 | | - @assert Enzyme.Compiler.active_reg(String, Base.get_world_counter()) == Enzyme.Compiler.AnyState |
136 | | - @assert Enzyme.Compiler.active_reg(Tuple{Any,Int64}, Base.get_world_counter()) == Enzyme.Compiler.DupState |
137 | | - @assert Enzyme.Compiler.active_reg(Tuple{S,Int64} where S, Base.get_world_counter()) == Enzyme.Compiler.DupState |
138 | | - @assert Enzyme.Compiler.active_reg(Union{Float64,Nothing}, Base.get_world_counter()) == Enzyme.Compiler.DupState |
139 | | - @assert Enzyme.Compiler.active_reg(Union{Float64,Nothing}, Base.get_world_counter(), #=justActive=#Val(false), #=unionSret=#Val(true)) == Enzyme.Compiler.ActiveState |
140 | | - @test Enzyme.Compiler.active_reg(Tuple, Base.get_world_counter()) == Enzyme.Compiler.DupState |
141 | | - @test Enzyme.Compiler.active_reg(Tuple, Base.get_world_counter(), #=justactive=#Val(false), #=unionsret=#Val(false), #=abstractismixed=#Val(true)) == Enzyme.Compiler.MixedState |
142 | | - @test Enzyme.Compiler.active_reg(Tuple{A,A} where A, Base.get_world_counter(), #=justactive=#Val(false), #=unionsret=#Val(false), #=abstractismixed=#Val(true)) == Enzyme.Compiler.MixedState |
143 | | - |
144 | 106 | # issue #1935 |
145 | 107 | struct Incomplete |
146 | 108 | x::Float64 |
|
0 commit comments