-
Notifications
You must be signed in to change notification settings - Fork 3
Validation pass: Emily 0.4.0 on Apple Silicon (37/37 decision-stable; route_hash + one margin-floor near-miss) #1
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
Draft
ausimian
wants to merge
2
commits into
nshkrdotcom:main
Choose a base branch
from
ausimian:emily-0.4-validation-pass
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nshkrdotcom what's the intention behind this selection?
I think it's a bit brittle in that any backend that you want to support ends up having to be explicitly supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@polvalente You're right that the cond was brittle, and that brittleness goes deeper than the one site you flagged. The same shape was duplicated in three near-identical private
backend_from_label/1clauses inSakana.{Artifact, Head, PythonImporter}, and each silently fell back toNx.BinaryBackendfor any label the cond didn't enumerate. Oncetensor_backend/1started producing generic labels for backends like"EMLX.Backend"or"Emily.Backend"(which it now does in 21c3088), the silent coerce-to-BinaryBackend would have been a correctness hazard in the alignment / transfer call sites, not cosmetics.Landed on
main:lib/trinity_coordinator/runtime.ex—tensor_backend/1now binds%Nx.Tensor{data: %backend_struct{}}and the default returnsbackend_struct |> Module.split() |> Enum.join("."). EXLA's<cuda:N>/<host:N>device-info prefixes are preserved on the inspect-based path (they encode device identity into the inspect string, so the inspect form is still the right tool there). Added in 21c3088, hardened in the same commit.lib/trinity_coordinator/runtime/backend_label.exwithfrom_label/1({:ok, backend_spec} | {:error, {:unknown_backend_label, label}}) andfrom_label!/1(logsLogger.warningand falls back toNx.BinaryBackendfor unknown labels — preserves the prior behaviour but makes it audible instead of silent). The three Sakana modules now call the helper; their private cond chains are gone.test/trinity_coordinator/runtime_backend_label_test.exspins the generic-default contract using synthesised fixture backend modules so it runs without a CUDA host. Phase 3 coverage intest/trinity_coordinator/runtime/backend_label_test.exspins the EMLX label round-trip (the lane that would have been silently broken under the old fallback) plus theLogger.warningon unknown labels.The same generalization is what unblocked landing a first-class
:emilyprofile (93cbcae): the four-linedef resolve(:emily)clause mirrors:emlxplus ships an empirical margin override, andaccepts_backend_label?/2accepts"Emily.Backend"for free via the generic prefix path you suggested. No per-backend code edits needed.Thanks for the catch.