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

feat: support short-circuiting expressions via trace macro #262

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

avik-pal
Copy link
Collaborator

@avik-pal avik-pal commented Nov 11, 2024

fixes #261
fixes #263

needs some testing, will do tomorrow

@avik-pal avik-pal marked this pull request as draft November 11, 2024 03:59
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.

Reactant.jl Benchmarks

Benchmark suite Current: b951b4f Previous: f2a91bf Ratio
ViT base (256 x 256 x 3 x 32)/forward/CPU/Reactant (optimize = :after_enzyme) 5403018355 ns 7038978698 ns 0.77
ViT base (256 x 256 x 3 x 32)/forward/CPU/Reactant 6002649181 ns 4922184280 ns 1.22
ViT base (256 x 256 x 3 x 32)/forward/CPU/Reactant (optimize = :before_enzyme) 5299650160 ns 5148694966 ns 1.03
ViT base (256 x 256 x 3 x 32)/forward/CPU/Reactant (optimize = :only_enzyme) 7421263551 ns 7443923750 ns 1.00
ViT base (256 x 256 x 3 x 32)/forward/CPU/Lux 29379209829 ns 35583150632 ns 0.83
ViT small (256 x 256 x 3 x 4)/forward/CPU/Reactant (optimize = :after_enzyme) 1565333994 ns 1555452102 ns 1.01
ViT small (256 x 256 x 3 x 4)/forward/CPU/Reactant 1543343645 ns 1525737118 ns 1.01
ViT small (256 x 256 x 3 x 4)/forward/CPU/Reactant (optimize = :before_enzyme) 1547701612 ns 1533932694 ns 1.01
ViT small (256 x 256 x 3 x 4)/forward/CPU/Reactant (optimize = :only_enzyme) 3300182890 ns 3300553638 ns 1.00
ViT small (256 x 256 x 3 x 4)/forward/CPU/Lux 3166069923 ns 2534998626 ns 1.25
ViT tiny (256 x 256 x 3 x 32)/forward/CPU/Reactant (optimize = :after_enzyme) 2157527734 ns 2138887589 ns 1.01
ViT tiny (256 x 256 x 3 x 32)/forward/CPU/Reactant 2112955370 ns 2148375491 ns 0.98
ViT tiny (256 x 256 x 3 x 32)/forward/CPU/Reactant (optimize = :before_enzyme) 2111367384 ns 2178317010 ns 0.97
ViT tiny (256 x 256 x 3 x 32)/forward/CPU/Reactant (optimize = :only_enzyme) 3889885787 ns 3916690304 ns 0.99
ViT tiny (256 x 256 x 3 x 32)/forward/CPU/Lux 6043147296 ns 5911275014.5 ns 1.02
ViT tiny (256 x 256 x 3 x 4)/forward/CPU/Reactant (optimize = :after_enzyme) 1434978801 ns 1457203535 ns 0.98
ViT tiny (256 x 256 x 3 x 4)/forward/CPU/Reactant 1414817001 ns 1435056828 ns 0.99
ViT tiny (256 x 256 x 3 x 4)/forward/CPU/Reactant (optimize = :before_enzyme) 1413899859 ns 1438646883 ns 0.98
ViT tiny (256 x 256 x 3 x 4)/forward/CPU/Reactant (optimize = :only_enzyme) 3145307768 ns 3204423699 ns 0.98
ViT tiny (256 x 256 x 3 x 4)/forward/CPU/Lux 1308390341 ns 1204850367 ns 1.09
ViT tiny (256 x 256 x 3 x 16)/forward/CPU/Reactant (optimize = :after_enzyme) 1704122494 ns 1721890751 ns 0.99
ViT tiny (256 x 256 x 3 x 16)/forward/CPU/Reactant 1723674866 ns 1722159183 ns 1.00
ViT tiny (256 x 256 x 3 x 16)/forward/CPU/Reactant (optimize = :before_enzyme) 1699090895 ns 1701220224 ns 1.00
ViT tiny (256 x 256 x 3 x 16)/forward/CPU/Reactant (optimize = :only_enzyme) 3443605409 ns 3501882082 ns 0.98
ViT tiny (256 x 256 x 3 x 16)/forward/CPU/Lux 3020268760 ns 2892153610 ns 1.04
ViT small (256 x 256 x 3 x 16)/forward/CPU/Reactant (optimize = :after_enzyme) 2152960158 ns 2184873795 ns 0.99
ViT small (256 x 256 x 3 x 16)/forward/CPU/Reactant 2174716137 ns 2206178636 ns 0.99
ViT small (256 x 256 x 3 x 16)/forward/CPU/Reactant (optimize = :before_enzyme) 2157086006 ns 2173015030 ns 0.99
ViT small (256 x 256 x 3 x 16)/forward/CPU/Reactant (optimize = :only_enzyme) 3892349782 ns 3992993680 ns 0.97
ViT small (256 x 256 x 3 x 16)/forward/CPU/Lux 7415038966.5 ns 5901204125.5 ns 1.26
ViT small (256 x 256 x 3 x 32)/forward/CPU/Reactant (optimize = :after_enzyme) 2985038282 ns 2942888604 ns 1.01
ViT small (256 x 256 x 3 x 32)/forward/CPU/Reactant 2988795653 ns 2995273898 ns 1.00
ViT small (256 x 256 x 3 x 32)/forward/CPU/Reactant (optimize = :before_enzyme) 2989858942 ns 3018336488 ns 0.99
ViT small (256 x 256 x 3 x 32)/forward/CPU/Reactant (optimize = :only_enzyme) 4832450907 ns 4949580089 ns 0.98
ViT small (256 x 256 x 3 x 32)/forward/CPU/Lux 10355926711 ns 14511536613 ns 0.71
ViT base (256 x 256 x 3 x 16)/forward/CPU/Reactant (optimize = :after_enzyme) 3120236457 ns 3137681593 ns 0.99
ViT base (256 x 256 x 3 x 16)/forward/CPU/Reactant 3169726885 ns 3252812510 ns 0.97
ViT base (256 x 256 x 3 x 16)/forward/CPU/Reactant (optimize = :before_enzyme) 3157229311 ns 3113127307 ns 1.01
ViT base (256 x 256 x 3 x 16)/forward/CPU/Reactant (optimize = :only_enzyme) 5011035282 ns 5045606499 ns 0.99
ViT base (256 x 256 x 3 x 16)/forward/CPU/Lux 13694848660 ns 15819654237 ns 0.87
ViT base (256 x 256 x 3 x 4)/forward/CPU/Reactant (optimize = :after_enzyme) 1972393838 ns 1868979954 ns 1.06
ViT base (256 x 256 x 3 x 4)/forward/CPU/Reactant 2156040833 ns 1974840414 ns 1.09
ViT base (256 x 256 x 3 x 4)/forward/CPU/Reactant (optimize = :before_enzyme) 1886649467 ns 1995499997 ns 0.95
ViT base (256 x 256 x 3 x 4)/forward/CPU/Reactant (optimize = :only_enzyme) 3563205719 ns 3753168538 ns 0.95
ViT base (256 x 256 x 3 x 4)/forward/CPU/Lux 3534127308 ns 3215953877.5 ns 1.10

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect macro implement for missing else with new variables Short circuiting statements
1 participant