Skip to content

Add standalone per-case golden scripts for 4.5-4.9 samples#251

Open
HecreReed wants to merge 8 commits intozhangstevenunity:mainfrom
HecreReed:codex/per-case-golden-standalone-draft
Open

Add standalone per-case golden scripts for 4.5-4.9 samples#251
HecreReed wants to merge 8 commits intozhangstevenunity:mainfrom
HecreReed:codex/per-case-golden-standalone-draft

Conversation

@HecreReed
Copy link
Contributor

Summary

  • add standalone per-case *_golden.py / *_compare.py under test/samples/* for the PTO manual 4.5–4.9 cases
  • make generate_testcase.py prefer sample-local custom assets and emit validation_meta.env
  • make remote validation honor custom golden/compare scripts instead of self-copying NPU outputs as golden
  • sync sample-local custom assets into the CI payload

Validation

  • python3 -m py_compile test/npu_validation/scripts/generate_testcase.py test/samples/*/*_golden.py test/samples/*/*_compare.py
  • smoke: standalone golden.py + compare.py for VectorAddition/vectorAddition and Cmp/cmp
  • integration smoke: generate_testcase.py with custom asset pickup for representative cases in local temp dirs
  • remote subset via test/npu_validation/scripts/run_remote_npu_validation.sh using handcrafted payload:
    • pass: shls, vectorAddition, sel, expands
    • diff remaining: colsum, cmp

Notes

  • this PR is Draft because colsum and cmp still show golden diff in the remote subset run and need follow-up

@HecreReed HecreReed marked this pull request as ready for review March 12, 2026 12:10
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9643c7cee3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

out_m[0, :] = reduced + out_m[0, :]
out = out_m.reshape(-1)
elif out.size == COLS:
out = reduced + out

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Compute pure column reduction in colsum golden

The custom colsum oracle currently adds the reduced sum to an initialized destination buffer (reduced + out), but pto.tcolsum semantics are dst[0,j] = sum_i src[i,j] with tmp only as workspace (see docs/PTO_IR_manual.md), so this produces an incorrect golden for this case and causes deterministic compare failures when validating colsum.

Useful? React with 👍 / 👎.

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