Skip to content

[WIP] Tensor datatypes, conditionals, and simple nonlinear operations#100

Draft
davschneller wants to merge 28 commits intomasterfrom
davschneller/nonlinearity
Draft

[WIP] Tensor datatypes, conditionals, and simple nonlinear operations#100
davschneller wants to merge 28 commits intomasterfrom
davschneller/nonlinearity

Conversation

@davschneller
Copy link
Contributor

Draft due to some work still needing to be completed. This PR adds:

  • tensor-level datatypes. (and addressing; even though that might work better on a kernel level).
  • very simplistic conditional execution (mainly interesting for the GPU kernels). Not happy with the required CNF/boolean handling implementation; but I guess everything else might need even more refactoring.
  • abstract the external API a bit more.
  •  add elementwise nonlinear operations, as well as a datatype cast.
  • [partially done; the generalization is still missing] Allow matrix multiplications with different precisions, on different rings (e.g. and/xor), and more reduction types; i.e. introduce Elementwise (Op) and Reduction (Op) / Accumulate (Op) operations; both operating on some pre-defined operation. Thus, some of the previous linear operations also become special cases of this: Product -> Elementwise (Mul), ScalarMultiplication -> Elementwise (Mul) (maybe) and IndexSum -> Reduction (Add) as well as Add -> Accumulate (Sum).
  • [maybe TODO: add simple emulation routines?]

Besides, refactor all format strings.

@davschneller davschneller force-pushed the davschneller/nonlinearity branch from 9def0e6 to 2173c04 Compare February 21, 2026 19:09
@davschneller davschneller force-pushed the davschneller/nonlinearity branch from 2173c04 to 4cf025c Compare February 23, 2026 21:41
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.

1 participant