Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Radix sort - too many resources requested for launch #1263

Open
dellamonica opened this issue Jul 26, 2024 · 0 comments
Open

[BUG]: Radix sort - too many resources requested for launch #1263

dellamonica opened this issue Jul 26, 2024 · 0 comments
Labels

Comments

@dellamonica
Copy link

dellamonica commented Jul 26, 2024

Describe the bug

Calling the method returned by CreateRadixSort is throwing CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES.

Environment

  • ILGPU version: 1.5.1
  • .NET version: .NET 8
  • Operating system: Windows 11
  • Hardware (if GPU-related): NVIDIA GeForce GTX 1060

Steps to reproduce

using SortOp = RadixSortPairsOperation<float, int, DescendingFloat>;
...
var sort = accel.CreateRadixSort<RadixSortPair<float, int>, Stride1D.Dense, SortOp>();
int tempSize = accel.ComputeRadixSortTempStorageSize<RadixSortPair<float, int>, SortOp>(buffer.IntLength);
using var tmpBuffer = accel.Allocate1D<int>(tempSize);
sort(accel.DefaultStream, buffer, tmpBuffer.View);

The buffer above is an ArrayView<RadixSortPair<float, int>>
buffer = Extent = {(10340985)}, Length = 10340985
tempSize = 20762773

Also tried with smaller sized buffers (fewer than 1M) but the problem persisted.

Expected behavior

Launch should succeed and properly execute the sort.

Additional context

The code is running under a unit test. A couple of hours after filing this issue, I noticed that the error only occurs when the debugger is running. If the test is run without a debugger attached, it all works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant