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

It appears that there may be a bug in the libvmaf CUDA implementation. #1305

Open
nukim1 opened this issue Jan 12, 2024 · 3 comments
Open

It appears that there may be a bug in the libvmaf CUDA implementation. #1305

nukim1 opened this issue Jan 12, 2024 · 3 comments
Labels

Comments

@nukim1
Copy link

nukim1 commented Jan 12, 2024

I am currently implementing a program that utilizes multiple instances of libvmaf asynchronously.

Initializing each instance by setting VmafCudaConfiguration::cu_ctx = cuCtxCreate(...) poses no issues.

However, when all instances are initialized with the same CUDA context, problems arise during the "vmaf_score_at_index" calls, resulting
in incorrect VMAF scores or NaN values being output intermittently.

I've checked my code from various angles just in case there might be a problem, but everything seems fine. It is likely that the issue lies with libvmaf.

Moreover, if each libvmaf instance does not share the same CUDA context, there is a performance degradation issue.

this is my one of test result: link

tested VMAF version was 3.0.0

@nilfm99
Copy link
Collaborator

nilfm99 commented Jan 19, 2024

I believe this is the same or similar issue to #1180. @kylophone FYI, in case something needs to be fixed

@nukim1
Copy link
Author

nukim1 commented Jan 19, 2024

I believe this is the same or similar issue to #1180. @kylophone FYI, in case something needs to be fixed
I believe my situation differs from what you've mentioned. Although I'm not explicitly mentioned, I called 'vmaf_score_at_index' with a exact two pictures delay for every cases.
Therefore, no log messages were output from any vmaf instancese. Loglevel has been set to DEBUG

@nilfm99 nilfm99 added the cuda label Feb 1, 2024
@kylophone
Copy link
Collaborator

kylophone commented Feb 1, 2024

Yes, I believe this is a similar synchronization to #1180. I think the only way around this is to introduce a new async callback-type API.

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

3 participants