{ "newestReleaseInSnapshot": "1.1.0", "nightlyBeyondPin": { "entries": [], "provenance": { "commit": "527d069ee11a41ac5320af1f9402db0a66b2b868", "license": "Apache-2.0 WITH LLVM-exception (per file headers; confirm the docs carry the same licence)", "path": "docs/site/nightly-changelog.md", "repo": "modular/modular", "source": "modular", "zipSha256": "a3cd3f55f30fce42d522ec4f67241c4aaeebe3c9a637b1433d6c0181b4904f75" } }, "notes": { "provenance": { "commit": "527d069ee11a41ac5320af1f9402db0a66b2b868", "license": "Apache-2.0 WITH LLVM-exception (per file headers; confirm the docs carry the same licence)", "path": "docs/site/nightly-changelog.md", "repo": "modular/modular", "source": "modular", "zipSha256": "a3cd3f55f30fce42d522ec4f67241c4aaeebe3c9a637b1433d6c0181b4904f75" }, "sections": [ { "anchor": "", "bullets": [], "level": 2, "title": "Highlights" }, { "anchor": "", "bullets": [], "level": 2, "title": "Documentation" }, { "anchor": "", "bullets": [ "Added `match` / `case` pattern matching, including `comptime match` for compile-time subjects.", "Mojo supports list destructuring assignments and list patterns for collections that conform to `Sized` and that are subscriptable.", "`if case` and `while case`: Conditional patterns are also available in `if`, `elif`, and `while` statements using `case pattern = value`.", "The message on a `where` clause can now be written `where else \"\"`, as the preferred alternative to the existing `where (, \"\")`, which will be deprecated over time.", "A struct can now opt out of a trait by writing `not ` in its conformance list." ], "level": 2, "title": "Language enhancements" }, { "anchor": "", "bullets": [ "The `async` and `await` keywords are renamed to `__async` and `__await` to mark async support as unstable.", "The empty tuple `()` now always refers to a tuple value and not a type." ], "level": 2, "title": "Language changes" }, { "anchor": "", "bullets": [], "level": 2, "title": "Library stabilizations" }, { "anchor": "", "bullets": [ "`Defaultable` now provides a default `__init__()` implementation that default-constructs each field using reflection.", "The enum-behaving structs across the standard library, MAX kernels, and MAX runtime now conform to `EnumLike`, so they support enum-style pattern matching (`match` with `case .NAME`) and reflective case metadata: `Scope`, `FastMathFlag`, and `TestResult` in the standard library; `AllReduceAlgorithm`", "`Array` now supports slicing with contiguous slices, returning a `Span` over the selected elements whose mutability matches the array reference:", "`Tuple` gained `first_of[T]()`, which returns a reference to the first element of type `T`.", "`SIMD.from_bytes()` and `SIMD.as_bytes()` now take an `endian` parameter of the new `Endian` type (`Endian.big` or `Endian.little`) instead of the `big_endian` `Bool`:", "`SIMD` gained `to_endian()` and `from_endian()`, which convert an integer value to and from a given byte order.", "Hashing a byte sequence is now spelled `hash_bytes()`, which takes an `ImmSpan[Byte]`.", "`std.hashlib` was renamed to `std.hash`", "`Hasher.finish` no longer takes its argument by movable convention", "`Hasher` no longer requires an `__init__` method.", "`Coord.product()` has a new parameterized overload, `product[T: DType]()`, which accumulates and returns the product at `T` rather than at `Coord.DTYPE`:", "`StringSpan` now only provides immutable byte access.", "`FileDescriptor` is now `RawFileDescriptor`, and it stores its underlying descriptor as a `c_int`, matching the C `int` type that the underlying descriptor APIs take.", "Introduced a new `CompilationTarget` public type, which is now used in most APIs that are parameterized on compilation target, such as `size_of()`, `align_of()`, `compile_info()`, and more.", "Added new `TargetAccelerator` type for representing accelerator metadata at compile time, combining `GPUInfo` and `CompilationTarget` values.", "`Layout` now carries its alignment as a keyword-only parameter of the new `Alignment` type, instead of storing it as a runtime field.", "`Coord` has a new `replace_dynamic[at](value)` method, the in-place counterpart to `replace`.", "`Span` has a new `unsafe_deinit_elements()` method, which destroys every element in place and leaves the memory uninitialized.", "`Span` has new methods for initializing a span of `MaybeUninit[T]` elements and viewing the result as a span of `T`:", "The default `Writable` implementation now formats `EnumLike` types by their active case rather than their fields.", "`Tuple.consume_elements()`, `Tuple.deinit_with()`, and `VariadicPack.consume_elements()` now take the element handler as a runtime closure argument instead of a compile-time `capturing` parameter, matching `List.deinit_with()` and `VariadicList.consume_elements()`:", "`SIMD.reduce()` now takes a closure reduction function as a runtime argument instead of a compile-time `capturing` parameter.", "The TMA descriptor types `TMATensorTile`, `TMATensorTileArray`, `TMATensorTileIm2col`, and `SplitLastDimTMATensorTile` in `max.kernels.layout.tma_async` now take `tile_shape` and `desc_shape` as flat `Coord` values instead of `IndexList[rank]`, and the separate `rank` parameter is gone (rank is now ", "`std.math.scalb()` is now implemented in Mojo and runs on GPU as well as CPU.", "`std.utils.numerics.nextafter()` no longer calls the system libm and now runs on GPU as well as CPU.", "`std.math.atan()` and `std.math.atan2()` no longer call the system libm and now run on GPU as well as CPU.", "`std.math.gamma` no longer calls the system libm and now runs on GPU as well as CPU.", "`float64` `expm1()` in `std.math` no longer calls the system libm and now runs on GPU as well as CPU.", "`std.math.logb` no longer calls the system libm and now runs on GPU as well as CPU.", "`std.math.lgamma()` no longer calls the system libm and now runs on GPU as well as CPU.", "The Bessel functions `j0`, `j1`, `y0`, and `y1` in `std.math` no longer call the system libm and now run on GPU as well as CPU.", "`std.math.log10()` no longer calls the system libm or GPU intrinsics: CPU and every GPU now run the same Mojo implementation, accurate to within 1 ulp on measured targets, and `float64` `log10()` now runs on AMD GPUs.", "`float64` `erfc()` no longer calls the system libm and now runs on GPU as well as CPU, and `float64` `erf()` now uses a `float64` approximation and is accurate to about 1 ulp.", "`std.math.tan` no longer calls the system libm and now runs on GPU as well as CPU.", "`cbrt()` no longer calls the system libm and now runs on GPU for every floating-point type, including `float64`.", "`std.math.remainder()` no longer calls the system libm and now runs on GPU as well as CPU.", "`std.math.hypot` no longer calls the system libm and now runs on GPU as well as CPU.", "`float64` `log()` now uses double-precision coefficients and is within 1 ulp of the correctly rounded result; it was previously off by up to about 2e7 ulp.", "`log1p()` now evaluates in the input's own precision with a Mojo implementation based on musl, shared by CPU and GPU, and is accurate to within 1 ulp for `float32` and `float64`.", "`atanh()` in `std.math` no longer calls the system libm for `float64`, so its `float64` form now runs on GPUs that have `float64` as well as on CPU.", "`std.math` `acosh` and `asinh` no longer call the system libm and now run on GPU as well as CPU." ], "level": 2, "title": "Library changes" }, { "anchor": "", "bullets": [ "The `mojo` compiler now uses jemalloc as its allocator on Linux.", "The Mojo language server now reports a value's address space as a semantic token modifier (`addressSpace0` through `addressSpace15`, matching the `AddressSpace` index) so editors can color shared, local, and constant memory differently." ], "level": 2, "title": "Tooling changes" }, { "anchor": "", "bullets": [ "Removed `has_nvidia_gpu_accelerator()`, `has_amd_gpu_accelerator()` and `has_apple_gpu_accelerator()` from `std.sys`, including the sub-architecture overloads of the NVIDIA variant.", "Removed `sum()` from the `CoordLike` trait and from its implementations (`Coord`, `ComptimeInt` and the `All` marker)." ], "level": 2, "title": "Removed" }, { "anchor": "", "bullets": [ "`c_char` now reflects the target's actual `char` signedness: unsigned by default on Linux running on ARM (AAPCS64), signed everywhere else Mojo currently targets (x86-64 Linux, macOS on Apple silicon).", "`atof()` now rounds large mantissas correctly.", "Splitting on an empty separator no longer puts the trailing empty slice out of bounds.", "`atof()` accepts numbers with more than 19 significant digits, which previously raised \"The number is too long\".", "Struct layouts that recurse only through a parametric indirection now compile.", "Passing `x^` to an `imm` or `ref` argument now warns that the move has no effect instead of it being silently ignored.", "On macOS, `scalb()` now returns NaN for a non-integral exponent, as it does on Linux.", "`float32` `expm1()` no longer overflows early for inputs just below 88.7, and it now returns `-0.0` for `-0.0` and `inf` for `inf`.", "`float32` `erfc()` is now accurate in its tail, for large positive inputs, and returns subnormal results instead of flushing them to zero.", "`cbrt()` of `inf` and `-inf` now returns `inf` and `-inf` instead of `Float32.MAX` and `-Float32.MAX`, and `float32` `cbrt()` is correct near `Float32.MAX` and for subnormal inputs.", "`log()`, `log2()`, and `log1p()` of `inf` now return `inf` instead of `nan`.", "`float64` `log1p()` is now accurate for inputs whose `1 + x` falls in `[sqrt(2)/2, sqrt(2))`, where it was off by up to about 7e9 ulp.", "`SIMD.insert()` now compiles when the inserted value is a `Scalar`, and on Apple GPUs.", "Fixed Mojo tools sending the headers in `OTEL_EXPORTER_OTLP_HEADERS`, or its signal-specific forms, to Modular's telemetry collector." ], "level": 2, "title": "Fixed" } ] }, "notesFrom": "nightly-changelog", "pin": "1.2.0", "snapshot": "same" }