Skip to content

Commit

Permalink
fix(compiler): [GPU backend] add SDFG_MAX_BATCH_SIZE environment vari…
Browse files Browse the repository at this point in the history
…able to control batching limit.
  • Loading branch information
antoniupop committed Apr 25, 2024
1 parent 0414c0f commit a76023a
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,16 @@ struct CompilationOptions {
loopParallelize = true;
break;
case Backend::GPU:
loopParallelize = true;
batchTFHEOps = true;
emitGPUOps = true;
emitSDFGOps = true;
if (maxBatchSize == std::numeric_limits<int64_t>::max())
maxBatchSize = 1 << 16;
char *env = getenv("SDFG_MAX_BATCH_SIZE");
if (env != nullptr) {
int64_t targetMax = strtoul(env, NULL, 10);
if (targetMax > 0)
maxBatchSize = targetMax;
}
break;
}
}
Expand Down

0 comments on commit a76023a

Please sign in to comment.