Skip to content

Commit 30cfd71

Browse files
committed
Add Common pitfalls section (pragmatist review feedback)
1 parent f5e7139 commit 30cfd71

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,17 @@ mkl_umath.restore() # Restore original NumPy loops
6767
- **Precision flags:** fp:precise, fimf-precision=high, fprotect-parens (non-negotiable)
6868
- **Security:** Stack protection, FORTIFY_SOURCE, NX/DEP enforced in CMake
6969

70+
71+
## Common pitfalls
72+
- **NumPy source:** Requires Intel-optimized NumPy from Intel channel (`software.repos.intel.com/python/conda`). PyPI NumPy may cause runtime failures or incorrect results.
73+
- **Precision flags:** `fp:precise`, `fimf-precision=high` enforce IEEE 754 compliance. Removing them breaks numerical correctness in scientific computing.
74+
- **Patching order:** If using multiple Intel patches (e.g., `mkl_random` + `mkl_umath`), apply `mkl_umath` last. Verify with `is_patched()` after each.
75+
- **Compiler:** Intel `icx` is the supported compiler. `build-with-clang.yml` validates compatibility, but icx is recommended for production.
76+
- **Build validation:**
77+
- After setup: `which icx` → should point to conda env or oneAPI location
78+
- Verify: `echo $MKLROOT` → should be set
79+
- Check: `python -c "import numpy; print(numpy.__version__)"` → confirm Intel NumPy
80+
7081
## Notes
7182
- `_vendored/` contains vendored NumPy code generation utilities
7283
- Version in `mkl_umath/_version.py` (dynamic via setuptools)

0 commit comments

Comments
 (0)