Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fedora 38 issues: CUDA _Float32 is undefined #3808

Closed
totaam opened this issue Mar 27, 2023 · 8 comments
Closed

Fedora 38 issues: CUDA _Float32 is undefined #3808

totaam opened this issue Mar 27, 2023 · 8 comments
Labels
bug Something isn't working packaging

Comments

@totaam
Copy link
Collaborator

totaam commented Mar 27, 2023

/usr/include/bits/mathcalls.h(110): error: identifier "_Float32" is undefined

Error limit reached.
100 errors detected in the compilation of "fs/share/xpra/cuda/BGRX_to_NV12.cu".
Compilation terminated.

Error: failed to compile CUDA kernel BGRA_to_RGBAP
 using command: ['/opt/cuda-x86_64/bin/nvcc', '-fatbin', '-std=c++11', '--allow-unsupported-compiler', '-arch=all', '-Wno-deprecated-gpu-targets', '-Xnvlink', '-ignore-host-info', '-c', 'fs/share/xpra/cuda/XRGB_to_YUV444.cu', '-o', 'fs/share/xpra/cuda/XRGB_to_YUV444.fatbin']

/usr/include/stdlib.h(141): error: identifier "_Float32" is undefined

IIRC, we can't use CUDA 12 because of compatibility issues... but perhaps the upgrade would fix this problem?

@totaam
Copy link
Collaborator Author

totaam commented Mar 28, 2023

Another problem, which Xpra-org/repo-build-scripts@286289f was attempting to fix is that the build scripts rebuild everything, every time!

@totaam
Copy link
Collaborator Author

totaam commented Mar 28, 2023

Another problem - probably a transient one: had to remove passt and passt-selinux to be able to install policycoreutils-devel (a dependency of selinux-policy-devel).

@totaam
Copy link
Collaborator Author

totaam commented Mar 28, 2023

The CUDA issue is not related to the SDK version, or to the -std=c++14 flag (also tried c++17 and c++20).
Scouring the interwebs suggested adding -D_Float32=float (and more for each missing definition) but this only changes the failures.
Looks like broken glibc headers to me.

@totaam
Copy link
Collaborator Author

totaam commented Apr 12, 2023

Still a problem with CUDA 12.1.0_530.30.02

totaam added a commit that referenced this issue Apr 14, 2023
* disable strict mode automatically when building on Python 3.12 or later
* simpler way of turning off nvidia codecs
@totaam
Copy link
Collaborator Author

totaam commented Jul 4, 2023

Still a problem with CUDA 12.2.0_535.54.03

@totaam totaam changed the title Fedora 38 issues Fedora 38 issues: CUDA _Float32 is undefined Jul 18, 2023
@totaam
Copy link
Collaborator Author

totaam commented Aug 12, 2023

Still a problem with CUDA 12.2.1_535.86.10

@totaam
Copy link
Collaborator Author

totaam commented Sep 12, 2023

Workaround in the commit above:

PYTHONPATH=. ./fs/bin/build_cuda_kernels.py
./setup.py sdist --formats=xztar
rpmbuild -ba packaging/rpm/xpra.spec

The script will generate the fatbin cuda kernels and the next two steps will no longer try to rebuild them.
We can run the first script on a system where CUDA builds do work, then the next two as before (ie: in the build containers).

@totaam
Copy link
Collaborator Author

totaam commented Nov 8, 2023

Finally fixed in CUDA 12.3

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working packaging
Projects
None yet
Development

No branches or pull requests

1 participant