Skip to content

Commit 09b2dc0

Browse files
committed
Trim root agent guide and drop tensor-specific agent docs
1 parent a4d95a0 commit 09b2dc0

File tree

6 files changed

+31
-239
lines changed

6 files changed

+31
-239
lines changed

.github/instructions/elementwise.instructions.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/instructions/libtensor-cpp.instructions.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/instructions/tensor-python.instructions.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

AGENTS.md

Lines changed: 31 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,47 @@
11
# AGENTS.md - AI Agent Guide for DPCTL
22

3-
## Overview
3+
## Purpose
44

5-
**DPCTL** (Data Parallel Control) is a Python SYCL binding library for heterogeneous computing. It provides Python wrappers for SYCL runtime objects and implements the Python Array API standard for tensor operations.
5+
This file is the top-level entry point for AI agents working in `IntelPython/dpctl`.
6+
Use it to orient quickly, then follow directory-level `AGENTS.md` files for implementation details and local conventions.
67

7-
- **License:** Apache 2.0 (see `LICENSE`)
8-
- **Copyright:** Intel Corporation
8+
## Repository Scope
99

10-
## Architecture
10+
DPCTL provides Python bindings for SYCL runtime objects and supporting infrastructure.
1111

12-
```
13-
Python API → Cython Bindings → C API → SYCL Runtime
14-
dpctl/ _sycl_*.pyx libsyclinterface/
12+
High-level stack:
1513

16-
dpctl.tensor → pybind11 → C++ Kernels (libtensor/) → SYCL Runtime
14+
```
15+
Python API -> Cython Bindings -> C API (libsyclinterface) -> SYCL Runtime
1716
```
1817

19-
## Directory Guide
20-
21-
| Directory | AGENTS.md | Purpose |
22-
|-----------|-----------|---------|
23-
| `dpctl/` | [dpctl/AGENTS.md](dpctl/AGENTS.md) | Core SYCL bindings (Device, Queue, Context) |
24-
| `dpctl/tensor/` | [dpctl/tensor/AGENTS.md](dpctl/tensor/AGENTS.md) | Array API tensor operations |
25-
| `dpctl/tensor/libtensor/` | [dpctl/tensor/libtensor/AGENTS.md](dpctl/tensor/libtensor/AGENTS.md) | C++ SYCL kernels |
26-
| `dpctl/memory/` | [dpctl/memory/AGENTS.md](dpctl/memory/AGENTS.md) | USM memory management |
27-
| `dpctl/program/` | [dpctl/program/AGENTS.md](dpctl/program/AGENTS.md) | SYCL kernel compilation |
28-
| `dpctl/utils/` | [dpctl/utils/AGENTS.md](dpctl/utils/AGENTS.md) | Utility functions |
29-
| `dpctl/tests/` | [dpctl/tests/AGENTS.md](dpctl/tests/AGENTS.md) | Test suite |
30-
| `libsyclinterface/` | [libsyclinterface/AGENTS.md](libsyclinterface/AGENTS.md) | C API layer |
31-
32-
## Code Style
33-
34-
Configuration files (do not hardcode versions - check these files):
35-
- **Python/Cython:** `.pre-commit-config.yaml`
36-
- **C/C++:** `.clang-format`
37-
- **Linting:** `.flake8`
18+
## How to Work in This Repo
3819

39-
## License Header
20+
1. Identify the directory you are changing.
21+
2. Read the nearest `AGENTS.md` for that directory.
22+
3. Keep changes local and minimal; avoid unrelated refactors.
23+
4. Validate behavior with targeted tests before broad test runs.
4024

41-
All source files require Apache 2.0 header with Intel copyright. Reference existing files for exact format.
25+
## Directory Guide
4226

43-
## Quick Reference
27+
| Directory | Guide | Notes |
28+
|-----------|-------|-------|
29+
| `dpctl/` | `dpctl/AGENTS.md` | Core SYCL Python bindings and Cython patterns |
30+
| `dpctl/memory/` | `dpctl/memory/AGENTS.md` | USM memory model and ownership rules |
31+
| `dpctl/program/` | `dpctl/program/AGENTS.md` | Program/kernel compilation APIs |
32+
| `dpctl/utils/` | `dpctl/utils/AGENTS.md` | Queue and utility validation helpers |
33+
| `dpctl/tests/` | `dpctl/tests/AGENTS.md` | Test conventions and coverage expectations |
34+
| `libsyclinterface/` | `libsyclinterface/AGENTS.md` | C API contracts and ABI-safe patterns |
4435

45-
```python
46-
import dpctl
47-
import dpctl.tensor as dpt
36+
## Global Constraints
4837

49-
q = dpctl.SyclQueue("gpu") # Create queue
50-
x = dpt.ones((100, 100), dtype="f4", sycl_queue=q) # Create array
51-
np_array = dpt.asnumpy(x) # Transfer to host
52-
```
38+
- Match existing Apache 2.0 + Intel header style for source files.
39+
- Respect style tooling from `.pre-commit-config.yaml`, `.clang-format`, and `.flake8`.
40+
- Do not assume all devices support fp64/fp16.
41+
- Preserve queue/device compatibility checks and explicit error paths.
42+
- Keep memory/resource cleanup explicit and safe.
5343

54-
## Key Concepts
44+
## Notes on GitHub Copilot Instructions
5545

56-
- **Queue:** Execution context binding device + context
57-
- **USM:** Unified Shared Memory (device/shared/host types)
58-
- **Filter string:** Device selector syntax `"backend:device_type:num"`
59-
- **Array API:** Python standard for array operations (https://data-apis.org/array-api/)
46+
Files under `.github/instructions/*.instructions.md` are entry points for Copilot behavior.
47+
They should stay concise and reference authoritative `AGENTS.md` files rather than duplicating full guidance.

dpctl/tensor/AGENTS.md

Lines changed: 0 additions & 54 deletions
This file was deleted.

dpctl/tensor/libtensor/AGENTS.md

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)