Skip to content

Commit c099e59

Browse files
committed
Address ndgrigorian review: remove tensor-specific references
- dpctl/tests/AGENTS.md: focus on SYCL objects and memory APIs, remove dtype/USM lists - .github/instructions/testing.instructions.md: drop tensor-specific coverage rules - dpctl/utils/AGENTS.md: remove get_execution_queue() (removed in tensor migration) - AGENTS.md: update directory descriptions - dpctl.instructions.md: clarify queue consistency for memory ops Feedback addressed: tensor module removed, documentation updated accordingly.
1 parent 66e3e75 commit c099e59

File tree

5 files changed

+23
-48
lines changed

5 files changed

+23
-48
lines changed

.github/instructions/dpctl.instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ Each major directory has its own `AGENTS.md` with specific conventions.
2121
## Critical Rules
2222

2323
1. **Device compatibility:** Not all devices support fp64/fp16 - never assume availability
24-
2. **Queue consistency:** Arrays in same operation must share compatible queues
24+
2. **Queue consistency:** Memory operations must use compatible queues
2525
3. **Resource cleanup:** Clean up C resources in `__dealloc__` with NULL check
2626
4. **NULL checks:** Always check C API returns before use

.github/instructions/testing.instructions.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,9 @@ See `dpctl/tests/AGENTS.md` for patterns.
1111
## Essential helpers (from `helper/_helper.py`)
1212
```python
1313
get_queue_or_skip() # Create queue or skip
14-
skip_if_dtype_not_supported() # Skip if device lacks dtype
1514
```
1615

17-
## Dtype/USM lists
18-
Import from `elementwise/utils.py` - do not hardcode.
16+
## Focus
17+
Test SYCL runtime objects (Device, Queue, Context, Event, Platform) and USM memory APIs.
1918

20-
## Coverage
21-
- All dtypes from `_all_dtypes`
22-
- All USM types: device, shared, host
23-
- Edge cases: empty, scalar, broadcast
19+
**Note:** The `dpctl/tensor` module has been removed; do not reference tensor‑specific patterns.

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ Python API -> Cython Bindings -> C API (libsyclinterface) -> SYCL Runtime
2929
| `dpctl/` | `dpctl/AGENTS.md` | Core SYCL Python bindings and Cython patterns |
3030
| `dpctl/memory/` | `dpctl/memory/AGENTS.md` | USM memory model and ownership rules |
3131
| `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 |
32+
| `dpctl/utils/` | `dpctl/utils/AGENTS.md` | Device info, ordering, and profiling utilities |
33+
| `dpctl/tests/` | `dpctl/tests/AGENTS.md` | Test conventions for SYCL objects and memory APIs |
3434
| `libsyclinterface/` | `libsyclinterface/AGENTS.md` | C API contracts and ABI-safe patterns |
3535

3636
## Global Constraints

dpctl/tests/AGENTS.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,39 @@
22

33
## Purpose
44

5-
pytest-based test suite for dpctl functionality.
5+
pytest-based test suite for dpctl SYCL runtime objects and USM memory functionality.
6+
7+
**Note:** The `dpctl/tensor` module has been removed; focus testing on SYCL objects and memory APIs.
68

79
## Key Files
810

911
| File | Purpose |
1012
|------|---------|
1113
| `conftest.py` | Fixtures and pytest configuration |
12-
| `helper/_helper.py` | `get_queue_or_skip()`, `skip_if_dtype_not_supported()` |
14+
| `helper/_helper.py` | `get_queue_or_skip()` (queue creation helper) |
1315

1416
## Essential Helpers
1517

1618
From `helper/_helper.py`:
1719
```python
1820
get_queue_or_skip() # Create queue or skip test
19-
skip_if_dtype_not_supported() # Skip if device lacks dtype (fp64/fp16)
2021
```
2122

22-
## Test Pattern
23+
## Test Pattern (SYCL objects)
2324

2425
```python
25-
@pytest.mark.parametrize("dtype", ["f2", "f4", "f8", "c8", "c16", ...])
26-
def test_operation(dtype):
26+
def test_device_creation():
2727
q = get_queue_or_skip()
28-
skip_if_dtype_not_supported(dtype, q)
29-
# ... test logic and assertions
30-
```
31-
32-
## Coverage Requirements
28+
dev = q.sycl_device
29+
# ... test device properties and methods
3330

34-
- All supported dtypes
35-
- All USM types: device, shared, host
36-
- Memory orders: C, F where applicable
37-
- Edge cases: empty arrays, 0-d arrays (scalars), broadcasting
31+
def test_usm_allocation():
32+
q = get_queue_or_skip()
33+
# Test USM memory allocation for supported data types
34+
# ...
35+
```
3836

3937
## Critical Rules
4038

41-
1. **Device compatibility:** Not all devices support fp64/fp16 - never assume availability
42-
2. **Queue consistency:** Arrays in same operation must share compatible queues
39+
1. **Device compatibility:** Not all devices support fp64/fp16 – verify support before testing float64/complex128 memory operations.
40+
2. **Queue consistency:** Memory allocations and operations must use compatible queues.

dpctl/utils/AGENTS.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,12 @@
44

55
Helper utilities for device queries, execution context management, and ordering.
66

7+
**Note:** The `dpctl/tensor` module has been removed; utilities specific to tensor operations are no longer present.
8+
79
## Key Files
810

911
| File | Purpose |
1012
|------|---------|
11-
| `_compute_follows_data.pyx` | `get_execution_queue()` for queue compatibility |
1213
| `_order_manager.py` | `OrderManager` for memory layout handling |
1314
| `_intel_device_info.py` | Intel-specific device information |
1415
| `_onetrace_context.py` | Tracing/profiling context manager |
15-
16-
## Key Functions
17-
18-
### get_execution_queue()
19-
Validates queue compatibility between arrays:
20-
```python
21-
from dpctl.utils import get_execution_queue
22-
23-
exec_q = get_execution_queue([x.sycl_queue, y.sycl_queue])
24-
if exec_q is None:
25-
raise ExecutionPlacementError("Incompatible queues")
26-
```
27-
28-
### ExecutionPlacementError
29-
Exception raised when arrays are on incompatible queues.
30-
31-
## Notes
32-
33-
- `get_execution_queue()` is critical for all tensor operations
34-
- See usage examples in `dpctl/tensor/` modules

0 commit comments

Comments
 (0)