Repository navigation
Add AGENTS.md and issue templates - #2402
ndgrigorian wants to merge 2 commits into
Conversation
|
@jharlow-intel |
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/2402/index.html |
jharlow-intel
left a comment
There was a problem hiding this comment.
Thanks. Running this through our agent-readiness scanners and checking the documented commands turned up a few changes that are probably needed.
Flagged by agent readiness checking tools
36da929 to
71277bb
Compare
|
@antonwolfy @vlad-perevezentsev take a look when you have a chance |
antonwolfy
left a comment
There was a problem hiding this comment.
Thanks for adding this. I checked the commands, paths and conventions in AGENTS.md against the tree and left suggestions where they're wrong or could mislead an agent. The main ones are dpctl/_version.py listed as generated, the network access the first build needs, and the test and CHANGELOG guidance. The issue forms validate against GitHub's schema, so the comments there are minor.
| `source /opt/intel/oneapi/setvars.sh && python -m pytest dpctl/tests/...`. | ||
| - Check visible devices: `sycl-ls`. Tests skip on missing devices/aspects; a CPU | ||
| OpenCL device is enough for most of the suite. | ||
| - Python build deps: `pip install numpy cython scikit-build cmake ninja pytest "versioneer[toml]==0.29"`. |
There was a problem hiding this comment.
setuptools isn't listed, but build_locally.py runs setup.py build_ext and pip install -e . --no-build-isolation, and a fresh venv on Python 3.12+ doesn't have it. pybind11 is worth adding too, since otherwise CMake downloads it (FetchContent in the top-level CMakeLists.txt):
| - Python build deps: `pip install numpy cython scikit-build cmake ninja pytest "versioneer[toml]==0.29"`. | |
| - Python build deps: `pip install numpy cython scikit-build cmake ninja setuptools pybind11 pytest "versioneer[toml]==0.29"`. |
| ## Commands | ||
|
|
||
| - Build in place + editable install: `python scripts/build_locally.py --verbose` | ||
| - defaults to `icx`/`icpx` on `PATH`; other compilers need `--compiler-root` |
There was a problem hiding this comment.
It seems --compiler-root is only required when --c-compiler/--cxx-compiler aren't absolute paths (resolve_compilers in scripts/_build_helper.py), and it's joined with the compiler name, so it has to be the directory with the binaries (CI passes .../dpcpp_compiler/bin in os-llvm-sycl-build.yml):
| - defaults to `icx`/`icpx` on `PATH`; other compilers need `--compiler-root` | |
| - defaults to `icx`/`icpx` on `PATH`; for other compilers pass absolute | |
| `--c-compiler`/`--cxx-compiler` paths, or names plus `--compiler-root=<bin dir>` |
| - Build in place + editable install: `python scripts/build_locally.py --verbose` | ||
| - defaults to `icx`/`icpx` on `PATH`; other compilers need `--compiler-root` | ||
| - `--debug`, `--clean`, `--target-cuda[=sm_XX]`, `--target-hip=<arch>`, | ||
| `--cmake-opts="-D..."` |
There was a problem hiding this comment.
Should we mention that the first configure needs network access? Level Zero is on by default and GetLevelZeroHeaders.cmake does a git clone of its headers, and pybind11 is downloaded when it isn't installed. In a sandbox this ends in a fairly confusing CMake error.
| `--cmake-opts="-D..."` | |
| `--cmake-opts="-D..."` | |
| - the first configure clones the Level Zero headers and downloads pybind11; | |
| offline, pass `--no-level-zero` (or | |
| `--cmake-opts="-DDPCTL_LEVEL_ZERO_INCLUDE_DIR=<dir>"`) and install `pybind11` |
| - one file: `python -m pytest dpctl/tests/test_sycl_queue.py` | ||
| - one test: `python -m pytest dpctl/tests/test_sycl_queue_memset.py::test_memset_partial_count` | ||
| - without a C compiler/Cython: add `-k "not test_cython_api and not test_c_headers"` | ||
| - C API tests (GoogleTest, needs `GTEST_ROOT`): `(cd libsyclinterface && bash dbg_build.sh)` |
There was a problem hiding this comment.
Nit: libsyclinterface/tests/CMakeLists.txt just does find_package(GTest REQUIRED), so a system GoogleTest works as well and GTEST_ROOT is only one way to point at it. The script is also Linux only:
| - C API tests (GoogleTest, needs `GTEST_ROOT`): `(cd libsyclinterface && bash dbg_build.sh)` | |
| - C API tests (Linux; GoogleTest must be findable by CMake, e.g. via `GTEST_ROOT`): `(cd libsyclinterface && bash dbg_build.sh)` |
| - Coverage (C + Python, rebuilds with `-DDPCTL_BUILD_CAPI_TESTS=ON`): | ||
| `python scripts/gen_coverage.py --oneapi` |
There was a problem hiding this comment.
--oneapi is already the default (CI runs plain python scripts/gen_coverage.py --verbose). Maybe also say that it runs the whole pytest suite at the end and leaves the in-place build instrumented (build_ext --inplace with the Coverage build type)?
| - Coverage (C + Python, rebuilds with `-DDPCTL_BUILD_CAPI_TESTS=ON`): | |
| `python scripts/gen_coverage.py --oneapi` | |
| - Coverage (Linux; C + Python, rebuilds in place with `-DDPCTL_BUILD_CAPI_TESTS=ON`, | |
| then runs the full pytest suite unless `--skip-pytest`): `python scripts/gen_coverage.py`, | |
| then `python scripts/build_locally.py --clean` for a normal build |
| id: devices | ||
| attributes: | ||
| label: Devices | ||
| description: Output of `python -m dpctl -f` |
There was a problem hiding this comment.
Same here:
| description: Output of `python -m dpctl -f` | |
| description: Output of `python -m dpctl -f` (or `sycl-ls` if dpctl fails to import) |
| id: environment | ||
| attributes: | ||
| label: Environment | ||
| description: OS, Python version (and whether free-threaded), how dpctl was installed (conda/pip/source), DPC++ compiler version if built from source. |
There was a problem hiding this comment.
python -m dpctl -f shows the driver versions but not the DPC++ runtime version, which often matters for dpctl issues. Should we ask for it?
| description: OS, Python version (and whether free-threaded), how dpctl was installed (conda/pip/source), DPC++ compiler version if built from source. | |
| description: OS, Python version (and whether free-threaded), how dpctl was installed (conda/pip/source), DPC++ runtime version (`intel-sycl-rt` in `conda list`/`pip list`), DPC++ compiler version if built from source. |
| - type: textarea | ||
| id: alternatives | ||
| attributes: | ||
| label: Alternatives considered |
There was a problem hiding this comment.
Nit: the last field has no description:
| label: Alternatives considered | |
| label: Alternatives considered | |
| description: Optional. Workarounds you use today, or other designs you considered. |
| blank_issues_enabled: true | ||
| contact_links: | ||
| - name: Questions and discussions | ||
| url: https://github.com/IntelPython/dpctl/discussions |
There was a problem hiding this comment.
Nit: maybe link straight to the Q&A category?
| url: https://github.com/IntelPython/dpctl/discussions | |
| url: https://github.com/IntelPython/dpctl/discussions/categories/q-a |
| .venv/ | ||
| venv/ | ||
| .pytest_cache/ | ||
| .env |
There was a problem hiding this comment.
Nit: .env.local and similar variants aren't covered:
| .env | |
| .env | |
| .env.* |
Flagged by agent readiness checking tools