Giter Club home page Giter Club logo

Comments (5)

daktfi avatar daktfi commented on May 18, 2024

Launching my app under cuda-memcheck I got following message from it:
Invoking scan_init_kernel<<<306, 128, 0, 139992313554640>>>()

========= Invalid __global__ write of size 4
=========     at 0x00000128 in void cub::DeviceCompactInitKernel<cub::ScanTileState<int, bool=1>, unsigned int*>(int, int, bool=1)
=========     by thread (0,0,0) in block (0,0,0)
=========     Address 0x7f52921b9268 is out of bounds

from cub.

daktfi avatar daktfi commented on May 18, 2024

After I compiled the code with -lineinfo option I got the row number:
at 0x00000128 in /home/daktfi/polymatica/cub/cub/device/dispatch/dispatch_scan.cuh:88:void cub::DeviceCompactInitKernel<cub::ScanTileState<int, bool=1>, unsigned int*>(int, int, bool=1)
Hope this helps.
The -G option did not worked out - my code is part of larger project and at the moment I'm unable to compile it separately, as according to this NVIDIA/thrust#864 it requires extra nvcc linking pass.

from cub.

daktfi avatar daktfi commented on May 18, 2024

I finally got the working standalone project (attached) which reproduces error and get it commented. There's quite complicated logic behind the the issue, so if You have question - I'll gladly explain.

devselect.zip

from cub.

dumerrill avatar dumerrill commented on May 18, 2024

Hi, I think the "an illegal memory access was encountered" issue is probably related to cub::DeviceSelect:If() expecting a pointer to device memory for where to output the number of items selected. (You are simply referencing the auto-var length on the host thread's program stack, which isn't visible to the GPU threads.) You'll want to create a device-allocation for that.

Let me know if that helps!

from cub.

daktfi avatar daktfi commented on May 18, 2024

Only one word: "oops". :-(
The most stupid bugs are hardest to find...
Worked like a charm! Thanks a lot!!!

from cub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.