Skip to content

Fix native DXCGC constant initialization and bound parser input - #1476

Open
Qiong Wu (qiowu) (DingmaomaoBJTU) wants to merge 2 commits into
mainfrom
codex/dxcgc-fp32-constant
Open

Qiong Wu (qiowu) (DingmaomaoBJTU) wants to merge 2 commits into
mainfrom
codex/dxcgc-fp32-constant

Conversation

@DingmaomaoBJTU

@DingmaomaoBJTU Qiong Wu (qiowu) (DingmaomaoBJTU) commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Fix native Raw setup for inline FP32 constants such as Samsung ImageEncoder's 0.35355338454246521, and restore the missing initializer-line length guard in the constant-export fallback.

Single-element FP32 literals are parsed using the classic locale and serialized through the existing upload path. FP16 exact-representation checks remain intact. Nonfinite/out-of-range values and unsupported layouts fail explicitly.

Initializer signatures of 4096 bytes or longer no longer enter MSVC's recursive regex matcher. Oversized unsupported targets fail with a normal diagnostic instead of risking stack overflow; unrelated oversized signatures can be skipped while locating a supported initializer. This guard does not add support for arbitrary large initializer signatures.

Validation: Release EXE and DLL build; CTest passes, including the exact FP32 constant, signed zero, minimum subnormal, invalid literals and a 100,000-character initializer regression. Before the guard-only follow-up, Samsung ImageEncoder passed both Raw and DML-only GPU runs (100 measurements/10 warmups), with CPU cosine approximately 0.999999999992. CLIP/Kokoro have not been rerun with the restored guard, so full-model success is not claimed.

@timenick Zhipeng Wang (timenick) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed 066dd71; no actionable findings. Native Release EXE and bridge built successfully. Pytest validation passed all 4 cases, covering existing native regressions, generated FP16/FP32 values and boundaries, and invalid inputs. All CI checks passed. Full-model GPU inference was not verified locally.

🤖 Generated with Codex

@DingmaomaoBJTU Qiong Wu (qiowu) (DingmaomaoBJTU) changed the title Fix native DXCGC inline FP32 constant initialization Fix native DXCGC constant initialization and bound parser input Oct 16, 2026

This branch has not been deployed

No deployments
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.

2 participants