|
22 | 22 | CARGO_TERM_COLOR: always |
23 | 23 | # The features we want to explicitly test. For example, the `flatbuffers-build` feature |
24 | 24 | # of `diskann-quantization` requires additional setup and so must not be included by default. |
25 | | - DISKANN_FEATURES: "virtual_storage,bf_tree,spherical-quantization,product-quantization,tracing,experimental_diversity_search,disk-index,flatbuffers,linalg,codegen" |
| 25 | + DISKANN_FEATURES: "virtual_storage,spherical-quantization,product-quantization,tracing,experimental_diversity_search,disk-index,flatbuffers,linalg,codegen" |
26 | 26 |
|
27 | 27 | # Intel SDE version used for baseline and AVX-512 emulation jobs. |
28 | 28 | SDE_VERSION: "sde-external-10.7.0-2026-02-18-lin" |
@@ -257,6 +257,8 @@ jobs: |
257 | 257 | needs: basics |
258 | 258 | name: sde-baseline-tests |
259 | 259 | runs-on: ubuntu-latest |
| 260 | + if: |
| 261 | + false # Disabled until we can resolve SDE binary downloads. |
260 | 262 | env: |
261 | 263 | # Compile for the x86-64 baseline — no AVX, no AVX2. |
262 | 264 | RUSTFLAGS: "-Dwarnings -Ctarget-cpu=x86-64" |
@@ -318,6 +320,8 @@ jobs: |
318 | 320 | needs: basics |
319 | 321 | name: sde-avx512-tests |
320 | 322 | runs-on: ubuntu-latest |
| 323 | + if: |
| 324 | + false # Disabled until we can resolve SDE binary downloads. |
321 | 325 | env: |
322 | 326 | # Use SDE as the test runner so cargo test automatically runs binaries under emulation. |
323 | 327 | CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "${{ github.workspace }}/intel-sde/sde64 -spr --" |
@@ -487,29 +491,59 @@ jobs: |
487 | 491 | env: |
488 | 492 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
489 | 493 |
|
490 | | - miri: |
| 494 | + # LLVM IR bloat check: compare monomorphization cost against baseline. |
| 495 | + # This job is not part of the required CI gate, so it won't block PR merges. |
| 496 | + llvm-lines: |
| 497 | + if: github.event_name == 'pull_request' |
491 | 498 | needs: basics |
492 | | - name: miri-test |
493 | | - # This step is slow, so it only runs after a PR merge to avoid slowing down pre-merge checks. |
494 | | - if: ${{ github.event_name == 'push' }} |
| 499 | + name: LLVM Lines Regression Check |
495 | 500 | runs-on: ubuntu-latest |
496 | | - continue-on-error: true |
| 501 | + env: |
| 502 | + LLVM_LINES_GROWTH_THRESHOLD: 5 |
497 | 503 | steps: |
498 | | - - uses: actions/checkout@v4 |
| 504 | + - name: Checkout current branch |
| 505 | + uses: actions/checkout@v4 |
499 | 506 | with: |
500 | | - lfs: true |
501 | | - |
502 | | - - name: Install Rust nightly with miri |
503 | | - run: rustup toolchain install nightly --component miri |
| 507 | + path: pr |
504 | 508 |
|
505 | | - - name: Install cargo-nextest |
506 | | - uses: taiki-e/install-action@v2 |
| 509 | + - name: Checkout base ref |
| 510 | + uses: actions/checkout@v4 |
507 | 511 | with: |
508 | | - tool: cargo-nextest |
| 512 | + ref: ${{ github.event.pull_request.base.sha }} |
| 513 | + path: baseline |
| 514 | + |
| 515 | + - name: Install Rust |
| 516 | + shell: bash |
| 517 | + run: rustup show |
| 518 | + working-directory: pr |
| 519 | + |
| 520 | + - name: Install cargo-llvm-lines |
| 521 | + run: cargo install cargo-llvm-lines --locked |
509 | 522 |
|
510 | 523 | - uses: Swatinem/rust-cache@v2 |
| 524 | + with: |
| 525 | + workspaces: | |
| 526 | + pr -> target |
| 527 | + baseline -> target |
511 | 528 |
|
512 | | - - name: miri |
513 | | - run: cargo +nightly miri nextest run --locked --package diskann-quantization |
514 | | - env: |
515 | | - MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance |
| 529 | + - name: Generate baseline LLVM lines |
| 530 | + working-directory: baseline |
| 531 | + run: cargo llvm-lines --package diskann-benchmark --all-features --release | head -100 | tee ../baseline-llvm-lines.txt |
| 532 | + |
| 533 | + - name: Generate current LLVM lines |
| 534 | + working-directory: pr |
| 535 | + run: cargo llvm-lines --package diskann-benchmark --all-features --release | head -100 | tee ../current-llvm-lines.txt |
| 536 | + |
| 537 | + - name: Compare LLVM lines |
| 538 | + run: bash pr/.github/scripts/compare-llvm-lines.sh baseline-llvm-lines.txt current-llvm-lines.txt |
| 539 | + |
| 540 | + - name: Check LLVM lines growth threshold |
| 541 | + run: | |
| 542 | + baseline_total=$(awk '/\(TOTAL\)/{print $1}' baseline-llvm-lines.txt) |
| 543 | + current_total=$(awk '/\(TOTAL\)/{print $1}' current-llvm-lines.txt) |
| 544 | + growth=$(( (current_total - baseline_total) * 100 / baseline_total )) |
| 545 | +
|
| 546 | + if [ "$growth" -gt "$LLVM_LINES_GROWTH_THRESHOLD" ]; then |
| 547 | + echo "::error::LLVM IR grew ${growth}% ($baseline_total → $current_total lines), threshold is ${LLVM_LINES_GROWTH_THRESHOLD}%" |
| 548 | + exit 1 |
| 549 | + fi |
0 commit comments