docs(performance): record packet boundary checks and dynamic timeout

This commit is contained in:
KOKO\Mimi
2026-10-14 21:25:21 +09:00
parent 446d3fa059
commit 96686c12ea
@@ -418,3 +418,79 @@ system으로 가정하거나 전역 PARDISO threshold/thread 정책을 바꾸지
검사 실행으로 표시하지 않는다. 최종 전체 Debug/CTest, Hex8 필수 원본 5개 비교,
동적 101-frame 비교, 최종 VTune과 공식 단일 시간 측정은 아직 이 작업의 개발
검증으로 완료되지 않았다.
## 특수 pair material tangent의 4열 packet과 ISA 경계
Nonlinear Hex8의 material tangent 네 열을 독립 lane으로 계산하는 private packet을
추가했다. 일반 Float64 제품과 선형 해법은 MKL을 유지하며, packet은 normalized
high/low 특수 정밀도 예외에만 사용한다. 각 lane의 세 제품, `(first+second)+third`,
weight 제품과 기존 누적 Add 순서는 원래와 같다. Low-zero별 기존 MultiplyPair
분기 graph를 유지하며 mixed branch와 특수 입력은 원래 scalar graph로 연결한다.
Lane reduction, 대칭 복제, 새 모델 실패 gate는 추가하지 않았다.
최초 생산 `9b8e53`와 검사 `c0e23503` 후보의 Debug·Release 관련 74개 검사는
각각 native 0이었다. 실제 AVX2 선택과 4630 packet oracle, 16 uniform low-zero
fixture, 4 overflow lane 위치를 확인했다. 원본 whole-response 9804행도 일치했다.
Snapshot wrapper의 native null과 저장층 BOM/추가 newline 실패를 원본 실패 자료로
유지하고 별도 exact-stream assertion native 0으로 연결했다.
[과거 snapshot native](../../.harness/performance/t3/packet-snapshot-repaired-native.json),
[과거 exact assertion](../../.harness/performance/t3/packet-snapshot-comparison-native.json)은
새 소스의 통과로 소급하지 않는다.
최초 Release codegen에서 실제 ANDN과 AVX2 TU가 공통 inline math 실행 COMDAT를
방출하는 경계 문제를 발견해 해당 후보의 동적 전체 실행을 시작하지 않았다.
[MSVC /arch 문서](https://learn.microsoft.com/en-us/cpp/build/reference/arch-x64?view=msvc-170)는
AVX2 설정에서 BMI 등의 비벡터 명령이 생성될 수 있음을 설명한다. 지원 gate는
FMA·XSAVE·OSXSAVE·AVX·AVX2·OS XCR0와 BMI1/BMI2를 요구하고, 지원하지 않으면
기존 scalar backend를 선택한다.
보강 후보 `446d3fa059fce8141ed30d985dc8a4fa7e26a719`는 private header를 plain
C-array POD로 제한하고 공통 math/HighLow/std::array 정의를 AVX2 TU에서 제거했다.
기본 ISA out-of-line noinline 연결 함수가 checked Add/MultiplyPair/TwoProduct를
lane 0..3 순서로 호출한다. Raw high/low는 field별로 보존한다. AVX2 내부 finite·
normalized·least-bit exponent 판정은 원래 body와 guard 순서를 유지한다.
POD는 trivial carrier이며 public API·공통 math·CMake·FP flags는 이 보강에서 불변이다.
[고정 manifest](../../.harness/performance/t3/packet-boundary-446d3fa/manifest.json)와
[독립 source 검토](../../.harness/performance/t3/source-numerical-review-packet-boundary.md)를 보존한다.
Source-only PASS는 native 실행이나 ISA 검증을 대체하지 않는다.
Corrected-prefix Debug·Release build는 각각 8개 edge와 native 0이었다.
실제 discovery의 관련 76개 검사는 Debug 10.18초, Release 4.24초로 각각 전부
native 0이었다. 새 synthetic capability·frozen scalar bridge raw-bit 검사와 기존
Hex8·paired·HighLowArithmetic 검사를 포함한다. 두 binary 모두 실제 AVX2 evaluator를
선택했고 packet oracle 4630개·uniform fixture 16개·overflow 위치 4개를 확인했다.
[Debug native](../../.harness/performance/t3/packet-boundary-debug-native.json),
[Release native](../../.harness/performance/t3/packet-boundary-release-native.json),
[Debug backend](../../.harness/performance/t3/packet-boundary-debug-backend.json),
[Release backend](../../.harness/performance/t3/packet-boundary-release-backend.json)을 보존한다.
이는 내부 helper telemetry가 아니라 실제 backend 선택과 source/codegen에 연결한
구체 fixture 검사 범위다.
두 구성의 전체 symbols/disassembly 명령은 모두 native 0이었다. AVX2 객체의
정의된 external 실행 심볼은 전용 EvaluateMaterialPacketAvx2 하나이며 공통 math·
HighLow 생성자·std::array 실행 정의는 없었다. Scalar bridge는 UNDEF 외부 참조이며
상수 data와 CRT 외부 참조를 실행 정의와 구분했다. Baseline dispatch의 AVX/YMM/ANDN
명령은 0개이고 kernel fused instruction은 명시 Product residual VFMSUB 하나다.
일반 mul/add contraction은 확인되지 않았다.
[경계 assertion](../../.harness/performance/t3/packet-boundary-codegen-assertion.json)은 전체
symbol 목록과 disassembly를 연결한다. 기존 precise와 compiler flags는 유지했다.
새 Debug LIB와 정합한 현재 header로 candidate snapshot을 compile/run한 native는
각각 0이다. 성공 native 0과 original header/LIB/probe identity가 연결된 기존 old
oracle를 재사용했으며 old 실행은 반복하지 않았다. ProcessStartInfo stdout을 처음부터
BOM이나 추가 newline 없이 저장했다. 새 candidate와 원본의 raw response 9804행은
바이트 단위로 같고 SHA는 둘 다 `DED8D2C380D15E297A73BDD018B1B840C1ADC0D8372934D9FC2EF2B628A36F63`이다.
비교 assertion wrapper native 0을 [새 snapshot native](../../.harness/performance/t3/packet-boundary-snapshot-native.json)와
[새 비교](../../.harness/performance/t3/packet-boundary-snapshot-comparison.json)에 연결했다.
같은 고정 Release binary로 원본 동적 입력을 워밍업 없이 한 번 실행했다.
150.0500624초에 제한 시간으로 중단됐고 target/측정 wrapper native는 1이다.
Execution_valid는 false이고 최종 HDF5가 없어 101-frame U 비교는 미실행이다.
100초 목표는 미달이다. [개발 실행](../../.harness/performance/t3/development-dynamic-packet-boundary.json),
[wrapper native](../../.harness/performance/t3/dynamic-packet-boundary-native.json),
[before identity](../../.harness/performance/t3/development-dynamic-packet-boundary-before.json),
[after identity](../../.harness/performance/t3/development-dynamic-packet-boundary-after.json)를 보존한다.
Source/input/header/exe/DLL/build/runtime/thread/power identity가 전후 같았으며 원본과
scratch SHA도 같았다. 종료 후 관련 프로세스 0개를 확인하고 CPU 권한을 반환했다.
추가 profile/micro 또는 전체 시간 실행은 하지 않았다. 제한 시간에 중단된 후보끼리의
개선 비율을 계산하지 않는다. 최종 전체 검사·필수 원본 비교·공식 시간 목표는 미완료다.