Skip to content

Commit e389362

Browse files
committed
formatting
1 parent 59c67e6 commit e389362

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

lib/ReactantCore/src/ReactantCore.jl

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ macro trace(args...)
167167
end
168168
args = args[2:end]
169169
elseif args[1] === :tessera
170-
tessera = true
171-
args = args[2:end]
170+
tessera = true
171+
args = args[2:end]
172172
else
173173
break
174174
end
@@ -249,7 +249,7 @@ end
249249
function trace_function_definition(mod, expr; tessera=false)
250250
internal_fn = MacroTools.splitdef(expr)
251251
orig_fname = internal_fn[:name]
252-
252+
253253
tessera_name = tessera ? orig_fname : nothing
254254

255255
isfunctor = Meta.isexpr(orig_fname, :(::))
@@ -276,12 +276,19 @@ function trace_function_definition(mod, expr; tessera=false)
276276
end
277277

278278
if isempty(new_fn[:kwargs])
279-
traced_call_expr = :($(traced_call)($(fname), $(argnames...); tessera_name=$(String(tessera_name))))
279+
traced_call_expr = :($(traced_call)(
280+
$(fname), $(argnames...); tessera_name=$(String(tessera_name))
281+
))
280282
untraced_call_expr = :($(fname)($(argnames...)))
281283
else
282284
kws = first.(get_argname.(new_fn[:kwargs]))
283-
traced_call_expr =
284-
:($(traced_call)(Core.kwcall, (; $(kws...)), $(fname), $(argnames...); tessera_name=$(String(tessera_name))))
285+
traced_call_expr = :($(traced_call)(
286+
Core.kwcall,
287+
(; $(kws...)),
288+
$(fname),
289+
$(argnames...);
290+
tessera_name=$(String(tessera_name)),
291+
))
285292
untraced_call_expr = :(Core.kwcall((; $(kws...)), $(fname), $(argnames...)))
286293
end
287294

src/Ops.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2651,7 +2651,9 @@ end
26512651
return corrected_traced_results
26522652
end
26532653

2654-
@noinline function call(f, args...; location=mlir_stacktrace("call", @__FILE__, @__LINE__), tessera_name=nothing)
2654+
@noinline function call(
2655+
f, args...; location=mlir_stacktrace("call", @__FILE__, @__LINE__), tessera_name=nothing
2656+
)
26552657
seen = Reactant.OrderedIdDict()
26562658
cache_key = Any[tessera_name]
26572659
Reactant.make_tracer(seen, (f, args...), cache_key, Reactant.TracedToTypes)
@@ -2694,7 +2696,7 @@ end
26942696
resargprefix,
26952697
)
26962698
if !isnothing(tessera_name)
2697-
MLIR.IR.attr!(temp.f, "tessera_name", MLIR.IR.Attribute(tessera_name))
2699+
MLIR.IR.attr!(temp.f, "tessera_name", MLIR.IR.Attribute(tessera_name))
26982700
end
26992701
end
27002702

0 commit comments

Comments
 (0)