Closed matthiasdiener closed 3 months ago
I understand the need here, but I'm a curious about some things:
PYOPENCL_CACHE_DIR
(to mirror PYOPENCL_NO_CACHE
)?
- Why only on macOS and not Windows? Can the Windows paths be overwritten by environment variables?
Looking at https://github.com/platformdirs/platformdirs/blob/main/src/platformdirs/windows.py#L251, I guess so, but my knowledge of Windows is almost zero 😞
- If we're forcing a non-native environment variable on other OSes, why not use something like
PYOPENCL_CACHE_DIR
(to mirrorPYOPENCL_NO_CACHE
)?
We could add PYOPENCL_CACHE_DIR
, but the current goal was to make the disk caching selection consistent across loopy and pyopencl, for both Mac and Linux.
Edit: another important reason: Pocl also honors XDG_CACHE_HOME
on MacOS.
Edit: another important reason: Pocl also honors
XDG_CACHE_HOME
on MacOS.
Fair enough, but they just fallback to it and also have a POCL_CACHE_DIR
(at least that's what the docs say).
This is ready for review @inducer.
LGTM, thanks!
Similar to https://github.com/inducer/pytools/pull/204