-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21902 from seberg/libcufft
Add libcufft recipe
- Loading branch information
Showing
4 changed files
with
213 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
if not exist %PREFIX% mkdir %PREFIX% | ||
|
||
move lib\x64\* %LIBRARY_LIB% | ||
move bin\* %LIBRARY_BIN% | ||
move include\* %LIBRARY_INC% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
# Install to conda style directories | ||
[[ -d lib64 ]] && mv lib64 lib | ||
mkdir -p ${PREFIX}/lib | ||
[[ -d pkg-config ]] && mv pkg-config ${PREFIX}/lib/pkgconfig | ||
[[ -d "$PREFIX/lib/pkgconfig" ]] && sed -E -i "s|cudaroot=.+|cudaroot=$PREFIX|g" $PREFIX/lib/pkgconfig/cufft*.pc | ||
|
||
[[ ${target_platform} == "linux-64" ]] && targetsDir="targets/x86_64-linux" | ||
[[ ${target_platform} == "linux-ppc64le" ]] && targetsDir="targets/ppc64le-linux" | ||
[[ ${target_platform} == "linux-aarch64" ]] && targetsDir="targets/sbsa-linux" | ||
|
||
for i in `ls`; do | ||
[[ $i == "build_env_setup.sh" ]] && continue | ||
[[ $i == "conda_build.sh" ]] && continue | ||
[[ $i == "metadata_conda_debug.yaml" ]] && continue | ||
if [[ $i == "lib" ]] || [[ $i == "include" ]]; then | ||
# Headers and libraries are installed to targetsDir | ||
mkdir -p ${PREFIX}/${targetsDir} | ||
mkdir -p ${PREFIX}/$i | ||
cp -rv $i ${PREFIX}/${targetsDir} | ||
if [[ $i == "lib" ]]; then | ||
for j in "$i"/*.so*; do | ||
# Shared libraries are symlinked in $PREFIX/lib | ||
ln -s ${PREFIX}/${targetsDir}/$j ${PREFIX}/$j | ||
done | ||
fi | ||
else | ||
# Put all other files in targetsDir | ||
mkdir -p ${PREFIX}/${targetsDir}/${PKG_NAME} | ||
cp -rv $i ${PREFIX}/${targetsDir}/${PKG_NAME} | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
arm_variant_type: # [aarch64] | ||
- sbsa # [aarch64] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
{% set name = "libcufft" %} | ||
{% set version = "11.0.0.21" %} | ||
{% set cuda_version = "12.0" %} | ||
{% set platform = "linux-x86_64" %} # [linux64] | ||
{% set platform = "linux-ppc64le" %} # [ppc64le] | ||
{% set platform = "linux-sbsa" %} # [aarch64] | ||
{% set platform = "windows-x86_64" %} # [win] | ||
{% set target_name = "x86_64-linux" %} # [linux64] | ||
{% set target_name = "ppc64le-linux" %} # [ppc64le] | ||
{% set target_name = "sbsa-linux" %} # [aarch64] | ||
{% set target_name = "x64" %} # [win] | ||
{% set extension = "tar.xz" %} # [not win] | ||
{% set extension = "zip" %} # [win] | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
url: https://developer.download.nvidia.com/compute/cuda/redist/{{ name }}/{{ platform }}/{{ name }}-{{ platform }}-{{ version }}-archive.{{ extension }} | ||
sha256: 4650f79fcf377af410afedb56445f1332e8f213ec3c94d660f9a91328c3ecb4a # [linux64] | ||
sha256: e711671995e9d92d16015a4cd3751ec30710a49fa22f2b88a4a42905c248d861 # [ppc64le] | ||
sha256: 91aa1ba5e68ca65778222c9a427a9214c4550d2f45e978e51779a207bafc17a3 # [aarch64] | ||
sha256: a33f577d48ef432d5cfa8d0ebfa789cc5261af5dd84fd9c608235edc3f769e43 # [win] | ||
|
||
build: | ||
number: 0 | ||
skip: true # [osx] | ||
|
||
outputs: | ||
- name: libcufft | ||
files: | ||
- lib/libcufft*.so.* # [linux] | ||
- targets/{{ target_name }}/lib/libcufft*.so.* # [linux] | ||
- Library\bin\cufft*64_*.dll # [win] | ||
requirements: | ||
build: | ||
- {{ compiler("c") }} | ||
- {{ compiler("cxx") }} | ||
- arm-variant * {{ arm_variant_type }} # [aarch64] | ||
- sysroot_{{ target_platform }} 2.17 # [linux] | ||
host: | ||
- cuda-version {{ cuda_version }} | ||
run: | ||
- {{ pin_compatible("cuda-version", max_pin="x.x") }} | ||
run_constrained: | ||
- arm-variant * {{ arm_variant_type }} # [aarch64] | ||
test: | ||
commands: | ||
- test -L $PREFIX/lib/libcufft.so.{{ version }} # [linux] | ||
- test -L $PREFIX/lib/libcufftw.so.{{ version }} # [linux] | ||
- test -L $PREFIX/lib/libcufft.so.{{ version.split(".")[0] }} # [linux] | ||
- test -L $PREFIX/lib/libcufftw.so.{{ version.split(".")[0] }} # [linux] | ||
- test -L $PREFIX/targets/{{ target_name }}/lib/libcufft.so.{{ version.split(".")[0] }} # [linux] | ||
- test -L $PREFIX/targets/{{ target_name }}/lib/libcufftw.so.{{ version.split(".")[0] }} # [linux] | ||
- test -f $PREFIX/targets/{{ target_name }}/lib/libcufft.so.{{ version }} # [linux] | ||
- test -f $PREFIX/targets/{{ target_name }}/lib/libcufftw.so.{{ version }} # [linux] | ||
- if not exist %LIBRARY_BIN%\cufft64_{{ version.split(".")[0] }}.dll exit 1 # [win] | ||
- if not exist %LIBRARY_BIN%\cufftw64_{{ version.split(".")[0] }}.dll exit 1 # [win] | ||
about: | ||
home: https://developer.nvidia.com/cufft | ||
license: LicenseRef-NVIDIA-End-User-License-Agreement | ||
license_file: LICENSE | ||
license_url: https://docs.nvidia.com/cuda/eula/index.html | ||
summary: cuFFT native runtime libraries | ||
description: | | ||
The cuFFT library provides GPU-accelerated Fast Fourier Transform (FFT) implementations. | ||
doc_url: https://docs.nvidia.com/cuda/cufft/ | ||
|
||
- name: libcufft-dev | ||
build: | ||
run_exports: | ||
weak: | ||
- {{ pin_subpackage("libcufft", max_pin="x") }} | ||
files: | ||
- lib/libcufft*.so # [linux] | ||
- lib/pkgconfig # [linux] | ||
- targets/{{ target_name }}/include # [linux] | ||
- targets/{{ target_name }}/lib/libcufft*.so # [linux] | ||
- targets/{{ target_name }}/lib/stubs/libcufft*.so # [linux] | ||
- Library\include # [win] | ||
- Library\lib # [win] | ||
requirements: | ||
build: | ||
- {{ compiler("c") }} | ||
- {{ compiler("cxx") }} | ||
- arm-variant * {{ arm_variant_type }} # [aarch64] | ||
- sysroot_{{ target_platform }} 2.17 # [linux] | ||
host: | ||
- cuda-version {{ cuda_version }} | ||
run: | ||
- {{ pin_compatible("cuda-version", max_pin="x.x") }} | ||
- {{ pin_subpackage("libcufft", exact=True) }} | ||
run_constrained: | ||
- arm-variant * {{ arm_variant_type }} # [aarch64] | ||
- libcufft-static >={{ version }} # [linux] | ||
test: | ||
commands: | ||
- test -L $PREFIX/lib/libcufft.so # [linux] | ||
- test -L $PREFIX/lib/libcufftw.so # [linux] | ||
- test -f $PREFIX/targets/{{ target_name }}/include/cudalibxt.h # [linux] | ||
- test -f $PREFIX/targets/{{ target_name }}/include/cufft.h # [linux] | ||
- test -f $PREFIX/targets/{{ target_name }}/include/cufftw.h # [linux] | ||
- test -f $PREFIX/targets/{{ target_name }}/include/cufftXt.h # [linux] | ||
- test -L $PREFIX/targets/{{ target_name }}/lib/libcufft.so # [linux] | ||
- test -L $PREFIX/targets/{{ target_name }}/lib/libcufftw.so # [linux] | ||
- test -f $PREFIX/targets/{{ target_name }}/lib/stubs/libcufft.so # [linux] | ||
- test -f $PREFIX/targets/{{ target_name }}/lib/stubs/libcufftw.so # [linux] | ||
- if not exist %LIBRARY_INC%\cudalibxt.h exit 1 # [win] | ||
- if not exist %LIBRARY_INC%\cufft.h exit 1 # [win] | ||
- if not exist %LIBRARY_INC%\cufftw.h exit 1 # [win] | ||
- if not exist %LIBRARY_INC%\cufftXt.h exit 1 # [win] | ||
- if not exist %LIBRARY_LIB%\cufft.lib exit 1 # [win] | ||
- if not exist %LIBRARY_LIB%\cufftw.lib exit 1 # [win] | ||
about: | ||
home: https://developer.nvidia.com/cufft | ||
license: LicenseRef-NVIDIA-End-User-License-Agreement | ||
license_file: LICENSE | ||
license_url: https://docs.nvidia.com/cuda/eula/index.html | ||
summary: cuFFT native runtime libraries | ||
description: | | ||
The cuFFT library provides GPU-accelerated Fast Fourier Transform (FFT) implementations. | ||
doc_url: https://docs.nvidia.com/cuda/cufft/ | ||
|
||
- name: libcufft-static | ||
# cuFFT does not ship `*_static.lib` on Windows so only relevant on linux | ||
build: | ||
skip: True # [not linux] | ||
files: | ||
- targets/{{ target_name }}/lib/libcufft*_static*.a | ||
requirements: | ||
build: | ||
- {{ compiler("c") }} | ||
- {{ compiler("cxx") }} | ||
- arm-variant * {{ arm_variant_type }} # [aarch64] | ||
- sysroot_{{ target_platform }} 2.17 # [linux] | ||
host: | ||
- cuda-version {{ cuda_version }} | ||
run: | ||
- {{ pin_compatible("cuda-version", max_pin="x.x") }} | ||
run_constrained: | ||
- arm-variant * {{ arm_variant_type }} # [aarch64] | ||
test: | ||
commands: | ||
- test -f $PREFIX/targets/{{ target_name }}/lib/libcufft_static.a | ||
- test -f $PREFIX/targets/{{ target_name }}/lib/libcufft_static_nocallback.a | ||
- test -f $PREFIX/targets/{{ target_name }}/lib/libcufftw_static.a | ||
about: | ||
home: https://developer.nvidia.com/cufft | ||
license: LicenseRef-NVIDIA-End-User-License-Agreement | ||
license_file: LICENSE | ||
license_url: https://docs.nvidia.com/cuda/eula/index.html | ||
summary: cuFFT native runtime libraries | ||
description: | | ||
The cuFFT library provides GPU-accelerated Fast Fourier Transform (FFT) implementations. | ||
doc_url: https://docs.nvidia.com/cuda/cufft/ | ||
|
||
|
||
about: | ||
home: https://developer.nvidia.com/cufft | ||
license: LicenseRef-NVIDIA-End-User-License-Agreement | ||
license_file: LICENSE | ||
license_url: https://docs.nvidia.com/cuda/eula/index.html | ||
summary: cuFFT native runtime libraries | ||
description: | | ||
The cuFFT library provides GPU-accelerated Fast Fourier Transform (FFT) implementations. | ||
doc_url: https://docs.nvidia.com/cuda/cufft/ | ||
|
||
extra: | ||
recipe-maintainers: | ||
- adibbley | ||
- jakirkham | ||
- seberg |