@@ -62,60 +62,41 @@ jobs:
6262 - name : List oneAPI folder content
6363 run : ls ${{ env.ONEAPI_ROOT }}/compiler
6464
65- - name : Install gdb
66- run : |
67- sudo apt-get update --fix-missing
68- sudo apt-get install -y gdb
65+ # - name: Install gdb
66+ # run: |
67+ # sudo apt-get update --fix-missing
68+ # sudo apt-get install -y gdb
6969
7070 - name : Build mkl_umath
7171 run : |
7272 source ${{ env.ONEAPI_ROOT }}/setvars.sh
7373 echo $CMPLR_ROOT
7474 export CC=$CMPLR_ROOT/bin/icx
75- export CFLAGS="${CFLAGS} -g -fno-fast-math -O0"
76- pip install . --no-build-isolation --no-deps --verbose
77-
78- - name : Run tests under gdb
79- run : |
80- source ${{ env.ONEAPI_ROOT }}/setvars.sh
81- pip install pytest
82- cd ..
83- setarch $(uname -m) -R gdb --batch -ex r -ex 'info sharedlibrary' -ex 'set print elements 1000' -ex bt --args python -m pytest -s -v --pyargs mkl_umath/mkl_umath/tests || true
84-
85- - name : run tests under valgrind
86- run : |
87- sudo apt-get install -y valgrind
88- source ${{ env.ONEAPI_ROOT }}/setvars.sh
89- pip install pytest
90- cd ..
91- valgrind --error-exitcode=99 python -m pytest -s -v --pyargs mkl_umath/mkl_umath/tests || true
75+ export CXX=$CMPLR_ROOT/bin/icpx
76+ export CFLAGS="${CFLAGS} -fno-fast-math -O2"
77+ pip install -e . --no-build-isolation --no-deps --verbose
78+
79+ # - name: Run tests under gdb
80+ # run: |
81+ # source ${{ env.ONEAPI_ROOT }}/setvars.sh
82+ # pip install pytest
83+ # setarch $(uname -m) -R gdb --batch -ex r -ex 'info sharedlibrary' -ex 'set print elements 1000' -ex bt --args python -m pytest -s -v --pyargs mkl_umath/mkl_umath/tests || true
84+
85+ # - name: run tests under valgrind
86+ # run: |
87+ # sudo apt-get install -y valgrind
88+ # source ${{ env.ONEAPI_ROOT }}/setvars.sh
89+ # pip install pytest
90+ # valgrind --error-exitcode=99 python -m pytest -s -v --pyargs mkl_umath/mkl_umath/tests || true
91+
92+ # - name: Enable local core dumps (Python 3.13 only)
93+ # run: |
94+ # sudo sysctl -w kernel.core_uses_pid=1
95+ # sudo bash -c 'echo core > /proc/sys/kernel/core_pattern'
96+ # ulimit -c unlimited
97+ # cat /proc/sys/kernel/core_pattern
9298
9399 - name : Run mkl_umath tests
94100 run : |
95101 source ${{ env.ONEAPI_ROOT }}/setvars.sh
96- ulimit -c unlimited
97- pip install pytest
98- cd ..
99- # First a minimal import to see if pure import crashes
100- python -X faulthandler -c "import numpy, mkl_umath; print('import-only OK')"
101- # Run tests normally; expect segfault
102- python -X faulthandler -m pytest -q --pyargs mkl_umath/mkl_umath/tests || echo "pytest exit code=$?"
103- COREFILE=$(ls core* 2>/dev/null | head -1 || true)
104- if [ -f "$COREFILE" ]; then
105- echo "Core file: $COREFILE"
106- gdb -batch -ex "bt full" -ex "info threads" python "$COREFILE"
107- else
108- echo "No core produced"
109- fi
110- # Retry with MKL mitigations to confirm cause
111- export MKL_DISABLE_FAST_MM=1
112- export MKL_THREADING_LAYER=SEQUENTIAL
113- python -X faulthandler -c "import numpy, mkl_umath; print('sequential + fast_mm disabled import OK')"
114- python -X faulthandler -m pytest -q --pyargs mkl_umath/mkl_umath/tests || echo "pytest (sequential) exit code=$?"
115- # Show loaded modules
116- python - <<'EOF'
117- import sys, mkl_umath, numpy
118- print("Loaded mkl_umath from:", mkl_umath.__file__)
119- print("MKL_THREADING_LAYER =", __import__('os').environ.get('MKL_THREADING_LAYER'))
120- print("Has _ufuncs:", '_ufuncs' in dir(mkl_umath))
121- EOF
102+ pytest -q --pyargs mkl_umath/mkl_umath/tests
0 commit comments