Skip to content

fix: -march=native spec parity in CI workflows + Dockerfile#2

Closed
birdnamoo wants to merge 2 commits into
mainfrom
fix/march-native-spec-parity
Closed

fix: -march=native spec parity in CI workflows + Dockerfile#2
birdnamoo wants to merge 2 commits into
mainfrom
fix/march-native-spec-parity

Conversation

@birdnamoo
Copy link
Copy Markdown
Contributor

PR Draft — fix: -march=native spec parity in CI workflows + Dockerfile

Target repository: ecosystem/benchmark-bmb (submodule)
Branch: fix/march-native-spec-parity
Base: main
Draft prepared by: Cycle 2746 (autonomous), parent repo HEAD 627dd3a1
Push status: NOT pushed (HUMAN trigger required per HANDOFF E.4)

Title (≤70 chars)

fix: -march=native spec parity in CI workflows + Dockerfile

Body

Summary

Adds -march=native to 5 compile sites in CI workflows and Dockerfile to
match the published benchmark specification (docs/BENCHMARK_MASTERPLAN.md:135),
which mandates clang 18.x (-O3 -march=native) for the C baseline.

Discovered during Cycle 2743 (parent repo) policy-vs-code gap audit.

Sites changed (+5 / -5)

File Line Compiler Before After
.github/workflows/benchmark-multiplatform.yml 96 clang (Unix) clang -O3 clang -O3 -march=native
.github/workflows/benchmark-multiplatform.yml 132 gcc (MinGW Win) gcc -O3 gcc -O3 -march=native
.github/workflows/benchmark.yml 71 clang clang -O3 clang -O3 -march=native
.github/workflows/benchmark.yml 118 clang clang -O3 clang -O3 -march=native
Dockerfile 71 clang clang -O3 clang -O3 -march=native

Already-compliant sites (no change):

  • .github/workflows/benchmark-multiplatform.yml:94 — gcc Unix
  • Dockerfile:64 — gcc
  • run_benchmarks.sh:77 — clang
  • run_wsl_bench.sh:30,45 — clang

⚠️ Baseline change — CI history discontinuity

This is a baseline change. After merge:

  • BMB-vs-C ratios in CI may shift nominally (slightly less favorable to BMB
    or roughly equal, depending on workload). -march=native enables target
    CPU vectorization (AVX2/AVX-512), which mostly helps numeric kernels.
  • CI history prior to this PR is not directly comparable with runs after
    this PR. First CI run after merge should be stamped as the new baseline.
  • External consumers referencing CI history (e.g., README links to specific
    workflow runs) should be aware of the discontinuity.

Rationale

The benchmark spec (docs/BENCHMARK_MASTERPLAN.md:135) explicitly states:

C baseline: clang 18.x (-O3 -march=native)

5 of the 10 audited compile sites had -march=native missing. This PR
brings them into spec parity. Without -march=native, the C baseline runs
with conservative ISA (typically x86-64-v1 on Ubuntu runners), making the
BMB-vs-C comparison favor BMB unfairly. The BMB compiler itself uses LLVM
opt -O2 which can target the host CPU; the C baseline should match.

Verification

Local diff (git diff on fix/march-native-spec-parity branch):

.github/workflows/benchmark-multiplatform.yml | 4 ++--
.github/workflows/benchmark.yml               | 4 ++--
Dockerfile                                    | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)

Only -march=native is added; no other semantics change.

Post-merge actions

  1. First CI run on main after merge → stamp result JSON as new baseline.
  2. Update parent repo (lang-bmb) submodule pointer to include this commit.
  3. Cycle 2743 carry-forward closed.

Related

  • Parent repo Cycle 2743 log: claudedocs/cycle-logs/cycle-2743.md
  • Parent repo HANDOFF Sequence E (decision adopted Cycle 2745)

HUMAN dispatch instructions (Sequence E.4):

# Submodule push
cd ecosystem/benchmark-bmb
git push -u origin fix/march-native-spec-parity

# Create PR via gh
gh pr create \
  --repo <owner>/<benchmark-bmb-repo> \
  --base main \
  --head fix/march-native-spec-parity \
  --title "fix: -march=native spec parity in CI workflows + Dockerfile" \
  --body-file <path-to-this-file> \
  --draft

iyulab added 2 commits May 11, 2026 22:56
BENCHMARK_REPORT.md (v0.51.22) 및 results/BENCHMARK_REPORT.md (v0.50.51)
모두 3.5개월 stale. 전면 재생성 대신 stale warning + claudedocs/ROADMAP.md
§ 5 redirect 패턴 적용. historical snapshot 보존.

핵심 변화 강조 (v0.51.22 → v0.98):
- sorting 1.10x → 0.910x (BMB 9% FASTER, 19pp 개선)
- lexer 1.09x → 1.000x (parity)
- brainfuck 1.11x → 1.036x (7.4pp)

Cycle 2737 (main repo Cycles 2737-2744).
Adds -march=native to 5 compile sites in CI workflows and Dockerfile to
match the published benchmark specification (docs/BENCHMARK_MASTERPLAN.md:135
mandates clang 18.x -O3 -march=native for the C baseline).

Sites changed (+5 / -5):
- .github/workflows/benchmark-multiplatform.yml:96 (clang Unix)
- .github/workflows/benchmark-multiplatform.yml:132 (gcc MinGW Win)
- .github/workflows/benchmark.yml:71 (clang)
- .github/workflows/benchmark.yml:118 (clang)
- Dockerfile:71 (clang)

Already-compliant sites unchanged: workflows benchmark-multiplatform.yml:94
(gcc Unix), Dockerfile:64 (gcc), run_benchmarks.sh:77, run_wsl_bench.sh:30,45.

Baseline change: CI history prior to this commit is not directly
comparable. First CI run after merge becomes the new baseline.

Refs: parent repo Cycle 2743 audit; Cycle 2745 decision adoption.
@birdnamoo
Copy link
Copy Markdown
Contributor Author

Withdrawn; merging directly to main per maintainer decision.

@birdnamoo birdnamoo closed this May 11, 2026
@birdnamoo birdnamoo deleted the fix/march-native-spec-parity branch May 11, 2026 14:54
birdnamoo pushed a commit to lang-bmb/lang-bmb that referenced this pull request May 11, 2026
사용자 결정 변경: PR overhead 회피, maintainer 직접 main 적용.

수행:
- 서브모듈 push origin fix/march-native-spec-parity (cb478d2)
- PR #2 (lang-bmb/benchmark-bmb#2) close (withdrawn)
- 서브모듈 main fast-forward merge (62feed4..cb478d2)
- 서브모듈 main push origin
- 서브모듈 fix branch 삭제 (local + remote)
- 부모 repo submodule pointer bump → ecosystem/benchmark-bmb @ cb478d2

CI baseline 첫 stamp: 다음 schedule trigger (Sunday 00:00 UTC) 또는
workflow_dispatch. CI history 단절 = 의도된 baseline change.
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