Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to improve coverage #718

Merged
merged 21 commits into from
Jun 22, 2024
Merged

Try to improve coverage #718

merged 21 commits into from
Jun 22, 2024

Conversation

avik-pal
Copy link
Member

No description provided.

Copy link

codecov bot commented Jun 21, 2024

Codecov Report

Attention: Patch coverage is 94.11765% with 10 lines in your changes missing coverage. Please review.

Project coverage is 96.64%. Comparing base (60a79fb) to head (b6ac7ea).

Files Patch % Lines
src/contrib/training.jl 66.66% 5 Missing ⚠️
src/helpers/nested_ad.jl 33.33% 4 Missing ⚠️
src/contrib/debug.jl 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #718      +/-   ##
==========================================
+ Coverage   87.69%   96.64%   +8.95%     
==========================================
  Files          51       52       +1     
  Lines        2665     2655      -10     
==========================================
+ Hits         2337     2566     +229     
+ Misses        328       89     -239     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Results

Benchmark suite Current: b6ac7ea Previous: f7b9539 Ratio
Dense(2 => 2)/cpu/reverse/ReverseDiff (compiled)/(2, 128) 3678.125 ns 3864.625 ns 0.95
Dense(2 => 2)/cpu/reverse/Zygote/(2, 128) 7013 ns 7197.4 ns 0.97
Dense(2 => 2)/cpu/reverse/Tracker/(2, 128) 20939 ns 20859 ns 1.00
Dense(2 => 2)/cpu/reverse/ReverseDiff/(2, 128) 9792.4 ns 9690.5 ns 1.01
Dense(2 => 2)/cpu/reverse/Flux/(2, 128) 9001.75 ns 8960.6 ns 1.00
Dense(2 => 2)/cpu/reverse/SimpleChains/(2, 128) 4494.625 ns 4472.125 ns 1.01
Dense(2 => 2)/cpu/reverse/Enzyme/(2, 128) 1152.1527777777778 ns 1152.2189781021898 ns 1.00
Dense(2 => 2)/cpu/forward/NamedTuple/(2, 128) 1172.5859375 ns 1166.719696969697 ns 1.01
Dense(2 => 2)/cpu/forward/ComponentArray/(2, 128) 1177.4264705882354 ns 1178.348148148148 ns 1.00
Dense(2 => 2)/cpu/forward/Flux/(2, 128) 1772.7894736842106 ns 1791.0849056603774 ns 0.99
Dense(2 => 2)/cpu/forward/SimpleChains/(2, 128) 179.84344146685473 ns 179.68464730290455 ns 1.00
Dense(20 => 20)/cpu/reverse/ReverseDiff (compiled)/(20, 128) 17432 ns 17282 ns 1.01
Dense(20 => 20)/cpu/reverse/Zygote/(20, 128) 16742 ns 16802 ns 1.00
Dense(20 => 20)/cpu/reverse/Tracker/(20, 128) 37079 ns 38952 ns 0.95
Dense(20 => 20)/cpu/reverse/ReverseDiff/(20, 128) 29375 ns 29225 ns 1.01
Dense(20 => 20)/cpu/reverse/Flux/(20, 128) 19867 ns 19767 ns 1.01
Dense(20 => 20)/cpu/reverse/SimpleChains/(20, 128) 17323 ns 17187.5 ns 1.01
Dense(20 => 20)/cpu/reverse/Enzyme/(20, 128) 4326.714285714285 ns 4339.571428571428 ns 1.00
Dense(20 => 20)/cpu/forward/NamedTuple/(20, 128) 3856 ns 3863.375 ns 1.00
Dense(20 => 20)/cpu/forward/ComponentArray/(20, 128) 3934.875 ns 3932.375 ns 1.00
Dense(20 => 20)/cpu/forward/Flux/(20, 128) 4852 ns 4904.857142857143 ns 0.99
Dense(20 => 20)/cpu/forward/SimpleChains/(20, 128) 1654.1 ns 1662.1 ns 1.00
Conv((3, 3), 3 => 3)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 3, 128) 39025385 ns 46506004.5 ns 0.84
Conv((3, 3), 3 => 3)/cpu/reverse/Zygote/(64, 64, 3, 128) 57601257 ns 57802889 ns 1.00
Conv((3, 3), 3 => 3)/cpu/reverse/Tracker/(64, 64, 3, 128) 75988263.5 ns 110407401 ns 0.69
Conv((3, 3), 3 => 3)/cpu/reverse/ReverseDiff/(64, 64, 3, 128) 88414621 ns 106701454 ns 0.83
Conv((3, 3), 3 => 3)/cpu/reverse/Flux/(64, 64, 3, 128) 72641775 ns 107083940.5 ns 0.68
Conv((3, 3), 3 => 3)/cpu/reverse/SimpleChains/(64, 64, 3, 128) 11673255 ns 11944033.5 ns 0.98
Conv((3, 3), 3 => 3)/cpu/reverse/Enzyme/(64, 64, 3, 128) 17896091 ns 17826363 ns 1.00
Conv((3, 3), 3 => 3)/cpu/forward/NamedTuple/(64, 64, 3, 128) 7015800 ns 7025065.5 ns 1.00
Conv((3, 3), 3 => 3)/cpu/forward/ComponentArray/(64, 64, 3, 128) 6994325 ns 6982537 ns 1.00
Conv((3, 3), 3 => 3)/cpu/forward/Flux/(64, 64, 3, 128) 10034948 ns 18426786.5 ns 0.54
Conv((3, 3), 3 => 3)/cpu/forward/SimpleChains/(64, 64, 3, 128) 6387610 ns 6380584 ns 1.00
vgg16/cpu/reverse/Zygote/(32, 32, 3, 16) 739104734 ns 730954388 ns 1.01
vgg16/cpu/reverse/Zygote/(32, 32, 3, 64) 2536852448 ns 2547466756 ns 1.00
vgg16/cpu/reverse/Zygote/(32, 32, 3, 2) 144991571 ns 143281222.5 ns 1.01
vgg16/cpu/reverse/Tracker/(32, 32, 3, 16) 777156058 ns 907944434 ns 0.86
vgg16/cpu/reverse/Tracker/(32, 32, 3, 64) 3086585316 ns 3408151568 ns 0.91
vgg16/cpu/reverse/Tracker/(32, 32, 3, 2) 214874561.5 ns 232691070 ns 0.92
vgg16/cpu/reverse/Flux/(32, 32, 3, 16) 640725663.5 ns 701405563.5 ns 0.91
vgg16/cpu/reverse/Flux/(32, 32, 3, 64) 2601086114 ns 2751192398 ns 0.95
vgg16/cpu/reverse/Flux/(32, 32, 3, 2) 123439751.5 ns 150091812 ns 0.82
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 16) 172004823.5 ns 174202338.5 ns 0.99
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 64) 643963147.5 ns 651482390 ns 0.99
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 2) 34432724 ns 45292469 ns 0.76
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 16) 163782451.5 ns 164217014 ns 1.00
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 64) 639375501 ns 640363054 ns 1.00
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 2) 29636235 ns 30140396.5 ns 0.98
vgg16/cpu/forward/Flux/(32, 32, 3, 16) 186034299 ns 210450508 ns 0.88
vgg16/cpu/forward/Flux/(32, 32, 3, 64) 798384078 ns 812675116 ns 0.98
vgg16/cpu/forward/Flux/(32, 32, 3, 2) 37058523 ns 37414452 ns 0.99
Conv((3, 3), 64 => 64)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 64, 128) 1295233443 ns 1319067230.5 ns 0.98
Conv((3, 3), 64 => 64)/cpu/reverse/Zygote/(64, 64, 64, 128) 1856846514 ns 1855157553 ns 1.00
Conv((3, 3), 64 => 64)/cpu/reverse/Tracker/(64, 64, 64, 128) 2333148597 ns 2389725378 ns 0.98
Conv((3, 3), 64 => 64)/cpu/reverse/ReverseDiff/(64, 64, 64, 128) 2636684982 ns 2576211037 ns 1.02
Conv((3, 3), 64 => 64)/cpu/reverse/Flux/(64, 64, 64, 128) 1898207100 ns 1979708272 ns 0.96
Conv((3, 3), 64 => 64)/cpu/reverse/Enzyme/(64, 64, 64, 128) 564891071 ns 555898503 ns 1.02
Conv((3, 3), 64 => 64)/cpu/forward/NamedTuple/(64, 64, 64, 128) 318085356 ns 316191735 ns 1.01
Conv((3, 3), 64 => 64)/cpu/forward/ComponentArray/(64, 64, 64, 128) 317446765 ns 314504058 ns 1.01
Conv((3, 3), 64 => 64)/cpu/forward/Flux/(64, 64, 64, 128) 418277732 ns 465777211 ns 0.90
Conv((3, 3), 1 => 1)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 1, 128) 11956834 ns 11830345.5 ns 1.01
Conv((3, 3), 1 => 1)/cpu/reverse/Zygote/(64, 64, 1, 128) 17837255 ns 18031514 ns 0.99
Conv((3, 3), 1 => 1)/cpu/reverse/Tracker/(64, 64, 1, 128) 19048029 ns 19168195 ns 0.99
Conv((3, 3), 1 => 1)/cpu/reverse/ReverseDiff/(64, 64, 1, 128) 23814538.5 ns 23938562 ns 0.99
Conv((3, 3), 1 => 1)/cpu/reverse/Flux/(64, 64, 1, 128) 17908353 ns 18050494 ns 0.99
Conv((3, 3), 1 => 1)/cpu/reverse/SimpleChains/(64, 64, 1, 128) 1154032.5 ns 1154605 ns 1.00
Conv((3, 3), 1 => 1)/cpu/reverse/Enzyme/(64, 64, 1, 128) 5839049 ns 5872019 ns 0.99
Conv((3, 3), 1 => 1)/cpu/forward/NamedTuple/(64, 64, 1, 128) 2045684 ns 2056057 ns 0.99
Conv((3, 3), 1 => 1)/cpu/forward/ComponentArray/(64, 64, 1, 128) 2032608 ns 2037893 ns 1.00
Conv((3, 3), 1 => 1)/cpu/forward/Flux/(64, 64, 1, 128) 2069875 ns 2074361 ns 1.00
Conv((3, 3), 1 => 1)/cpu/forward/SimpleChains/(64, 64, 1, 128) 199504 ns 200504 ns 1.00
Dense(200 => 200)/cpu/reverse/ReverseDiff (compiled)/(200, 128) 291647 ns 292576 ns 1.00
Dense(200 => 200)/cpu/reverse/Zygote/(200, 128) 263103 ns 265335 ns 0.99
Dense(200 => 200)/cpu/reverse/Tracker/(200, 128) 359544 ns 365001 ns 0.99
Dense(200 => 200)/cpu/reverse/ReverseDiff/(200, 128) 405149 ns 408391.5 ns 0.99
Dense(200 => 200)/cpu/reverse/Flux/(200, 128) 271889 ns 383161 ns 0.71
Dense(200 => 200)/cpu/reverse/SimpleChains/(200, 128) 409807 ns 407973 ns 1.00
Dense(200 => 200)/cpu/reverse/Enzyme/(200, 128) 82855 ns 83536 ns 0.99
Dense(200 => 200)/cpu/forward/NamedTuple/(200, 128) 80751 ns 81562 ns 0.99
Dense(200 => 200)/cpu/forward/ComponentArray/(200, 128) 81142 ns 81833 ns 0.99
Dense(200 => 200)/cpu/forward/Flux/(200, 128) 86221 ns 86140 ns 1.00
Dense(200 => 200)/cpu/forward/SimpleChains/(200, 128) 104777 ns 104836 ns 1.00
Conv((3, 3), 16 => 16)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 16, 128) 190814419 ns 207388132 ns 0.92
Conv((3, 3), 16 => 16)/cpu/reverse/Zygote/(64, 64, 16, 128) 326195128 ns 324041362 ns 1.01
Conv((3, 3), 16 => 16)/cpu/reverse/Tracker/(64, 64, 16, 128) 391435977 ns 435241619.5 ns 0.90
Conv((3, 3), 16 => 16)/cpu/reverse/ReverseDiff/(64, 64, 16, 128) 458051728 ns 489451804 ns 0.94
Conv((3, 3), 16 => 16)/cpu/reverse/Flux/(64, 64, 16, 128) 377140416 ns 406672717.5 ns 0.93
Conv((3, 3), 16 => 16)/cpu/reverse/SimpleChains/(64, 64, 16, 128) 322819731 ns 320495841 ns 1.01
Conv((3, 3), 16 => 16)/cpu/reverse/Enzyme/(64, 64, 16, 128) 102420511.5 ns 101394771.5 ns 1.01
Conv((3, 3), 16 => 16)/cpu/forward/NamedTuple/(64, 64, 16, 128) 43525730 ns 43915846 ns 0.99
Conv((3, 3), 16 => 16)/cpu/forward/ComponentArray/(64, 64, 16, 128) 43622543 ns 43768021 ns 1.00
Conv((3, 3), 16 => 16)/cpu/forward/Flux/(64, 64, 16, 128) 59528004 ns 70277761.5 ns 0.85
Conv((3, 3), 16 => 16)/cpu/forward/SimpleChains/(64, 64, 16, 128) 28571625 ns 29141934 ns 0.98
Dense(2000 => 2000)/cpu/reverse/ReverseDiff (compiled)/(2000, 128) 18804257.5 ns 18724535.5 ns 1.00
Dense(2000 => 2000)/cpu/reverse/Zygote/(2000, 128) 19470856 ns 19456819 ns 1.00
Dense(2000 => 2000)/cpu/reverse/Tracker/(2000, 128) 23367916 ns 22919966.5 ns 1.02
Dense(2000 => 2000)/cpu/reverse/ReverseDiff/(2000, 128) 24047533.5 ns 23955208 ns 1.00
Dense(2000 => 2000)/cpu/reverse/Flux/(2000, 128) 19583130 ns 19535589 ns 1.00
Dense(2000 => 2000)/cpu/reverse/Enzyme/(2000, 128) 6497162.5 ns 6537723 ns 0.99
Dense(2000 => 2000)/cpu/forward/NamedTuple/(2000, 128) 6502157 ns 6514811 ns 1.00
Dense(2000 => 2000)/cpu/forward/ComponentArray/(2000, 128) 6494927.5 ns 6477278 ns 1.00
Dense(2000 => 2000)/cpu/forward/Flux/(2000, 128) 6511103 ns 6514184 ns 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@avik-pal avik-pal force-pushed the ap/coverage branch 2 times, most recently from 98eeba0 to 96381e1 Compare June 21, 2024 15:13
@avik-pal avik-pal force-pushed the ap/coverage branch 2 times, most recently from 8860fd0 to 4200013 Compare June 21, 2024 22:15
test/helpers/nestedad_tests.jl Outdated Show resolved Hide resolved
test/helpers/nestedad_tests.jl Outdated Show resolved Hide resolved
test/misc_tests.jl Outdated Show resolved Hide resolved
src/helpers/compact.jl Outdated Show resolved Hide resolved
@avik-pal avik-pal force-pushed the ap/coverage branch 3 times, most recently from 469df48 to 3a533fd Compare June 22, 2024 01:51
src/layers/extension.jl Outdated Show resolved Hide resolved
@avik-pal avik-pal force-pushed the ap/coverage branch 3 times, most recently from 5affcae to 4481c40 Compare June 22, 2024 02:50
test/utils_tests.jl Outdated Show resolved Hide resolved
test/utils_tests.jl Outdated Show resolved Hide resolved
@avik-pal avik-pal merged commit 72cfeec into main Jun 22, 2024
59 of 62 checks passed
@avik-pal avik-pal deleted the ap/coverage branch June 22, 2024 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant