From 38e62c06fa69065c51565fe192a816e05e777c51 Mon Sep 17 00:00:00 2001 From: Xuanyao Fong Date: Mon, 9 May 2022 21:42:35 +0800 Subject: [PATCH] update kernel parameters for nvidia --- opencl/init.go | 1 + opencl64/init.go | 1 + 2 files changed, 2 insertions(+) diff --git a/opencl/init.go b/opencl/init.go index 4b8a945..59f05fd 100644 --- a/opencl/init.go +++ b/opencl/init.go @@ -226,6 +226,7 @@ func Init(gpu int) { ClMaxWGNum = ClCUnits ClTotalPE = ClWGSize[2] * ClCUnits if GPUVend == 1 { // Nvidia + ClTotalPE *= 2 if ClMaxWGSize > ClTotalPE { ClMaxWGNum = 1 ClMaxWGSize = ClTotalPE diff --git a/opencl64/init.go b/opencl64/init.go index a42d18a..2ba2e88 100644 --- a/opencl64/init.go +++ b/opencl64/init.go @@ -229,6 +229,7 @@ func Init(gpu int) { ClMaxWGNum = ClCUnits ClTotalPE = ClWGSize[2] * ClCUnits if GPUVend == 1 { // Nvidia + ClTotalPE *= 2 if ClMaxWGSize > ClTotalPE { ClMaxWGNum = 1 ClMaxWGSize = ClTotalPE