Skip to content

Comments

Add AGENTS.md documentation structure#151

Open
napetrov wants to merge 1 commit intomasterfrom
add-agents-docs
Open

Add AGENTS.md documentation structure#151
napetrov wants to merge 1 commit intomasterfrom
add-agents-docs

Conversation

@napetrov
Copy link

Add hierarchical AGENTS.md files for agent context throughout the repository:

  • Root AGENTS.md: ecosystem overview, key components, build deps, distribution
  • .github/AGENTS.md: CI/CD workflows, multi-platform support (Linux/Windows/macOS)
  • mkl/AGENTS.md: Python/Cython implementation details, MKL support function categories
  • mkl/tests/AGENTS.md: unit test coverage and running instructions
  • conda-recipe/AGENTS.md: conda packaging for multiple platforms
  • examples/AGENTS.md: usage examples for runtime control API

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

- 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.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md as the entry point with repo overview + directory map to sub-AGENTS files
  • Added subdirectory AGENTS.md files under .github/, mkl/, mkl/tests/, conda-recipe/, and examples/
  • 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
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- **Platforms:** Linux, Windows, macOS
- **Platforms:** Linux, Windows

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +10
- **bld.bat** — Windows build script
- **conda_build_config.yaml** — build matrix (Python versions, platforms)

Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
## 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)
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- **Compilers:** system default (GCC/Clang/MSVC)
- **Compilers:** pinned via `conda_build_config.yaml` (GCC, Clang, MSVC toolchains)

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +14
- **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

Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- **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

Copilot uses AI. Check for mistakes.
- 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
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- Edge cases: invalid domains, negative thread counts, thread-local settings
- Edge cases: thread-local settings

Copilot uses AI. Check for mistakes.
## 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`
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- Platform-specific: Windows uses `LoadLibrary`, Linux uses `dlopen`
- Platform-specific: Linux uses `dlopen(..., RTLD_GLOBAL)` preload; Windows DLL handling is in `_init_helper.py`

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +14
- **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

Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- **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

Copilot uses AI. Check for mistakes.
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)
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
- **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)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant