strata --version; build warnings: weights.cpp index scanf formats, qsa_layer unused variables and one-line statements, ignored cudaFreeHost results

This commit is contained in:
Niko1221 committed 2026-10-07 20:47:36 +02:00
1 parent b9aa4558a4
commit b7dd070d96
3 files changed
+19 -6

No files matched your search

+7
View File
@@ -1518,6 +1518,13 @@ int main(int argc, char** argv) {
// pipe or a file is block-buffered, so a program that dies loses every line it had already printed - which
// turns "it crashed at step 7" into "it crashed somewhere", and the difference is a debugging session.
std::setvbuf(stdout, nullptr, _IONBF, 0);
// `strata --version` / `-V` (also `strata generate --version`): the version and nothing else, before any GPU is touched
for (int i = 1; i < argc && i < 3; ++i) {
if (std::strcmp(argv[i], "--version") == 0 || std::strcmp(argv[i], "-V") == 0) {
std::printf("strata %s\n", STRATA_VERSION);
return 0;
}
}
#if (defined(STRATA_USE_HIP) || defined(STRATA_HIP_GFX906)) && !defined(_WIN32)
// AMD, a file-backed arena (STRATA_ARENA_MMAP): ROCclr copies a pageable source of 1 MiB or more by locking its
// pages in place (a GPU userptr), and keeps them - so every expert the VRAM fill copied from the mapped