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

[VkFFTCUDALib] New package VkFFTCUDALib v.0.1.1 #9312

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

PaulVirally
Copy link

@PaulVirally PaulVirally commented Aug 25, 2024

Adding a new library VkFFTCUDALib version 0.1.1

@PaulVirally PaulVirally changed the title [VkFFTCUDALib] [VkFFTCUDALib] New package VkFFTCUDALib v.0.1.1 Aug 25, 2024
Comment on lines 60 to 63
dependencies = [
HostBuildDependency(PackageSpec(; name="CMake_jll", version=v"3.28.1")),
Dependency("CompilerSupportLibraries_jll")
]
Copy link
Member

Choose a reason for hiding this comment

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

Four tabs is an...uhm...interesting choice for indenting a single level

Suggested change
dependencies = [
HostBuildDependency(PackageSpec(; name="CMake_jll", version=v"3.28.1")),
Dependency("CompilerSupportLibraries_jll")
]
dependencies = [
HostBuildDependency(PackageSpec(; name="CMake_jll", version=v"3.28.1")),
Dependency("CompilerSupportLibraries_jll")
]

I'd say using tabs is a questionable choice overall, all Julia style guides recommend spaces instead.

Comment on lines 10 to 13
sources = [
GitSource("https://github.com/PaulVirally/VkFFTCUDALib.git", "9c8cf2eae261b363e185e5043599ca2726f5aafd"),
FileSource("http://us.download.nvidia.com/XFree86/Linux-x86_64/410.66/NVIDIA-Linux-x86_64-410.66.run", "8fb6ad857fa9a93307adf3f44f5decddd0bf8587a7ad66c6bfb33e07e4feb217"),
]
Copy link
Member

Choose a reason for hiding this comment

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

Indentation in this file is very inconsistent, there's a mix of tabs and spaces. Sticking to only spaces (4 spaces for each level) would be better

Suggested change
sources = [
GitSource("https://github.com/PaulVirally/VkFFTCUDALib.git", "9c8cf2eae261b363e185e5043599ca2726f5aafd"),
FileSource("http://us.download.nvidia.com/XFree86/Linux-x86_64/410.66/NVIDIA-Linux-x86_64-410.66.run", "8fb6ad857fa9a93307adf3f44f5decddd0bf8587a7ad66c6bfb33e07e4feb217"),
]
sources = [
GitSource("https://github.com/PaulVirally/VkFFTCUDALib.git", "9c8cf2eae261b363e185e5043599ca2726f5aafd"),
FileSource("http://us.download.nvidia.com/XFree86/Linux-x86_64/410.66/NVIDIA-Linux-x86_64-410.66.run", "8fb6ad857fa9a93307adf3f44f5decddd0bf8587a7ad66c6bfb33e07e4feb217"),
]

Copy link
Author

Choose a reason for hiding this comment

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

Yes you're right... I was copying code between two different servers which had different editor configs and got some of my indentation messed up :D The new commits should resolve this.

Comment on lines +20 to +26
# Install CUDA driver libraries (all of this is to get libcuda.so to exist and work)
mkdir -p ${prefix}/lib
chmod +x NVIDIA-Linux-x86_64-*.run
./NVIDIA-Linux-x86_64-*.run -x
cp NVIDIA-Linux-x86_64-*/libcuda.so.* $prefix/lib/
ln -s $(cd $prefix/lib; echo libcuda.so*) $prefix/lib/libcuda.so.1
cp NVIDIA-Linux-x86_64-*/libnvidia-fatbinaryloader.so.* $prefix/lib/
Copy link
Member

Choose a reason for hiding this comment

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

These files end up in the final tarball, but they shouldn't

Copy link
Author

Choose a reason for hiding this comment

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

In 5ff08a8 I removed as many files in $workspace/lib as I could without getting warnings about broken symlinks.

Comment on lines 33 to 39
-DCMAKE_PREFIX_PATH="${prefix}" \
-DCMAKE_INSTALL_PREFIX="${prefix}" \
-DCMAKE_TOOLCHAIN_FILE="${CMAKE_TARGET_TOOLCHAIN}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CUDA_ARCHITECTURES="${CUDA_ARCHS}" \
-DCUDA_TOOLKIT_ROOT_DIR="${prefix}/cuda" \
-DCMAKE_CUDA_COMPILER="${prefix}/cuda/bin/nvcc"
Copy link
Member

Choose a reason for hiding this comment

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

For more legibility (4 spaces)

Suggested change
-DCMAKE_PREFIX_PATH="${prefix}" \
-DCMAKE_INSTALL_PREFIX="${prefix}" \
-DCMAKE_TOOLCHAIN_FILE="${CMAKE_TARGET_TOOLCHAIN}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CUDA_ARCHITECTURES="${CUDA_ARCHS}" \
-DCUDA_TOOLKIT_ROOT_DIR="${prefix}/cuda" \
-DCMAKE_CUDA_COMPILER="${prefix}/cuda/bin/nvcc"
-DCMAKE_PREFIX_PATH="${prefix}" \
-DCMAKE_INSTALL_PREFIX="${prefix}" \
-DCMAKE_TOOLCHAIN_FILE="${CMAKE_TARGET_TOOLCHAIN}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CUDA_ARCHITECTURES="${CUDA_ARCHS}" \
-DCUDA_TOOLKIT_ROOT_DIR="${prefix}/cuda" \
-DCMAKE_CUDA_COMPILER="${prefix}/cuda/bin/nvcc"

Comment on lines 65 to 87
for platform in platforms
should_build_platform(triplet(platform)) || continue

# We need the static sdk
cuda_deps = CUDA.required_dependencies(platform; static_sdk=true)

# Build for all major archs supported by SDK
# See https://en.wikipedia.org/wiki/CUDA
if VersionNumber(platform["cuda"]) < v"11.8"
cuda_archs = "50;60;70;80"
else
cuda_archs = "50;60;70;80;90"
end
arch_line = "export CUDA_ARCHS=\"$cuda_archs\"\n"
platform_script = arch_line * script

build_tarballs(ARGS, name, version, sources, platform_script, [platform],
products, [dependencies; cuda_deps];
preferred_gcc_version=v"11",
julia_compat="1.7",
augment_platform_block=CUDA.augment
)
end
Copy link
Member

Choose a reason for hiding this comment

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

Better indentation

Suggested change
for platform in platforms
should_build_platform(triplet(platform)) || continue
# We need the static sdk
cuda_deps = CUDA.required_dependencies(platform; static_sdk=true)
# Build for all major archs supported by SDK
# See https://en.wikipedia.org/wiki/CUDA
if VersionNumber(platform["cuda"]) < v"11.8"
cuda_archs = "50;60;70;80"
else
cuda_archs = "50;60;70;80;90"
end
arch_line = "export CUDA_ARCHS=\"$cuda_archs\"\n"
platform_script = arch_line * script
build_tarballs(ARGS, name, version, sources, platform_script, [platform],
products, [dependencies; cuda_deps];
preferred_gcc_version=v"11",
julia_compat="1.7",
augment_platform_block=CUDA.augment
)
end
for platform in platforms
should_build_platform(triplet(platform)) || continue
# We need the static sdk
cuda_deps = CUDA.required_dependencies(platform; static_sdk=true)
# Build for all major archs supported by SDK
# See https://en.wikipedia.org/wiki/CUDA
if VersionNumber(platform["cuda"]) < v"11.8"
cuda_archs = "50;60;70;80"
else
cuda_archs = "50;60;70;80;90"
end
arch_line = "export CUDA_ARCHS=\"$cuda_archs\"\n"
platform_script = arch_line * script
build_tarballs(ARGS, name, version, sources, platform_script, [platform],
products, [dependencies; cuda_deps];
preferred_gcc_version=v"11",
julia_compat="1.7",
augment_platform_block=CUDA.augment,
)
end

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for taking the time to review all of this! Hopefully 74f7944 resolves all of these indentation issues!

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

Successfully merging this pull request may close these issues.

2 participants