Skip to content

Try to get the Mooncake & friends tests to consistently pass - #293

Open
kshyatt wants to merge 3 commits into
mainfrom
ksh/moon_eig
Open

kshyatt wants to merge 3 commits into
mainfrom
ksh/moon_eig

Conversation

@kshyatt

@kshyatt kshyatt commented Oct 1, 2026

Copy link
Copy Markdown
Member

A couple test nits here:

  • The rng we setup wasn't actually being used
  • LAPACK sometimes reorders eigenvalues (sorting them) in a way that blows up FD
  • For the truncation tests, we were accidentally generating trunctols that were also not playing nicely with FD

Hopefully this gets Mooncake and buddies consistently back on the path of happiness.

Comment thread test/testsuite/ad_utils.jl
finite-difference checks.
"""
function midgap_tol(vals)
s = sort!(collect(abs.(vals)))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why do we need the collect, shouldn't abs already give a vector?

Suggested change
s = sort!(collect(abs.(vals)))
s = sort!(abs.(vals))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not if vals lives on the GPU, right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ah, I missed the GPU case :) doesn't sort! also work on the GPU though?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah it does but I was skittish of the logic later on so I just did everything on CPU instead 😭

@codecov

codecov Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from ksh/trunc_fwd to main October 3, 2026 20:17

This branch has not been deployed

No deployments
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.

2 participants