Rename hooks to io_call#1774
Draft
Chapaman wants to merge 12 commits into
Draft
Conversation
Route hook side effects through exla_runtime_callback instead of the outfeed u16-flag protocol. Outfeed remains only for lazy-transfer infeed. Unifies runtime_call and hook callbacks on the same server path. Co-authored-by: Cursor <cursoragent@cursor.com>
Restore the missing run_runtime_callback/4 header in outfeed.ex and move add_host_hook_callback/6 after all cached_recur_operator/4 clauses. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Drop %Nx.Defn.Token{}, create_token/attach_token, and the :token expr
op in favor of side-effect :hook nodes that preserve hook/3 and :hooks.
Update EXLA lowering to compile :hook via host_callback.
Co-authored-by: Cursor <cursoragent@cursor.com>
Rebase token removal onto merged EXLA host-callback work. Keep :hook lowering, accept main naming in outfeed, drop unused after_all helper. Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce Nx.io_call/2-3 and :io_calls as the primary API while keeping deprecated hook/2-3, :hooks, and token shims for backward compatibility. Stacked on top of elixir-nx#1767 token plumbing removal. Co-authored-by: Cursor <cursoragent@cursor.com>
polvalente
reviewed
Jul 7, 2026
Comment on lines
-3906
to
3918
| ```elixir | ||
| tensor = Nx.tensor([10, 20, 30]) | ||
| Nx.pad(tensor, 0, [{2, 1, 3}]) | ||
| #Nx.Tensor< | ||
| s32[11] | ||
| [0, 0, 10, 0, 20, 0, 30, 0, 0, 0] | ||
| > | ||
| # └ low ┘ └ interior ┘ └ high ┘ | ||
| ``` | ||
|
|
||
| Padding widths can be negative. If they are negative, | ||
| the tensor is clipped on either end according to the | ||
| padding width. Interior padding widths cannot be negative. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary: