Pull requests / #1174

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

closed · @Avicennasis · 0 comentarios · En GitHub

NVIDIA / CUDA

Descripción

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.

En el sitio

Enlaces a install, modelos, releases.