diff --git a/docs/calculation-performance/hex8-performance.md b/docs/calculation-performance/hex8-performance.md index 2cd86c1..4d86043 100644 --- a/docs/calculation-performance/hex8-performance.md +++ b/docs/calculation-performance/hex8-performance.md @@ -656,3 +656,61 @@ Dot3-term과 geometric9-term의 독립 b4 lane을 기존 zero-start·component/j 각 기존 diagonal accumulator Add에 쓰는 작은 대안도 명시했다. High/low 정밀도는 유지하며 일반 Float64 MKL 경로를 바꾸지 않는다. 이는 아직 구현·검증 전인 제안이고 현재 source를 변경하지 않았다. Whole-model 추가 반복이나 profile 추가 수집은 없다. + +## 기하 수축 packet 구현과 Release 상태 차이 수정 + +위 제안을 `9677265`에서 구현했다. 독립 b4 lane은 기존 `dots[b]` 및 material의 +`col=3*b+k`와 연결하며, gradient-stress의 원래 준비 제품과 Dot의 component 순서, +geometric의 j,l 순서 및 zero-start를 보존한다. 동일 `geo*weight`는 공유하지만 세 +diagonal accumulator의 Add는 각각 수행한다. Unsupported 환경과 linear 응답은 +원래 scalar loop를 사용한다. Private POD·baseline bridge·AVX2 경계를 유지하고 +일반 Float64 MKL, CMake, 공통 math 및 public ABI를 바꾸지 않았다. + +이 후보의 Debug 관련 81개 검사는 통과했으나 Release는 80/81 통과였다. +Ordered overflow fixture에서 raw bit는 같고 selected FE21/baseline5 및 MXCSR41/40, +prior 상태에서는43/42로 INVALID 차이가 있었다. 당시 wrapper가 stderr를 먼저 +예외 처리하여 CTest native는 unknown, wrapper native는1이었다. 이 실패를 현재 +통과로 소급하지 않는다. [실패 XML](../../.harness/performance/t3/packet-geometric-release-gtest/fesa_unit_tests_53.xml), +[실패 binary 보존](../../.harness/performance/t3/packet-geometric-9677265/failure-release/manifest.json)을 유지한다. +후속 Release codegen·snapshot·전체 모델·profile은 당시 수행하지 않았다. + +최소 수정 `0c29a9f`는 private AVX2 cpp와 기존 Hex8 검사 두 파일에 한정한다. +Vector TwoSum의 첫 sum이 nonfinite이면 error 계산 전에 false를 반환한다. 각 Add의 +head/tail/middle/joined/final 위치와 Product의 마지막 TwoSum 실패는 원래 입력과 +mode로 기존 noinline scalar bridge를 호출한다. Partial 결과를 재사용하지 않으며 +조건부 Debug 분기, flags clear, 기대값 완화, 산술식 및 진단 gate 변경은 없다. +[고정 manifest](../../.harness/performance/t3/packet-geometric-fix-0c29a9f/manifest.json)와 +[독립 source 검토](../../.harness/performance/t3/source-numerical-review-packet-geometric-fix.md)는 +10개 hash의 전후 일치와 source-only PASS를 기록한다. + +새 검사는 normalized near-max joined overflow, N=2^-1022와 d=2^-1074에 의한 +subnormal error, 다른 lane의 성공 prefix 이후 overflow, 각 lane 위치 및 prior 상태를 +포함한다. 원래 세 weight 제품과 서로 다른 세 accumulator의 raw bit·FE_ALL_EXCEPT· +MXCSR status를 기준으로 삼았다. 첫 narrow 실행은 Debug·Release 각각2/2, +actual AVX2의 기존 실패6개와 새 prefix34개가 통과했다. 이후 실제 discovery는 +82개였고 Debug 82/82(10.43초), Release 82/82(4.46초), 모든 단계 native0이었다. +[Debug 명령/native](../../.harness/performance/t3/packet-geometric-fix-full-debug-native.json), +[Release 명령/native](../../.harness/performance/t3/packet-geometric-fix-full-release-native.json), +[Release XML](../../.harness/performance/t3/packet-geometric-fix-full-release-gtest/)을 보존한다. +Configure/build는 corrected MSVC dependency prefix, 병렬4 이하로 순차 수행했다. + +두 구성의 전체 객체 symbol/disassembly는 AVX2 외부 실행 정의2개, 공통 math 정의0개, +baseline AVX·YMM·ANDN0개를 확인했다. Kernel의 fused 명령은 명시 residual VFMSUB +1개뿐이고 Product의 충분조건 true 분기4개는 각각 두 BSF를 건너뛰며 false는 원래 +두 BSF를 유지한다. [코드 생성 assertion](../../.harness/performance/t3/packet-geometric-fix-codegen-assertion.json)을 보존한다. +실제 Release dispatch 객체의 scalar Add는 first-sum0x16e 이후 finite 분기0x18a에서 +error 계산0x18f를 건너뛴다. TwoSum도0x25에서0xb1로 같은 순서의 return을 한다. +Linked unit exe에서 해당 Add byte signature가 한 곳에 존재함을 확인했다. +[Hoist 근거](../../.harness/performance/t3/packet-geometric-fix-release-scalar-hoist.json)는 +PDB를 통한 개별 callsite나 COMDAT winner 식별까지 주장하지 않는다. 실제 bridge의 +raw/status 동등성은 위 Debug·Release oracle로 별도 확인했다. + +기존 actual native0 원본 oracle의 정합 header/LIB/입력 연결을 검증한 뒤 새 candidate만 +compile/run했다. 두 native와 엄격한 비교 wrapper는0이며9,804행과 전체 byte가 동일하다. +양쪽 SHA는 `DED8D2C380D15E297A73BDD018B1B840C1ADC0D8372934D9FC2EF2B628A36F63`이다. +[Snapshot 명령/native](../../.harness/performance/t3/packet-geometric-fix-snapshot-native.json), +[엄격한 비교](../../.harness/performance/t3/packet-geometric-fix-snapshot-comparison.json)를 보존한다. +[종료 확인](../../.harness/performance/t3/packet-geometric-fix-full-cleanup.json)은 source/hash +불변, tracked clean 및 관련 actor0을 기록한다. CPU를 반환했고 이번 슬롯에서 전체 모델과 +profile은 실행하지 않았다. 이 후보의 전체 경과 시간 및 최종101-frame 비교는 미실행이며, +기존135.9302297초 개발 결과와 목표100초 미달, 최종 전체·공식 검증 미완료는 유지한다.