Skip to content

v1.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Nov 06:19
· 2 commits to master since this release
577ed54

Complete from-scratch rewrite targeting ExecuTorch 1.6.0 and Ruby >= 3.2.

Highlights

  • Precompiled platform gems for x86_64-linux, aarch64-linux, and arm64-darwin bundling the official ExecuTorch 1.6.0 shared SDK (XNNPACK, optimized & quantized kernels, CoreML/MLX on Apple Silicon) — gem install executorch works out of the box with no Python, CMake, or Buck2 required.
  • Direct Ruby C API native extension (dropped Rice; zero runtime gem dependencies) backed by a noexcept C++17 core and strict symbol visibility (Init_executorch only).
  • Concurrency & zero-copy I/O: releases the GVL (rb_thread_call_without_gvl) during module load, method load, and execution with per-method thread safety; supports zero-copy IO::Buffer (Tensor.from_buffer/#to_buffer) and pre-allocated out: output reuse.

Breaking Changes

  • Replaced Executorch::Model with Executorch::Module (Module.open, Module.from_bytes, #call, #forward, #execute, #meta, #load_method, #unload_method, #close).
  • Canonical tensor dtype symbols are now explicit-width (:float32, :float64, :float16, :bfloat16, :uint8, :int8, :int16, :uint16, :int32, :uint32, :int64, :uint64, :bool). Short aliases (:float, :double, :int, :long, etc.) remain accepted on input.
  • Raised minimum Ruby version to >= 3.2.0.
  • Removed rice dependency and leaked internal methods (_original_to_a, Tensor.create, Tensor.from_array, NATIVE_VERSION, NativeError).

Added

  • Support for all 13 numeric/boolean dtypes, 0-D scalar tensors (Tensor#item), non-contiguous / NHWC dim_order normalization, value equality (Tensor#==), Tensor.zeros/ones/full, Tensor.from_bytes/#to_bytes, and optional Numo::NArray/Torch::Tensor adapters.
  • Module.open defaults to :mmap (supporting Pathname, all LoadModes, and external .ptd data_files), plus Module.from_bytes (BufferDataLoader) and MethodMeta / TensorInfo introspection.
  • Native memory pressure reporting (dsize + rb_gc_adjust_memory_usage), GC.compact safety, and deterministic #close / block-form Module.open.
  • Runtime introspection (Executorch.backends, .kernel_count, .num_threads, .num_threads=, .executorch_version), PAL initialization, and thread-local PAL error log capture attached to typed Executorch::Error subclasses.

Full Changelog: https://github.com/benngarcia/executorch-ruby/blob/v1.0.0/CHANGELOG.md