Skip to content

Commit a6d334e

Browse files
sbrunkclaude
andcommitted
repro: test conservative --target-cpu/--target-features as fix
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2f57764 commit a6d334e

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

.github/workflows/linux-repro.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,34 +47,34 @@ jobs:
4747
grep -qw "$f" /proc/cpuinfo && echo "$f: yes" || echo "$f: NO"
4848
done
4949
50-
- name: Build + run repro
50+
- name: Effective host target
51+
run: |
52+
source $HOME/.bash_profile
53+
pixi run mojo build --print-effective-target /dev/stdin <<<'def main(): pass' 2>&1 | grep -iE "cpu|feature|avx512|target" | head || true
54+
55+
- name: Build + run repro (host vs conservative target)
5156
run: |
5257
source $HOME/.bash_profile
53-
sudo apt-get update -qq && sudo apt-get install -y -qq gdb >/dev/null 2>&1 || true
5458
cat > repro.mojo <<'EOF'
5559
from duckdb import *
5660
5761
def main() raises:
58-
print("CHK 1: before libduckdb init")
59-
ref lib = DuckDB().libduckdb()
60-
print("CHK 2: version =", String(unsafe_from_utf8_ptr=lib.duckdb_library_version()))
6162
var con = DuckDB.connect(":memory:")
62-
print("CHK 3: connected")
6363
var v = con.execute("SELECT 42 AS x").fetch_chunk().get[Int32](col=0, row=0)
64-
print("CHK 4: fetched value =", v)
64+
print("fetched value =", v)
6565
EOF
66-
pixi run mojo build --debug-level=full repro.mojo -o ./repro_dbg
6766
68-
echo "============ run (debug AOT) ============"
69-
if ./repro_dbg; then
70-
echo "RESULT shard ${{ matrix.shard }}: OK"
71-
else
72-
code=$?
73-
echo "RESULT shard ${{ matrix.shard }}: CRASH (exit $code, signal $((code-128)))"
74-
echo "============ gdb backtrace ============"
75-
gdb -q --batch \
76-
-ex 'run' \
77-
-ex 'echo \n=== backtrace ===\n' -ex 'bt' \
78-
-ex 'echo \n=== faulting instruction ===\n' -ex 'x/i $pc' \
79-
./repro_dbg 2>&1 | tail -45 || true
80-
fi
67+
run_cfg () {
68+
local label="$1"; shift
69+
if pixi run mojo build "$@" repro.mojo -o ./repro_bin 2>/dev/null && ./repro_bin >/dev/null 2>&1; then
70+
echo "RESULT shard ${{ matrix.shard }} [$label]: OK"
71+
else
72+
echo "RESULT shard ${{ matrix.shard }} [$label]: CRASH (signal $(( $? - 128 )))"
73+
fi
74+
}
75+
76+
echo "avx512f on this runner: $(grep -qw avx512f /proc/cpuinfo && echo yes || echo NO)"
77+
run_cfg "host-default"
78+
run_cfg "x86-64-v3" --target-cpu x86-64-v3
79+
run_cfg "x86-64-v2" --target-cpu x86-64-v2
80+
run_cfg "no-avx512" --target-features=-avx512f,-avx512vl,-avx512bw,-avx512cd,-avx512dq

0 commit comments

Comments
 (0)