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

test whether image fits into CUDA textures #89

Merged
merged 6 commits into from
May 7, 2020
Merged

Conversation

griwodz
Copy link
Member

@griwodz griwodz commented Apr 29, 2020

Description

Several recent bug reports are concerned with images that exceed the CUDA Texture size, but where PopSift just says "out of memory".

This PR adds a method testTextureFit() to class PopSift. This test can be called explicitly to test whether PopSift can be used for a given image and downscale factor, but even if it is not called explicitly, it is called during enqueue(). If an exceeded texture size is detected during enqueue(), NULL will be returned and a multi-line error string is printed on cerr to explain the error (because there are 2 different limits: (linear texture for image loading and layered texture for DoG pyramid creation).

The PR adds also the method testTextureFitErrorString() to get the multi-line explanation as a string for the caller's own purposes.

Features list

New method PopSift::testTextureFit.
New method PopSift::testTextureFitErrorString.

Provides explanations and hints for errors #77 and #88.

Implementation remarks

PopSift::enqueue changes behaviour. It can now return NULL if it will be impossible to process the given image size.

@griwodz
Copy link
Member Author

griwodz commented Apr 29, 2020

Sorry about the force push, I added [popsift] to the commit string.

@griwodz griwodz self-assigned this Apr 29, 2020
@griwodz griwodz added this to the v1.0.0 milestone Apr 29, 2020
@simogasp simogasp linked an issue Apr 30, 2020 that may be closed by this pull request
Copy link
Member

@simogasp simogasp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
I just fixed very minor syntax stuff (easier to make than writing on a review...)

@griwodz griwodz merged commit 7fc809b into develop May 7, 2020
@griwodz griwodz deleted the dev/sizecheck branch May 7, 2020 08:54
@nguyengiang41
Copy link

Hello @griwodz ,
I test your PR in PopSIFT release 1.0 version. It seem that this test is just taken in account the limit of graphic card to process image, it does not taken in account the VRAM available , which could cause the same error message "out of memory" when using cudaMalloc3DArray.
Could you confirm ?

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

Successfully merging this pull request may close these issues.

[question] image size limitation?
3 participants