diff --git a/compilers/concrete-compiler/compiler/include/concretelang/Support/CompilerEngine.h b/compilers/concrete-compiler/compiler/include/concretelang/Support/CompilerEngine.h index e1fd0772ee..4100a43141 100644 --- a/compilers/concrete-compiler/compiler/include/concretelang/Support/CompilerEngine.h +++ b/compilers/concrete-compiler/compiler/include/concretelang/Support/CompilerEngine.h @@ -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::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; } }