Skip to content

Commit 82bc9a6

Browse files
Pangorawgithub-actions[bot]
authored andcommitted
Format code
1 parent d4718a5 commit 82bc9a6

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

ext/ReactantNNlibExt.jl

+5-3
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,16 @@ function NNlib.conv(
6060

6161
in1, in2 = in1.mlir_data, in2.mlir_data
6262
if !NNlib.flipkernel(cdims)
63-
rev = Reactant.MLIR.Dialects.stablehlo.reverse(in2; dimensions=[1,0])
63+
rev = Reactant.MLIR.Dialects.stablehlo.reverse(in2; dimensions=[1, 0])
6464
in2 = Reactant.MLIR.IR.result(rev, 1)
6565
end
6666

6767
return Reactant.TracedRArray{T,output_size,4}(
6868
(),
6969
Reactant.MLIR.IR.result(
7070
Reactant.MLIR.Dialects.stablehlo.convolution(
71-
in1, in2;
71+
in1,
72+
in2;
7273
result_0=output_type,
7374
dimension_numbers=parse(
7475
Reactant.MLIR.IR.Attribute,
@@ -88,7 +89,8 @@ function NNlib.conv(
8889
),
8990
rhs_dilation,
9091
lhs_dilation,
91-
padding, window_strides,
92+
padding,
93+
window_strides,
9294
feature_group_count=1,
9395
batch_group_count=1,
9496
),

src/Reactant.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@ function run_pass_pipeline!(mod, pass_pipeline)
11741174
pm = MLIR.IR.PassManager()
11751175
opm = MLIR.IR.OpPassManager(pm)
11761176
MLIR.IR.add_pipeline!(opm, pass_pipeline)
1177-
MLIR.IR.run!(pm, mod)
1177+
return MLIR.IR.run!(pm, mod)
11781178
end
11791179

11801180
function compile_to_module(mod, f, args; optimize=true)

test/nn.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ mean((out2[1, :] .> 0.5) .== truth) # accuracy 94% so far!
7575
W = randn(Float32, 10, 10, 3, 1)
7676
x = randn(Float32, 64, 64, 3, 2)
7777

78-
cW, cx = (W, x) .|> Reactant.ConcreteRArray
78+
cW, cx = Reactant.ConcreteRArray.((W, x))
7979
cconv = Reactant.compile(NNlib.conv, (cx, cW))
8080

8181
out = NNlib.conv(x, W)

0 commit comments

Comments
 (0)