Skip to content

Support normalized operands in Add and Mul - #130

Open
Johnkothapalli wants to merge 1 commit into
posit-dev:mainfrom
Johnkothapalli:fix/add-mul-operand-normalization
Open

Support normalized operands in Add and Mul#130
Johnkothapalli wants to merge 1 commit into
posit-dev:mainfrom
Johnkothapalli:fix/add-mul-operand-normalization

Conversation

@Johnkothapalli

Copy link
Copy Markdown

Summary

  • route Add and Mul operands through GraphVariables.consume_operand_values(), matching Div and Sub
  • support scalar, list, computed-column, and grouped-column operands with width-one broadcasting
  • add executed-value regression coverage for the complete operand matrix and retain true width/type failures
  • correct the MatMul module and coefficient-tensor wording

Closes #126.

Validation

  • uv run pytest — 364 passed, 29 skipped
  • uv run bash examples/test_examples.sh — all 11 examples passed (Git Bash used because .sh is not directly executable on Windows)
  • uv run ruff check . — passed
  • uv run ruff format --check . — 65 files already formatted
  • uv run mypy — no issues in 47 source files
  • uv run pre-commit run -a — Ruff hooks passed; the MyPy hook could not launch on native Windows because it hard-codes .venv/bin/mypy, so the same MyPy command was run directly above

AI assistance: Codex helped analyze the existing Div/Sub pattern, implement the change, and prepare tests. The full diff was independently reviewed and verified with the checks listed above.

@amol-

amol- commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

@Johnkothapalli there seem to be conflict with the recently shipped improvements to the Optimizer. It should not be too hard to address those, it's primarily a matter of calling fold_operations in the right way

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.

Align Add and Mul translators with the consolidated Div/Sub implementation

2 participants