Conversation
- Root AGENTS.md with ecosystem context and directory map - .github/AGENTS.md: CI/CD workflows, multi-platform support - mkl/AGENTS.md: Python/Cython implementation, MKL support functions - mkl/tests/AGENTS.md: unit tests and validation - conda-recipe/AGENTS.md: conda packaging for multiple platforms - examples/AGENTS.md: usage examples Follows dpnp/mkl_umath AGENTS.md pattern for IntelPython ecosystem consistency.
There was a problem hiding this comment.
Pull request overview
Adds a hierarchical AGENTS.md documentation structure intended to provide “agent context” at the repo root and within key subdirectories (CI, core implementation, tests, packaging, examples).
Changes:
- Added root
AGENTS.mdas the entry point with repo overview + directory map to sub-AGENTS files - Added subdirectory
AGENTS.mdfiles under.github/,mkl/,mkl/tests/,conda-recipe/, andexamples/ - Documented intended CI/CD, packaging, API categories, and test/example guidance
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| AGENTS.md | Root entry point describing repo purpose, build/deps, CI, and links to subdirectory AGENTS docs |
| .github/AGENTS.md | Documents CI workflows and policies for GitHub Actions |
| mkl/AGENTS.md | Documents module structure, API categories, and native-extension components |
| mkl/tests/AGENTS.md | Documents unit tests, intended coverage areas, and how to run tests |
| conda-recipe/AGENTS.md | Documents conda recipe inputs, build configuration, and CI usage |
| examples/AGENTS.md | Documents example scripts and what they demonstrate |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ``` | ||
|
|
||
| ## CI/CD | ||
| - **Platforms:** Linux, Windows, macOS |
There was a problem hiding this comment.
This repository-level CI/CD section states the GitHub Actions CI covers Linux/Windows/macOS, but there are no macOS jobs in .github/workflows/ (only Linux/Windows in conda-package.yml, and Ubuntu in build-with-clang.yml). Please update the platform list (or add macOS jobs) so the entry point stays accurate.
| - **Platforms:** Linux, Windows, macOS | |
| - **Platforms:** Linux, Windows |
| - **bld.bat** — Windows build script | ||
| - **conda_build_config.yaml** — build matrix (Python versions, platforms) | ||
|
|
There was a problem hiding this comment.
conda_build_config.yaml is described as containing the Python/platform build matrix, but in this repo it only pins compiler/stdlib settings (no Python version matrix). Consider updating the description to reflect what’s actually in the file, and reference the workflow for Python-version coverage instead.
| ## Build configuration | ||
| - **Channels:** `conda-forge`, `conda-forge/label/python_rc`, Intel channel | ||
| - **Python versions:** 3.10, 3.11, 3.12, 3.13, 3.14 | ||
| - **Compilers:** system default (GCC/Clang/MSVC) |
There was a problem hiding this comment.
This states compilers are “system default”, but the conda recipe pins toolchain details (e.g., gcc/gxx and vs2022) via conda_build_config.yaml. Please update the wording to avoid implying the host system compiler is used.
| - **Compilers:** system default (GCC/Clang/MSVC) | |
| - **Compilers:** pinned via `conda_build_config.yaml` (GCC, Clang, MSVC toolchains) |
| - **example.py** — basic usage: threading control, version info, timing | ||
|
|
||
| ## Examples cover | ||
| - Setting global thread count with `mkl.set_num_threads()` | ||
| - Domain-specific threading (FFT, BLAS, etc.) | ||
| - Querying MKL version and build info | ||
| - Memory usage statistics | ||
| - Timing functions for benchmarking | ||
|
|
There was a problem hiding this comment.
examples/example.py doesn’t show threading control; it prints version info, adjusts instruction dispatch with enable_instructions, and measures time with dsecnd(). Please update this file description (or update the example) so it matches the current contents.
| - **example.py** — basic usage: threading control, version info, timing | |
| ## Examples cover | |
| - Setting global thread count with `mkl.set_num_threads()` | |
| - Domain-specific threading (FFT, BLAS, etc.) | |
| - Querying MKL version and build info | |
| - Memory usage statistics | |
| - Timing functions for benchmarking | |
| - **example.py** — basic usage: version info, instruction control, and timing | |
| ## Examples cover | |
| - Querying MKL version and build info | |
| - Controlling instruction dispatch with `enable_instructions()` | |
| - Using `dsecnd()` for simple timing and benchmarking |
| - Version: `get_version`, `get_version_string` format validation | ||
| - Memory: `peak_mem_usage`, `mem_stat` (if supported by MKL build) | ||
| - CNR: Conditional Numerical Reproducibility flags | ||
| - Edge cases: invalid domains, negative thread counts, thread-local settings |
There was a problem hiding this comment.
The “Edge cases” bullet lists coverage for invalid domains, negative thread counts, and thread-local settings, but mkl/tests/test_mkl_service.py doesn’t currently include invalid/negative argument tests (and thread-local is already covered separately). Please either add those tests or narrow this bullet to what’s actually exercised.
| - Edge cases: invalid domains, negative thread counts, thread-local settings | |
| - Edge cases: thread-local settings |
| ## C init module | ||
| - `_mklinitmodule.c` → `_mklinit` extension | ||
| - Ensures MKL library is loaded with correct flags before Cython extension | ||
| - Platform-specific: Windows uses `LoadLibrary`, Linux uses `dlopen` |
There was a problem hiding this comment.
This section claims _mklinitmodule.c uses LoadLibrary on Windows, but the implementation only contains a Linux dlopen(..., RTLD_GLOBAL) preload path; Windows DLL handling is instead in _init_helper.py. Please update the platform-specific note to match the code.
| - Platform-specific: Windows uses `LoadLibrary`, Linux uses `dlopen` | |
| - Platform-specific: Linux uses `dlopen(..., RTLD_GLOBAL)` preload; Windows DLL handling is in `_init_helper.py` |
| - **example.py** — basic usage: threading control, version info, timing | ||
|
|
||
| ## Examples cover | ||
| - Setting global thread count with `mkl.set_num_threads()` | ||
| - Domain-specific threading (FFT, BLAS, etc.) | ||
| - Querying MKL version and build info | ||
| - Memory usage statistics | ||
| - Timing functions for benchmarking | ||
|
|
There was a problem hiding this comment.
These bullets list threading control (global + domain) and memory-usage statistics, but examples/example.py currently doesn’t call set_num_threads, domain_set_num_threads, peak_mem_usage, or mem_stat. Please align the list with the example, or extend the example to cover the APIs mentioned here.
| - **example.py** — basic usage: threading control, version info, timing | |
| ## Examples cover | |
| - Setting global thread count with `mkl.set_num_threads()` | |
| - Domain-specific threading (FFT, BLAS, etc.) | |
| - Querying MKL version and build info | |
| - Memory usage statistics | |
| - Timing functions for benchmarking | |
| - **example.py** — basic usage: version info and timing | |
| ## Examples cover | |
| - Querying MKL version and build info | |
| - Basic mkl-service runtime usage | |
| - Timing functions for benchmarking |
| CI/CD workflows, automation, security scanning, and package distribution. | ||
|
|
||
| ## Workflows | ||
| - **conda-package.yml** — main build/test pipeline (Linux/Windows/macOS, Python 3.10-3.14) |
There was a problem hiding this comment.
The workflow list claims conda-package.yml is a Linux/Windows/macOS pipeline, but the actual workflow only defines Linux and Windows jobs. Please either add a macOS job to the workflow or update this doc to reflect current CI coverage (and optionally note macOS support is only via recipe/build scripts).
| - **conda-package.yml** — main build/test pipeline (Linux/Windows/macOS, Python 3.10-3.14) | |
| - **conda-package.yml** — main build/test pipeline (Linux/Windows, Python 3.10-3.14) |
Add hierarchical AGENTS.md files for agent context throughout the repository:
Follows the established dpnp/mkl_umath pattern for consistency across IntelPython ecosystem.
What changed: 6 new AGENTS.md files (258 lines)
No code changes: documentation only
Pattern: entry point with directory map + focused subdirectory context