Spaces:
Running
Running
Commit ·
d7c0046
1
Parent(s): f76204e
vulkan: sort shaders for more deterministic binary (llama/11315)
Browse files
ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp
CHANGED
|
@@ -17,13 +17,13 @@
|
|
| 17 |
#include <cstring>
|
| 18 |
#include <cstdlib>
|
| 19 |
#include <cassert>
|
|
|
|
| 20 |
#include <sys/stat.h>
|
| 21 |
#include <sys/types.h>
|
| 22 |
|
| 23 |
#ifdef _WIN32
|
| 24 |
#include <windows.h>
|
| 25 |
#include <direct.h> // For _mkdir on Windows
|
| 26 |
-
#include <algorithm> // For std::replace on w64devkit
|
| 27 |
#else
|
| 28 |
#include <unistd.h>
|
| 29 |
#include <sys/wait.h>
|
|
@@ -502,6 +502,7 @@ void write_output_files() {
|
|
| 502 |
fprintf(hdr, "#include <cstdint>\n\n");
|
| 503 |
fprintf(src, "#include \"%s\"\n\n", basename(target_hpp).c_str());
|
| 504 |
|
|
|
|
| 505 |
for (const auto& pair : shader_fnames) {
|
| 506 |
const std::string& name = pair.first;
|
| 507 |
#ifdef _WIN32
|
|
|
|
| 17 |
#include <cstring>
|
| 18 |
#include <cstdlib>
|
| 19 |
#include <cassert>
|
| 20 |
+
#include <algorithm>
|
| 21 |
#include <sys/stat.h>
|
| 22 |
#include <sys/types.h>
|
| 23 |
|
| 24 |
#ifdef _WIN32
|
| 25 |
#include <windows.h>
|
| 26 |
#include <direct.h> // For _mkdir on Windows
|
|
|
|
| 27 |
#else
|
| 28 |
#include <unistd.h>
|
| 29 |
#include <sys/wait.h>
|
|
|
|
| 502 |
fprintf(hdr, "#include <cstdint>\n\n");
|
| 503 |
fprintf(src, "#include \"%s\"\n\n", basename(target_hpp).c_str());
|
| 504 |
|
| 505 |
+
std::sort(shader_fnames.begin(), shader_fnames.end());
|
| 506 |
for (const auto& pair : shader_fnames) {
|
| 507 |
const std::string& name = pair.first;
|
| 508 |
#ifdef _WIN32
|