[PR #1174] [CLOSED] expert profile: refuse a header version other than 1, naming both numbers and the file #3286

Closed
opened 2026-11-07 14:40:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1174
Author: @Avicennasis
Created: 10/6/2026
Status: ❌ Closed

Base: main ← Head: fix/expert-profile-version-2


📝 Commits (1)

  • b540eba expert profile: refuse a header version other than 1, naming both numbers and the file

📊 Changes

3 files changed (+93 additions, -1 deletions)

View changed files

📝 CMakeLists.txt (+8 -0)
📝 src/core/expert_cache.cpp (+12 -1)
➕ tests/core/expert_profile_version_test.cpp (+73 -0)

📄 Description

Reopens #632, which GitHub closed when main was force-pushed in the history cleanup (your note there). Same change, cherry-picked onto the new main (82f46a8c); it applied cleanly, and main still has (void) version; at the read.

What it does: read_expert_profile checks the header's version before the geometry. A version other than 1 is refused with the version found, the one this engine reads, and the file, instead of being read as a version 1 layout. tests/core/expert_profile_version_test.cpp (CPU only, no device touched) covers version 2, version 0, a version 2 file of another geometry (refused by its version, not its geometry), and that version 1 still loads.

Verified here, on a machine without a CUDA toolkit: expert_cache.cpp + vmm.cpp compiled against a stub of the CUDA headers, the test linked and run: OK; the sibling expert_profile_save_test: OK; the same test linked against main's expert_cache.cpp fails on all five refusal checks, so the test does test the change.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1174 **Author:** [@Avicennasis](https://github.com/Avicennasis) **Created:** 10/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/expert-profile-version-2` --- ### 📝 Commits (1) - [`b540eba`](https://github.com/Niko1221/Strata/commit/b540eba257d13031f5cb532ea557da63bb385b7a) expert profile: refuse a header version other than 1, naming both numbers and the file ### 📊 Changes **3 files changed** (+93 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+8 -0) 📝 `src/core/expert_cache.cpp` (+12 -1) ➕ `tests/core/expert_profile_version_test.cpp` (+73 -0) </details> ### 📄 Description Reopens #632, which GitHub closed when `main` was force-pushed in the history cleanup (your note there). Same change, cherry-picked onto the new `main` (82f46a8c); it applied cleanly, and `main` still has `(void) version;` at the read. What it does: `read_expert_profile` checks the header's version before the geometry. A version other than 1 is refused with the version found, the one this engine reads, and the file, instead of being read as a version 1 layout. `tests/core/expert_profile_version_test.cpp` (CPU only, no device touched) covers version 2, version 0, a version 2 file of another geometry (refused by its version, not its geometry), and that version 1 still loads. Verified here, on a machine without a CUDA toolkit: `expert_cache.cpp` + `vmm.cpp` compiled against a stub of the CUDA headers, the test linked and run: OK; the sibling `expert_profile_save_test`: OK; the same test linked against `main`'s `expert_cache.cpp` fails on all five refusal checks, so the test does test the change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:40:22 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3286
No description provided.