From 443764bcadac4bcadf4452389ff9ce89530822bf Mon Sep 17 00:00:00 2001 From: Marcel Koester Date: Fri, 8 Sep 2023 09:32:06 +0200 Subject: [PATCH] Updated VelocityDevice to adapt the number of multiprocessors in debug builds. --- Src/ILGPU/Runtime/Velocity/VelocityDevice.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/ILGPU/Runtime/Velocity/VelocityDevice.cs b/Src/ILGPU/Runtime/Velocity/VelocityDevice.cs index e2793482e0..5671329545 100644 --- a/Src/ILGPU/Runtime/Velocity/VelocityDevice.cs +++ b/Src/ILGPU/Runtime/Velocity/VelocityDevice.cs @@ -67,7 +67,11 @@ public VelocityDevice(VelocityDeviceType deviceType) .AsNotNullCast(); WarpSize = TargetSpecializer.WarpSize; MaxNumThreadsPerGroup = MaxNumThreadsPerMultiprocessor = WarpSize; +#if DEBUG + NumMultiprocessors = 1; +#else NumMultiprocessors = Environment.ProcessorCount; +#endif MaxGroupSize = new Index3D( MaxNumThreadsPerGroup, 1,