diff options
| author | deshevoy <[email protected]> | 2026-02-02 20:17:29 +0300 |
|---|---|---|
| committer | deshevoy <[email protected]> | 2026-02-02 20:54:05 +0300 |
| commit | 527205698ee1e45c26021bea3ea3a94b9bfaca5e (patch) | |
| tree | 07c3a3f5a714610f519db4c7b519bc54dc6a7edb /build/scripts | |
| parent | 5c6eeb9bcf8adb1fabac60bcc83e359580210446 (diff) | |
[build] cuda: Add .module_id sanity check to CUDA_SRCS
IDs generated by different cicc invocations should match
ISSUE:
commit_hash:7cd593cee44b31875e7166709d7614dcfa3f1f14
Diffstat (limited to 'build/scripts')
| -rw-r--r-- | build/scripts/fatbinary_wrapper.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/build/scripts/fatbinary_wrapper.py b/build/scripts/fatbinary_wrapper.py index ba47405de6d..80c9c7a6db9 100644 --- a/build/scripts/fatbinary_wrapper.py +++ b/build/scripts/fatbinary_wrapper.py @@ -3,6 +3,8 @@ import subprocess def fix(args): + prev_module_id = None + for arg in args: kind = None @@ -10,6 +12,15 @@ def fix(args): kind = "ptx" elif arg.endswith(".cubin"): kind = "elf" + elif arg.endswith(".module_id"): + module_id = open(arg).read() + + if prev_module_id is not None and module_id != prev_module_id: + print(f".module_id mismatch: {module_id} vs {prev_module_id}", file=sys.stderr) + sys.exit(1) + + prev_module_id = module_id + continue if not kind: yield arg |
