Skip to content

chore: Allow Nx 1.0 - #42

Merged
cocoa-xu merged 4 commits into
elixir-nx:mainfrom
georgeguimaraes:nx-1.0
Sep 15, 2026
Merged

cocoa-xu merged 4 commits into
elixir-nx:mainfrom
georgeguimaraes:nx-1.0

Conversation

@georgeguimaraes

@georgeguimaraes georgeguimaraes commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Nx 1.0.0 is out and the optional nx ~> 0.4 keeps it out of the resolver for anyone with both stb_image and Nx 1.0 in a project. Scholar hits this through scidata. This widens it to ~> 0.4 or ~> 1.0 and moves the lock to 1.0.0.

One real change: the Nx.LazyContainer template didn't carry the height, width, channels axis names that to_nx/2 sets, so an image going through a jitted function came out unnamed. Nx 1.0 compares names in tensor equality and the lazy container test caught it. The template now has the names.

CI moves to Elixir 1.17, Nx 1.0's floor, on OTP 25 and 27. Precompiling on OTP 25 still covers OTP 24 since both are NIF 2.16.

Widens the optional nx requirement to ~> 0.4 or ~> 1.0. The Nx.LazyContainer template now carries the height, width and channels axis names that to_nx/2 sets, so an image passed through a jitted function comes out with the same names as to_nx, which Nx 1.0's tensor equality checks.
Nx 1.0 needs Elixir 1.17, so the test and precompile jobs move from 1.13/1.15 on OTP 24/26 to 1.17 on OTP 25/27. Precompiling on OTP 25 still covers OTP 24 users since both are NIF 2.16.
Comment thread .github/workflows/ci.yml Resolved
ubuntu-20.04 and macos-13 runners are gone, so the jobs never start. The
Linux job now runs on ubuntu-latest inside an ubuntu:20.04 container to
keep the old glibc, and macOS moves to macos-15-intel.
Comment thread .github/workflows/ci.yml Resolved
@josevalim

Copy link
Copy Markdown
Contributor

CI is still failing. Im guessing we don't have old enough versions for beam-setup as well. It is probably fine to dump ubuntu-20 though?

@cocoa-xu also, shall we release v1.0 of this library?

erlef/setup-beam refuses to run in a container it doesn't recognize, so
both Linux jobs now use the elixir-lang.org install script, which pulls
the ubuntu-20.04 builds from builds.hex.pm. precompile.yml gets the same
container and macos-15-intel.
Comment thread .github/workflows/precompile.yml Resolved
@cocoa-xu

cocoa-xu commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

CI is still failing. Im guessing we don't have old enough versions

I do😛, I have almost all versions from OTP 23 on https://github.com/cocoa-xu/otp-build

@cocoa-xu also, shall we release v1.0 of this library?

lets do that!

@cocoa-xu
cocoa-xu merged commit d8cc596 into elixir-nx:main Sep 15, 2026
6 checks passed
@georgeguimaraes

Copy link
Copy Markdown
Member Author

🤘

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.

3 participants