Skip to content

Add support for nightly version (1.13)#856

Draft
yebai wants to merge 14 commits intomainfrom
test-1-13
Draft

Add support for nightly version (1.13)#856
yebai wants to merge 14 commits intomainfrom
test-1-13

Conversation

@yebai
Copy link
Copy Markdown
Member

@yebai yebai commented Nov 17, 2025

TODO

CI Summary — GitHub Actions

Documentation Preview

Mooncake.jl documentation for PR #856 is available at:
https://chalk-lab.github.io/Mooncake.jl/previews/PR856/

Performance

Performance Ratio:
Ratio of time to compute gradient and time to compute function.
Warning: results are very approximate! See here for more context.

┌────────────────────────────┬──────────┬──────────┬─────────────┬─────────┬─────────────┬────────┐
│                      Label │   Primal │ Mooncake │ MooncakeFwd │  Zygote │ ReverseDiff │ Enzyme │
│                     String │   String │   String │      String │  String │      String │ String │
├────────────────────────────┼──────────┼──────────┼─────────────┼─────────┼─────────────┼────────┤
│                   sum_1000 │ 130.0 ns │     1.85 │        2.32 │     1.0 │        5.01 │   1.85 │
│                  _sum_1000 │  1.07 μs │     6.55 │        1.02 │  5660.0 │        31.5 │   1.09 │
│               sum_sin_1000 │  7.45 μs │     2.42 │        1.19 │    1.73 │        9.29 │   1.81 │
│              _sum_sin_1000 │  5.17 μs │     3.24 │        2.44 │   355.0 │        13.2 │   2.76 │
│                   kron_sum │ 192.0 μs │     12.7 │        3.54 │    7.72 │       441.0 │   19.3 │
│              kron_view_sum │ 257.0 μs │     12.7 │        4.98 │    17.4 │       470.0 │   15.4 │
│      naive_map_sin_cos_exp │  2.34 μs │     2.26 │        1.44 │ missing │        6.95 │   2.04 │
│            map_sin_cos_exp │  2.29 μs │      2.8 │        1.52 │    2.62 │         6.0 │   2.59 │
│      broadcast_sin_cos_exp │  2.43 μs │     2.57 │        1.44 │    5.47 │        1.38 │   1.97 │
│                 simple_mlp │ 352.0 μs │     5.02 │        2.92 │    1.65 │        8.86 │   3.12 │
│                     gp_lml │ 399.0 μs │      5.9 │        1.82 │    2.59 │     missing │    2.6 │
│ turing_broadcast_benchmark │  2.04 ms │     4.03 │        3.35 │ missing │        36.5 │    1.8 │
│         large_single_block │ 450.0 ns │     5.83 │        1.96 │  3780.0 │        28.4 │   2.18 │
└────────────────────────────┴──────────┴──────────┴─────────────┴─────────┴─────────────┴────────┘

Signed-off-by: Hong Ge <3279477+yebai@users.noreply.github.com>
@yebai yebai removed their assignment Nov 17, 2025
@yebai yebai marked this pull request as draft November 17, 2025 22:38
@github-actions
Copy link
Copy Markdown
Contributor

Mooncake.jl documentation for PR #856 is available at:
https://chalk-lab.github.io/Mooncake.jl/previews/PR856/

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 17, 2025

Performance Ratio:
Ratio of time to compute gradient and time to compute function.
Warning: results are very approximate! See here for more context.

┌────────────────────────────┬──────────┬──────────┬─────────────┬─────────┬─────────────┬────────┐
│                      Label │   Primal │ Mooncake │ MooncakeFwd │  Zygote │ ReverseDiff │ Enzyme │
│                     String │   String │   String │      String │  String │      String │ String │
├────────────────────────────┼──────────┼──────────┼─────────────┼─────────┼─────────────┼────────┤
│                   sum_1000 │ 266.0 ns │     1.75 │        1.89 │    0.44 │        1.52 │   3.26 │
│                  _sum_1000 │  1.21 μs │     8.06 │        1.03 │  1600.0 │        23.0 │   1.42 │
│               sum_sin_1000 │  6.56 μs │     3.24 │        1.88 │    2.15 │        10.1 │   1.95 │
│              _sum_sin_1000 │  6.67 μs │     2.85 │        1.67 │   243.0 │        10.1 │   1.77 │
│                   kron_sum │ 389.0 μs │     7.37 │        2.59 │    15.6 │       287.0 │   12.9 │
│              kron_view_sum │ 458.0 μs │     7.21 │        3.36 │    15.2 │       254.0 │   11.1 │
│      naive_map_sin_cos_exp │  2.84 μs │     3.77 │         1.3 │ missing │        5.24 │   1.77 │
│            map_sin_cos_exp │  3.01 μs │     4.38 │        2.71 │    1.85 │        4.19 │   2.07 │
│      broadcast_sin_cos_exp │  3.01 μs │     2.21 │        2.05 │    3.11 │         1.1 │    1.7 │
│                 simple_mlp │ 477.0 μs │      4.0 │        2.58 │    1.59 │        6.84 │    2.9 │
│                     gp_lml │ 306.0 μs │     7.29 │        2.31 │    4.75 │     missing │    4.2 │
│ turing_broadcast_benchmark │   1.9 ms │     4.37 │        3.04 │ missing │        27.7 │   1.91 │
│         large_single_block │ 484.0 ns │     6.32 │        2.04 │  3800.0 │        23.0 │   1.86 │
└────────────────────────────┴──────────┴──────────┴─────────────┴─────────┴─────────────┴────────┘

