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

cuda-version host requirement main #114

Merged
merged 3 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ else
export FORCE_CUDA=1
fi

if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" == "1" ]]; then
# Fix wrong (build) architecture being set instead of host architecture
CFLAGS="$(echo ${CFLAGS} | sed 's/ -march=[^ ]*//g' | sed 's/ -mcpu=[^ ]*//g' |sed 's/ -mtune=[^ ]*//g')"
CXXFLAGS="$(echo ${CXXFLAGS} | sed 's/ -march=[^ ]*//g' | sed 's/ -mcpu=[^ ]*//g' |sed 's/ -mtune=[^ ]*//g')"
fi

# remove pyproject.toml
rm -f pyproject.toml

Expand Down
3 changes: 2 additions & 1 deletion recipe/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
context:
version: 0.20.1
build_number: 4
build_number: 5
# see github.com/conda-forge/conda-forge.github.io/issues/1059 for naming discussion
# torchvision requires that CUDA major and minor versions match with pytorch
# https://github.com/pytorch/vision/blob/fa99a5360fbcd1683311d57a76fcc0e7323a4c1e/torchvision/extension.py#L79C1-L85C1
Expand Down Expand Up @@ -133,6 +133,7 @@ outputs:
- setuptools
- if: cuda_compiler_version != "None"
then:
- cuda-version ==${{ cuda_compiler_version }}
- cudnn
- libcublas-dev
- libcusolver-dev
Expand Down
Loading