File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
backends/vulkan/runtime/graph Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -320,6 +320,10 @@ api::utils::uvec3 ComputeGraph::create_global_wg_size(const ValueRef idx) {
320
320
}
321
321
322
322
api::utils::uvec3 ComputeGraph::create_local_wg_size (const ValueRef idx) {
323
+ if (config_.enable_local_wg_size_override ) {
324
+ return config_.local_wg_size_override ;
325
+ }
326
+
323
327
if (is_buffer_storage (idx)) {
324
328
return {64u , 1u , 1u };
325
329
}
Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ GraphConfig::GraphConfig() {
60
60
// QueryPool objects are used to measure execution times of individual shader
61
61
// dispatches. By default, this functionality is disabled.
62
62
enable_querypool = false ;
63
+
64
+ enable_local_wg_size_override = false ;
65
+ local_wg_size_override = {};
63
66
}
64
67
65
68
void GraphConfig::set_storage_type_override (api::StorageType storage_type) {
@@ -73,4 +76,10 @@ void GraphConfig::set_memory_layout_override(
73
76
memory_layout_override = memory_layout;
74
77
}
75
78
79
+ void GraphConfig::set_local_wg_size_override (
80
+ const api::utils::uvec3& local_wg_size) {
81
+ enable_local_wg_size_override = true ;
82
+ local_wg_size_override = local_wg_size;
83
+ }
84
+
76
85
} // namespace vkcompute
Original file line number Diff line number Diff line change @@ -30,11 +30,15 @@ struct GraphConfig final {
30
30
31
31
bool enable_querypool;
32
32
33
+ bool enable_local_wg_size_override;
34
+ api::utils::uvec3 local_wg_size_override;
35
+
33
36
// Generate a default graph config with pre-configured settings
34
37
explicit GraphConfig ();
35
38
36
39
void set_storage_type_override (api::StorageType storage_type);
37
40
void set_memory_layout_override (api::GPUMemoryLayout memory_layout);
41
+ void set_local_wg_size_override (const api::utils::uvec3& local_wg_size);
38
42
};
39
43
40
44
} // namespace vkcompute
You can’t perform that action at this time.
0 commit comments