@Technici4n
Copy link
Copy Markdown
Collaborator

I don't think that nightly is worth it, but we should add pre once it's available.

@penelopeysm
Copy link
Copy Markdown
Collaborator

I agree, nightly is quite fragile. BTW, current nightly is 1.14.

Signed-off-by: Hong Ge <3279477+yebai@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 27, 2025

Codecov Report

❌ Patch coverage is 58.33333% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ext/MooncakeAllocCheckExt.jl 50.00% 3 Missing ⚠️
src/interpreter/ir_utils.jl 66.66% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Signed-off-by: Hong Ge <3279477+yebai@users.noreply.github.com>
@Technici4n
Copy link
Copy Markdown
Collaborator

Note that pre is currently julia 1.12. Do we know when the first 1.13 pre will be released?

@penelopeysm
Copy link
Copy Markdown
Collaborator

Yeahhh, it's kind of in an awkward spot, that's why I haven't added 1.13 tests for the Turing repos. I'm not actually sure how to specify 1.13 in CI. Maybe version: '1.13-nightly' might work (following from https://github.com/julia-actions/setup-julia?tab=readme-ov-file#julia-versions) but I've never tried it.

1.13.0-alpha1 was supposed to be released last week, but it didn't build: https://julialang.slack.com/archives/C7E3LFG82/p1763643474697259

@penelopeysm
Copy link
Copy Markdown
Collaborator

penelopeysm commented Dec 2, 2025

1.13-alpha2 is released, so might be worth checking whether pre resolves to 1.13

yebai and others added 5 commits December 2, 2025 21:48
* Use conditional for interpreter selection based on version

Signed-off-by: Hong Ge <3279477+yebai@users.noreply.github.com>

* Add conditional inclusion for patch_for_319.jl

Conditionally include patch_for_319.jl for versions below 1.12

Signed-off-by: Hong Ge <3279477+yebai@users.noreply.github.com>

* Refactor local_interp initialization for version check

Signed-off-by: Hong Ge <3279477+yebai@users.noreply.github.com>

* Apply suggestions from code review

Signed-off-by: Hong Ge <3279477+yebai@users.noreply.github.com>

---------

Signed-off-by: Hong Ge <3279477+yebai@users.noreply.github.com>
@yebai yebai force-pushed the main branch 3 times, most recently from dfec3c4 to 7b2f7ba Compare January 24, 2026 21:38
@MasonProtter
Copy link
Copy Markdown
Collaborator

Frustratingly, we can't even start a CI run for 1.13 because JET won't install. See aviatesk/JET.jl#796

We should perhaps factor the JET tests out into a separate test suite that only runs if JET is installable.

@yebai yebai force-pushed the test-1-13 branch 2 times, most recently from fff10c4 to 6f9eb9d Compare January 25, 2026 17:15
@yebai
Copy link
Copy Markdown
Member Author

yebai commented Jan 25, 2026

The test suite doesn't hard-depend on JET; if JET isn't installed, it will skip JET tests. This means one can temporarily remove JET from the test environment.

Julia 1.13 appears to be less disruptive than 1.12, since some tests (e.g., linear_algebra) pass without change. This indicates the core compiler part may be mostly fine.

@yebai yebai force-pushed the test-1-13 branch 3 times, most recently from 2e12e88 to d51bf3c Compare January 25, 2026 17:39
Signed-off-by: Hong Ge <3279477+yebai@users.noreply.github.com>
yebai and others added 2 commits February 9, 2026 23:17
Signed-off-by: Hong Ge <3279477+yebai@users.noreply.github.com>
Revert conditional JET loading (commit 69a06e0) and instead make
@check_allocs a null op in MooncakeAllocCheckExt on Julia 1.13+.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
# Conflicts:
#	src/interpreter/ir_utils.jl
#	test/ext/nnlib/Project.toml
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.

6 participants