max/v26.5.0
Breaking Changes📦 mojo-languageView on GitHub →
⚠ 4 breaking✨ 14 features⚡ 2 deprecations🔧 13 symbols
Summary
Mojo 1.0 is released, featuring stable standard library APIs, lambdas, pointer unification, and significant performance improvements. Most GPU programming APIs have moved to the new `max` accelerator library.
⚠️ Breaking Changes
- GPU programming APIs have been moved from the Mojo standard library to the new `max` package. This includes `std.algorithm` to `max.algorithm`, `std.benchmark` to `max.benchmark`, `std.gpu.{compute,host,memory,sync}` to `max.gpu.*`, and the `layout` package. Update your imports accordingly.
- Pointer unification may require changes to how pointers are handled, especially regarding interior origins.
- Required `var` declarations: You may now need to explicitly declare variables with `var` where previously it might have been inferred or optional. Check compiler errors for guidance.
- Constraint improvements might affect how generic types and functions are constrained. Review your generic code for compatibility.
Migration Steps
- Update imports from `std.algorithm` to `max.algorithm`.
- Update imports from `std.benchmark` to `max.benchmark`.
- Update imports from `std.gpu.{compute,host,memory,sync}` to `max.gpu.*`.
- Update imports for the `layout` package to its new location within `max`.
- Address compiler errors related to required `var` declarations.
- Review and potentially update code affected by pointer unification and interior origins.
- Review and potentially update code affected by constraint improvements.
✨ New Features
- Mojo 1.0 release.
- Standard library APIs are being marked as stable, ensuring backward compatibility for a growing set of APIs.
- Introduction of lambdas.
- Pointer unification.
- Interior origins.
- Required `var` declarations.
- Constraint improvements.
- Faster Python interop.
- Extended Apple silicon GPU support back to M1 devices.
- Added hardware-MMA flash-attention prefill for M5 to speed up TTFT.
- New agent skills in the MAX accelerator library's skills repo: `serve-model`, `benchmark-model`, `eval-model`, and `profile-model`.
- Expanded model coverage and capabilities in the MAX accelerator library.
- Significant speedups for the Python API's experimental eager interpreter.
- Speedups for various kernels across NVIDIA, AMD, and Apple GPUs.
Affected Symbols
⚡ Deprecations
- Previous locations of GPU programming APIs in the standard library are deprecated.
- Deprecated aliases may exist for breaking changes, accompanied by compiler fix-its for mechanical migration.