Skip to content

Do not lowercase CHIP_MODULE_CACHE_DIR - #1398

Open
pvelesko wants to merge 2 commits into
mainfrom
2026-07-29-github-1396-cache-dir-lowercase
Open

Do not lowercase CHIP_MODULE_CACHE_DIR#1398
pvelesko wants to merge 2 commits into
mainfrom
2026-07-29-github-1396-cache-dir-lowercase

Conversation

@pvelesko

Copy link
Copy Markdown
Collaborator

Fixes #1396

CHIP_MODULE_CACHE_DIR was read through readEnvVar with Lower = true, which lowercases the whole string. The value is a filesystem path, so any uppercase letter in it sent the cache somewhere else, or, when the lowercased path was not creatable, aborted the process with a filesystem_error before anything ran.

The other path-valued variables already pass false, so this just makes CHIP_MODULE_CACHE_DIR consistent with CHIP_JIT_FLAGS, CHIP_JIT_FLAGS_OVERRIDE and CHIP_DUMP_PROCESSED_SPIRV.

Before and after on Arc B570, LLVM 22.0-native, Level Zero and OpenCL, running the new regression test:

# before
requested '/tmp/TestFix1396ChipStarCacheDir' exists=0, lowercased '/tmp/testfix1396chipstarcachedir' exists=1
FAIL

# after
requested '/tmp/TestFix1396ChipStarCacheDir' exists=1, lowercased '/tmp/testfix1396chipstarcachedir' exists=0
PASS

The silent case is the expensive one. On Aurora, pointing the variable at a project directory meant nothing was ever cached, so every process recompiled the whole device module: single gtest cases of kynema-ugf took about 300 seconds each, and a 131 suite campaign got through one suite in a one hour job.

The test re-executes itself rather than calling setenv and carrying on, because chipStar reads its configuration when the driver initializes, which happens before main. The parent sets the variable, the child compiles a kernel, and the parent inspects the directories once the child has exited.

@pvelesko
pvelesko force-pushed the 2026-07-29-github-1396-cache-dir-lowercase branch from e459e50 to df2dfed Compare July 31, 2026 14:52
@colleeneb

Copy link
Copy Markdown
Contributor

/run-aurora-ci

2 similar comments
@colleeneb

Copy link
Copy Markdown
Contributor

/run-aurora-ci

@colleeneb

Copy link
Copy Markdown
Contributor

/run-aurora-ci

@pvelesko
pvelesko force-pushed the 2026-07-29-github-1396-cache-dir-lowercase branch from df2dfed to e652e04 Compare August 20, 2026 12:09
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.

CHIP_MODULE_CACHE_DIR is lowercased, so a path with any uppercase letter either aborts the process or silently disables caching

2 participants