Skip to content

Commit

Permalink
Updated VelocityDevice to adapt the number of multiprocessors in debu…
Browse files Browse the repository at this point in the history
…g builds.
  • Loading branch information
m4rs-mt committed Oct 9, 2023
1 parent d55bce0 commit 6da5bb7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Src/ILGPU/Runtime/Velocity/VelocityDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ public VelocityDevice(VelocityDeviceType deviceType)
.AsNotNullCast<VelocityTargetSpecializer>();
WarpSize = TargetSpecializer.WarpSize;
MaxNumThreadsPerGroup = MaxNumThreadsPerMultiprocessor = WarpSize;
#if DEBUG
NumMultiprocessors = 1;
#else
NumMultiprocessors = Environment.ProcessorCount;
#endif
MaxGroupSize = new Index3D(
MaxNumThreadsPerGroup,
1,
Expand Down

0 comments on commit 6da5bb7

Please sign in to comment.