Skip to content

Commit 944dca8

Browse files
committed
refactor: use TracedTypes
1 parent eb3d1db commit 944dca8

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/utils.jl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ function make_mlir_fn(f, args, kwargs, name="main", concretein=true; toscalar=fa
4949

5050
linear_args = TracedTypes[]
5151
for (k, v) in seen_args
52-
if !(v isa TracedRArray) && !(v isa TracedRNumber)
53-
continue
54-
end
52+
v isa TracedTypes || continue
5553
push!(linear_args, v)
5654
end
5755

@@ -133,10 +131,7 @@ function make_mlir_fn(f, args, kwargs, name="main", concretein=true; toscalar=fa
133131
linear_results = TracedTypes[]
134132

135133
for (k, v) in seen_results
136-
if !(v isa TracedRArray) && !(v isa TracedRNumber)
137-
continue
138-
end
139-
134+
v isa TracedTypes || continue
140135
push!(linear_results, v)
141136
end
142137

0 commit comments

Comments
 (0)