made shaders gen deterministic, update to c++17 (+4 squashed commit)

Squashed commit:

[7bb2441b] made shaders gen deterministic

[906e02af] Update c++ from 11 to 17 (#1263)

* Update c/c++ from 11 to 17

* Update CMakeLists.txt

only bump c++

[7ca430ed] C++17 ver

[b7dfb55d] give up and switch to c++17 (+1 squashed commits)

Squashed commits:

[96cfbc48] give up and switch to c++17 (+5 squashed commit)

Squashed commit:

[19ac7c26] Revert "fixed incorrect number of params"

This reverts commit 51388729bc4ffe51ab07ae02ce386219fb5e2876.

[45f730da] Revert "fix for c++17"

This reverts commit 050ba5f72b3358f958722addb9aaa77ff2e428ee.

[51388729] fixed incorrect number of params

[8f1ee54e] build latest vk shaders

[050ba5f7] fix for c++17
This commit is contained in:
Concedo 2024-12-13 17:55:16 +08:00
parent 46d76d913f
commit a63c2c914d
7 changed files with 91 additions and 105 deletions

View file

@ -263,18 +263,22 @@ std::map<std::string, std::string> merge_maps(const std::map<std::string, std::s
}
static std::vector<std::future<void>> compiles;
// void string_to_spv(const std::string& _name, const std::string& in_fname, const std::map<std::string, std::string>& defines, bool fp16 = true, bool coopmat = false, bool coopmat2 = false, bool f16acc = false) {
// {
// // wait until fewer than N compiles are in progress.
// // 16 is an arbitrary limit, the goal is to avoid "failed to create pipe" errors.
// uint32_t N = 16;
// std::unique_lock<std::mutex> guard(compile_count_mutex);
// while (compile_count >= N) {
// compile_count_cond.wait(guard);
// }
// compile_count++;
// }
// compiles.push_back(std::async(string_to_spv_func, _name, in_fname, defines, fp16, coopmat, coopmat2, f16acc));
// }
void string_to_spv(const std::string& _name, const std::string& in_fname, const std::map<std::string, std::string>& defines, bool fp16 = true, bool coopmat = false, bool coopmat2 = false, bool f16acc = false) {
{
// wait until fewer than N compiles are in progress.
// 16 is an arbitrary limit, the goal is to avoid "failed to create pipe" errors.
uint32_t N = 16;
std::unique_lock<std::mutex> guard(compile_count_mutex);
while (compile_count >= N) {
compile_count_cond.wait(guard);
}
compile_count++;
}
compiles.push_back(std::async(string_to_spv_func, _name, in_fname, defines, fp16, coopmat, coopmat2, f16acc));
std::cout << "string_to_spv: " << _name << "\n";
string_to_spv_func(_name, in_fname, defines, fp16, coopmat, coopmat2, f16acc); //non async version
}
void matmul_shaders(bool fp16, bool matmul_id, bool coopmat, bool coopmat2, bool f16acc) {