Skip to content

[roadmap] Dual + Tensor operators + mutable params #161

Closed

Description

@godofecht

Dual + Tensor operators + mutable params

Priority: P2 · Kind: language
Sketch: pattern-adoption.md §9

Why

dual_add(dual_mul(…)) and immutable param_set rebuilds make AD/NN stdlib verbose even after #170.

Target

let y: Dual = sin(a * a + b)
struct Net { mut w: … }  # or param vector view

Work

  • Operator overloading / sugar for Dual (+ * and math builtins)
  • Mutable struct fields or param-vector updates in nn.flow
  • Dense via tensor/BLAS matmul where loops remain

Exit

AD call sites look like math; nn.flow drops multi-way struct rebuilds.

Related

#170 ML demo honesty (do first)

ROADMAP-SYNC: dual-tensor-operators-mutable-params

Activity

  1. added
    roadmap
    enhancement
    on Aug 5, 2026
  2. godofecht commented on Aug 5, 2026

    @godofecht
    ContributorAuthor

    Dual operator sugar (+ - * / and unary -) landed in #196. Mutable nn param_set rebuilds / Tensor ops still open on this issue.

  3. godofecht commented on Aug 5, 2026

    @godofecht
    ContributorAuthor

    Mut field nn step/param_set landed in upcoming PR (with #160 plant binding). Dual ops already shipped in #196. Tensor operators still open on this issue.

  4. godofecht commented on Aug 5, 2026

    @godofecht
    ContributorAuthor

    Tensor element-wise ops + scale in upcoming PR; Dual/mut already shipped. loss.grad left as optional follow-on if desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementroadmap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions