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

libvmaf cuda - init_fex_cuda: Assertion `0' failed. #1357

Open
nguyend24 opened this issue Mar 27, 2024 · 3 comments
Open

libvmaf cuda - init_fex_cuda: Assertion `0' failed. #1357

nguyend24 opened this issue Mar 27, 2024 · 3 comments

Comments

@nguyend24
Copy link

Hello,

I've been trying to get libvmaf with cuda working. I compiled ffmpeg using the Dockerfile.cuda. Ran into a few issues with that which were resolved with the suggestions here #1328.

I copied the ffmpeg executable out of the docker container along with the needed libraries to use in a Debian WSL environment.

However, it's throwing an error
code: 218; description: CUDA_ERROR_INVALID_PTX
ffvmaf: ../src/feature/cuda/integer_adm_cuda.c:1026: init_fex_cuda: Assertion `0' failed.

Full logs:
vmaf.txt
image

@kylophone
Copy link
Collaborator

This is typically a mismatch between CUDA driver and runtime. This has come up a few times, and I think we will eventually be looking into something like ffnvcodec to help solve issues like this.

@Gui-Yom
Copy link

Gui-Yom commented Aug 17, 2024

I think the problem comes from the fact that the CUDA Driver API states :

Takes a pointer image and loads the corresponding module module into the current context. The pointer may be obtained by mapping a cubin or PTX or fatbin file, passing a cubin or PTX or fatbin file as a NULL-terminated text string, or incorporating a cubin or fatbin object into the executable resources and using operating system calls such as Windows FindResource() to obtain the pointer.

The ptx files as formatted by xxd do not contain a terminating null byte as required. On my machine, vmaf hangs indefinitely when loading the ptx. I tried adding the null byte and that fixed up things for me. I can share a fix if you want to.

@amachang
Copy link

amachang commented Aug 21, 2024

I faced the same issue. And, as Gui Yom said, there certainly is a problem with PTX code strings embedded in C that were not null-terminated. I wrote some workaround codes. Use it if it helps someone.

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

4 participants