-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use runic for formatting (#1255)
* refactor: use runic for formatting * chore: add git hash to ignore revs * ci: add runic CI * refactor: format lib * chore: housekeeping * refactor: format all * ci: run runic correctly
- Loading branch information
Showing
236 changed files
with
7,222 additions
and
5,031 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
aaf856ed53e8eb526aa066aaebe59a25d7f8ddf4 # Switched formatting to Runic | ||
1c70cc899988e4d5958b1a99e2dc79fbfcd35018 # Runic formatting for `lib/` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
repos: | ||
- repo: https://github.com/fredrikekre/runic-pre-commit | ||
rev: v1.0.0 | ||
hooks: | ||
- id: runic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,41 @@ | ||
function setup_dense_benchmarks!(suite::BenchmarkGroup, cpu_or_gpu::String, | ||
final_backend::String, dev::AbstractDevice) | ||
function setup_dense_benchmarks!( | ||
suite::BenchmarkGroup, cpu_or_gpu::String, | ||
final_backend::String, dev::AbstractDevice | ||
) | ||
for n in (16, 128, 512), act in (identity, relu, gelu) | ||
layer = Dense(n => n, act) | ||
|
||
setup_forward_pass_benchmark!(suite, "Dense($n => $n, $act)($n x 128)", | ||
cpu_or_gpu, final_backend, layer, (n, 128), dev) | ||
setup_forward_pass_benchmark!( | ||
suite, "Dense($n => $n, $act)($n x 128)", | ||
cpu_or_gpu, final_backend, layer, (n, 128), dev | ||
) | ||
|
||
setup_reverse_pass_benchmark!(suite, "Dense($n => $n, $act)($n x 128)", | ||
cpu_or_gpu, final_backend, [AutoZygote(), AutoEnzyme()], layer, (n, 128), dev) | ||
setup_reverse_pass_benchmark!( | ||
suite, "Dense($n => $n, $act)($n x 128)", | ||
cpu_or_gpu, final_backend, [AutoZygote(), AutoEnzyme()], layer, (n, 128), dev | ||
) | ||
end | ||
return | ||
end | ||
|
||
function setup_conv_benchmarks!(suite::BenchmarkGroup, cpu_or_gpu::String, | ||
final_backend::String, dev::AbstractDevice) | ||
function setup_conv_benchmarks!( | ||
suite::BenchmarkGroup, cpu_or_gpu::String, | ||
final_backend::String, dev::AbstractDevice | ||
) | ||
for ch in (2, 4, 32, 64), act in (identity, relu, gelu) | ||
layer = Conv((3, 3), ch => ch, act) | ||
|
||
setup_forward_pass_benchmark!( | ||
suite, "Conv((3, 3), $ch => $ch, $act)(64 x 64 x $ch x 128)", | ||
cpu_or_gpu, final_backend, layer, (64, 64, ch, 128), dev) | ||
cpu_or_gpu, final_backend, layer, (64, 64, ch, 128), dev | ||
) | ||
|
||
setup_reverse_pass_benchmark!( | ||
suite, "Conv((3, 3), $ch => $ch, $act)(64 x 64 x $ch x 128)", | ||
cpu_or_gpu, final_backend, [AutoZygote(), AutoEnzyme()], layer, ( | ||
64, 64, ch, 128), dev) | ||
64, 64, ch, 128, | ||
), dev | ||
) | ||
end | ||
return | ||
end |
Oops, something went wrong.