From 7e6a4770483aa0ad3714f48737700a461411c66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Sat, 16 Mar 2024 12:06:58 +0000 Subject: [PATCH] Set `parallel` to `false` if `parent_job` is not `nothing` --- src/compiler.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler.jl b/src/compiler.jl index 676d1f302c..8405ccbdec 100644 --- a/src/compiler.jl +++ b/src/compiler.jl @@ -4758,7 +4758,7 @@ function GPUCompiler.codegen(output::Symbol, job::CompilerJob{<:EnzymeTarget}; target_machine = GPUCompiler.llvm_machine(primal_job.config.target) end - parallel = Threads.nthreads() > 1 + parallel = parent_job === nothing ? Threads.nthreads() > 1 : false process_module = false device_module = false if parent_job !== nothing