diff --git a/ggml/src/ggml-cuda/common.cuh b/ggml/src/ggml-cuda/common.cuh index 4a99a17097..a328a2a82b 100644 --- a/ggml/src/ggml-cuda/common.cuh +++ b/ggml/src/ggml-cuda/common.cuh @@ -231,13 +231,13 @@ template static __inline__ void ggml_cuda_kernel_launch(Kernel kernel, const ggml_cuda_kernel_launch_params & launch_params, Args&&... args) { #if defined(GGML_CUDA_USE_PDL) - // PDL is off by default. To enable, set GGML_CUDA_ENABLE_PDL=1 - static const bool enable_pdl = []() { - const char * env = getenv("GGML_CUDA_ENABLE_PDL"); + // PDL is on by default. To disable, set GGML_CUDA_DISABLE_PDL=1 + static const bool disable_pdl = []() { + const char * env = getenv("GGML_CUDA_DISABLE_PDL"); return env != nullptr && std::atoi(env) != 0; }(); - if (enable_pdl) { + if (!disable_pdl) { auto pdl_cfg = ggml_cuda_pdl_config(launch_params); CUDA_CHECK(cudaLaunchKernelEx(&pdl_cfg.cfg, kernel, std::forward(args)... )); return;