Fix(linux/fedora39) patch system headers so build succeeds with cuda (#2253)

Co-authored-by: Cameron Gutman <2695644+cgutman@users.noreply.github.com>
This commit is contained in:
ReenigneArcher 2024-03-13 18:05:45 -04:00 committed by GitHub
parent 3e49e25c63
commit 22736c4ce9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

3
.gitattributes vendored Normal file
View File

@ -0,0 +1,3 @@
# ensure dockerfiles are checked out with LF line endings
Dockerfile text eol=lf
*.dockerfile text eol=lf

View File

@ -81,6 +81,13 @@ cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
cuda_suffix=""
if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
cuda_suffix="_sbsa"
# patch headers https://bugs.launchpad.net/ubuntu/+source/mumax3/+bug/2032624
sed -i 's/__Float32x4_t/int/g' /usr/include/bits/math-vector.h
sed -i 's/__Float64x2_t/int/g' /usr/include/bits/math-vector.h
sed -i 's/__SVFloat32_t/float/g' /usr/include/bits/math-vector.h
sed -i 's/__SVFloat64_t/float/g' /usr/include/bits/math-vector.h
sed -i 's/__SVBool_t/int/g' /usr/include/bits/math-vector.h
fi
url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
echo "cuda url: ${url}"