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 Sep 27, 2023
1 parent ea47982 commit 443764b
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 443764b

Please sign in to comment.