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

Improve Small-Union Performance #85

Merged
merged 5 commits into from
Feb 22, 2024
Merged

Improve Small-Union Performance #85

merged 5 commits into from
Feb 22, 2024

Conversation

willtebbutt
Copy link
Member

Improves the way that unions are handled to mean that the performance of small unions is substantially improved.

There's still an allocation associated to the forwards-pass of pi nodes involving small unions that I've not yet managed to track down, but the performance is otherwise quite good now.

Copy link
Contributor

github-actions bot commented Feb 22, 2024

Performance Ratio:

┌────────────┬────────┬─────────┬──────────────┬─────────┐
│      label │  taped │  zygote │ reverse_diff │  enzyme │
│     String │ String │  String │       String │  String │
├────────────┼────────┼─────────┼──────────────┼─────────┤
│        sum │ 2850.0 │    1.14 │         7.92 │    1.84 │
│       _sum │  426.0 │  1220.0 │         71.3 │   0.307 │
│       kron │ 1490.0 │    3.51 │        209.0 │    27.3 │
│ kron types │ 1600.0 │    11.1 │        326.0 │    8.62 │
│  naive map │   36.9 │ missing │         9.16 │    2.81 │
│        map │   55.8 │    1.76 │         7.75 │    3.48 │
│  broadcast │   56.0 │    2.69 │          1.7 │    2.87 │
│        mlp │  118.0 │    3.11 │         11.2 │    3.64 │
│         gp │  335.0 │    4.09 │      missing │ missing │
└────────────┴────────┴─────────┴──────────────┴─────────┘

@willtebbutt willtebbutt merged commit b1bbb79 into main Feb 22, 2024
12 checks passed
@willtebbutt willtebbutt deleted the wct/small-unions branch February 22, 2024 18:17
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.

1 participant