Skip to content

Commit 405fe93

Browse files
committed
Refine AGENTS guidance for clang toolchain and patch API paths
1 parent 530e23f commit 405fe93

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ Higher-precedence rules override lower-precedence context.
3535
- Build: `CMakeLists.txt`, `pyproject.toml`, `setup.py`
3636
- Dependencies/packaging: `conda-recipe*/meta.yaml`
3737
- CI: `.github/workflows/*.{yml,yaml}`
38-
- API: `mkl_umath/__init__.py`, `mkl_umath/_patch.pyx`
38+
- API: `mkl_umath/__init__.py`, `mkl_umath/src/_patch.pyx`
3939
- Core implementation: `mkl_umath/src/*.c`, `*.c.src`, `*.pyx`
4040
- Tests: `mkl_umath/tests/`
4141

4242
## Intel-specific constraints
43-
- Preferred compiler/toolchain is Intel `icx` + oneMKL.
43+
- oneMKL is required; `icx` and `clang` toolchains are both valid when compiler-specific flags are gated correctly.
4444
- Patching behavior must remain compatible with NumPy integration semantics.
4545
- Performance optimizations must not compromise numerical correctness.

AGENTS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ It provides:
1919

2020
## Build dependencies
2121
**Required:**
22-
- Intel® C Compiler (icx)
22+
- Compiler toolchain: Intel `icx` or `clang` (with Intel-only flags gated when using clang)
2323
- Intel® OneMKL (mkl-devel)
2424
- Intel® TBB (tbb-devel)
2525
- NumPy, Cython, scikit-build, cmake, ninja
@@ -30,7 +30,7 @@ conda install -c https://software.repos.intel.com/python/conda \
3030
mkl-devel tbb-devel dpcpp_linux-64 numpy-base \
3131
cmake ninja cython scikit-build
3232
export MKLROOT=$CONDA_PREFIX
33-
CC=icx pip install --no-build-isolation --no-deps .
33+
CC=${CC:-icx} pip install --no-build-isolation --no-deps . # clang is also supported in CI
3434
```
3535

3636
## CI/CD
@@ -72,9 +72,9 @@ mkl_umath.restore() # Restore original NumPy loops
7272
- **NumPy source:** Requires Intel-optimized NumPy from Intel channel (`software.repos.intel.com/python/conda`). PyPI NumPy may cause runtime failures or incorrect results.
7373
- **Precision flags:** `fp:precise`, `fimf-precision=high` enforce IEEE 754 compliance. Removing them breaks numerical correctness in scientific computing.
7474
- **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.
75+
- **Compiler/toolchain:** `icx` and `clang` are both supported; when using clang, keep Intel-only flags behind compiler guards.
7676
- **Build validation:**
77-
- After setup: `which icx` → should point to conda env or oneAPI location
77+
- After setup: `which ${CC:-icx}` → should resolve to the intended compiler toolchain
7878
- Verify: `echo $MKLROOT` → should be set
7979
- Check: `python -c "import numpy; print(numpy.__version__)"` → confirm Intel NumPy
8080

0 commit comments

Comments
 (0)