Skip to content

Commit dfc80d0

Browse files
committed
Update on "[ET-VK] 7/n Split dispatches between multiple command buffers. Split execute dispatch into multiple commands based on dispatch count."
Differential Revision: [D78360039](https://our.internmc.facebook.com/intern/diff/D78360039/) [ghstack-poisoned]
2 parents 88a34db + 03f04f0 commit dfc80d0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

backends/vulkan/runtime/graph/ComputeGraph.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ ComputeGraph::ComputeGraph(GraphConfig config)
153153
}
154154
if (config_.execute_threshold_node_count == 0) {
155155
config_.execute_threshold_node_count = 128;
156-
config_.prepack_initial_threshold_nbytes = 64;
156+
config_.execute_initial_threshold_node_count = 64;
157157
}
158158
}
159159

@@ -866,9 +866,10 @@ void ComputeGraph::execute() {
866866
// execute_initial_threshold_node_count or if its a multiple of
867867
// execute_threshold_node_count.
868868
const bool reached_threshold =
869-
(encoded_node_count - config_.execute_initial_threshold_node_count) %
869+
encoded_node_count >= config_.execute_initial_threshold_node_count &&
870+
((encoded_node_count - config_.execute_initial_threshold_node_count) %
870871
config_.execute_threshold_node_count ==
871-
0;
872+
0);
872873

873874
// Create a new command buffer when threashold is reached
874875
if (reached_threshold) {

0 commit comments

Comments
 (0)