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

Library crashing with fatal & system.accessviolation corrupt memory when running on gpu? #13

Open
aloksharma1 opened this issue May 22, 2024 · 4 comments

Comments

@aloksharma1
Copy link

Hello,

in your code, you are using imagesharp directly but i need to perform some custom operations on my video feed for advance detection and drawing. Can you provide a sample code for that, i want to:

  1. filter based on label (so only cars or bikes are boxed in the feed)
  2. get instance segmentation and recolor objects based on filtering

thanks

@aloksharma1
Copy link
Author

i figured it out, the problem is that my model is not running on gpu and crashing with fatal error or access violation errors. i am using cuda toolkit 11.8 & cuDNN as provided in your readme but still getting this issue.
i tried with different cuDNN 8.5, 8.7, 8.9 same issue please help.

my specs are :
rtx 4080 super 16 GB
i9-14900K
128 GB DDR5 RAM

what is the correct version for me?

@aloksharma1 aloksharma1 changed the title How to get bounding boxed and segmentation pixels? Library crashing with fatal & system.accessviolation corrupt memory when running on gpu? May 24, 2024
@NickSwardh
Copy link
Owner

Hi aloksharma1, did you drop the cuDNN dll's in your CUDA-bin folder and update your System Variable (PATH) to include the dir-location to your CUDA-bin folder as well? In case you missed it, check my CUDA and cuDNN installation guide here: https://www.youtube.com/watch?v=KC9-9L7FgPc

CUDA version to use:

  • CUDA v11.8
  • cuDNN 8.9.7 (for CUDA v11.x)

@aloksharma1
Copy link
Author

Hi aloksharma1, did you drop the cuDNN dll's in your CUDA-bin folder and update your System Variable (PATH) to include the dir-location to your CUDA-bin folder as well? In case you missed it, check my CUDA and cuDNN installation guide here: https://www.youtube.com/watch?v=KC9-9L7FgPc

CUDA version to use:

  • CUDA v11.8
  • cuDNN 8.9.7 (for CUDA v11.x)

Yes, already done that, tried different versions of cuDNN from 8.5 to 8.9 too to see if that could have been the problem. The issue stays , my app starts processing with yolo and crashes randomly (only on gpu).

@aloksharma1
Copy link
Author

Here is some more details, i modified your library sample to use gpu and ran a iteration after 1-3 it randomly crashed with these errors apart from access violation its always something different:

System.ExecutionEngineException
  HResult=0x80131506
  Message=Exception of type 'System.ExecutionEngineException' was thrown.

System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=System.Private.CoreLib
  StackTrace:
   at System.Memory`1.get_Span() in /_/src/libraries/System.Private.CoreLib/src/System/Memory.cs:line 350

here is the code change:

foreach (int number in Enumerable.Range(1, 10))
    runDemoAction("yolov8s-seg.onnx", "car2.png", true, true);

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

No branches or pull requests

2 participants