uint32_t submit_count = 0;
uint64_t batch_flops = 0;
uint64_t total_flops = 0;
- uint64_t flops_per_submit = std::min(uint64_t(200'000'000'000), ctx->last_total_flops / 40u);
+ uint64_t flops_cap = 200'000'000'000ULL;
+
+ // On weaker AMD GPUs larger submissions can hit a driver timeout, submit more often to avoid this
+ if (ctx->device->vendor_id == VK_VENDOR_ID_AMD && ctx->device->shader_core_count > 0) {
+ if (ctx->device->architecture == AMD_GCN && ctx->device->shader_core_count < 32) {
+ flops_cap = 500'000'000ULL * ctx->device->shader_core_count;
+ } else if (ctx->device->architecture != AMD_GCN && ctx->device->shader_core_count < 24) {
+ flops_cap = 2'000'000'000ULL * ctx->device->shader_core_count;
+ }
+ }
+ uint64_t flops_per_submit = std::min(flops_cap, ctx->last_total_flops / 40u);
+
for (int i = 0; i < cgraph->n_nodes; i++) {
if (first_node_in_batch) {
submit_node_idx = i;