fix(miopen): Warn about network-backed caches and databases (ROCM-33335) #15406
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.52) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #15406"
general
weight: 0.35
JonathanLichtnerAMD
fix(miopen): Warn about network-backed caches and databases (ROCM-33335)
JIRA ID : ROCM-33335
Motivation
ROCM-33335 reports algorithm finds timing out after 150 seconds when the kernel cache is on NFS. MIOpen silently redirected recognized network-backed default paths, while explicit overrides could remain on network storage without a warning.
Make writable-cache placement visible and identify the environment variable that moves each path to node-local storage. Network-filesystem safety and database-locking changes remain outside this PR's scope.
Technical Details
MIOPEN_CUSTOM_CACHE_DIRandMIOPEN_USER_DB_PATHoverrides. Emit non-quiet Warning-level diagnostics, honorMIOPEN_LOG_LEVEL, and print path strings without filesystem-stream escaping.GetCachePathand SQLiteGetDb. Initialize it throughstd::call_onceand retain it through process teardown; test-only resets reconstruct the state after all consumers have finished.The actual PR diff contains eight MIOpen files. Public API signatures, GPU kernels, solver selection, database formats and dependencies are unchanged.
Risk Assessment
Risk Level: 🔴 High
The change modifies shared kernel-cache initialization and process-teardown lifetime to fix a shutdown use-after-free. A synchronization or ownership regression in this core runtime cache can affect compiled-kernel loading, so the lifetime path requires close review despite the contained file scope.
Impacted Components
Potential Side Effects
Mitigation Steps
Test Plan
Local verification used a fresh Linux
HIPNOGPURelease build of the merged source tree later committed as282bfaedf97, withBUILD_DEV=OFFand SQLite/kernel caching enabled. Standard HIP/BLAS settings were enabled; CK, hipconv and AI were disabled.Equivalent focused-suite commands, from the configured build directory:
The recorded direct cache smoke compared current-directory and missing-relative-path filesystem classification, preserved relative overrides, and saved/loaded an exact SQLite payload under a directory containing spaces. Earlier comparisons also exercised a spaced executable path and checked the original SQLite use-after-free under ASan.
Test Result
| Suite | Passed | Failed | Skipped |
|---|---:|---:|---:|
|
test_db_paths| 29 | 0 | 0 ||
test_filesystem_checker| 2 | 0 | 0 ||
test_cache| 7 | 0 | 0 ||
test_perfdb| 3 | 0 | 1 ||
test_unit_lib_env_var| 8 | 0 | 0 || Total | 49 | 0 | 1 |
libhsa-runtime64.so.1. Use-after-free checks remained enabled; no suppression was added to the repository or CI, and whole-process leak freedom is not claimed.