Skip to content

Commit

Permalink
check that we are in cos8
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruf committed Oct 31, 2022
1 parent 8929cd9 commit 0d2cb01
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion recipe/cross_compile_support.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ BUILD_PLATFORM=$(conda info --json | jq -r .platform)
if [ -f ${CI_SUPPORT}/${CONFIG}.yaml ]; then
HOST_PLATFORM=$(cat ${CI_SUPPORT}/${CONFIG}.yaml | shyaml get-value target_platform.0 ${BUILD_PLATFORM})
CUDA_COMPILER_VERSION=$(cat ${CI_SUPPORT}/${CONFIG}.yaml | shyaml get-value cuda_compiler_version.0 None)
CDT_NAME=$(cat ${CI_SUPPORT}/${CONFIG}.yaml | shyaml get-value cdt_name.0 cos6)
fi

HOST_PLATFORM=${HOST_PLATFORM:-${BUILD_PLATFORM}}
CUDA_COMPILER_VERSION=${CUDA_COMPILER_VERSION:-None}
CDT_NAME=${CDT_NAME:-cos6}

if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then
echo "export CONDA_BUILD_CROSS_COMPILATION=1" >> "${CONDA_PREFIX}/etc/conda/activate.d/conda-forge-ci-setup-activate.sh"
Expand Down Expand Up @@ -34,7 +36,7 @@ if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then
fi


if [[ "${CUDA_COMPILER_VERSION}" == "11.2" ]]; then
if [[ "${CUDA_COMPILER_VERSION}" == "11.2" && "${CDT_NAME}" == "cos8" ]]; then
EXTRACT_DIR=$(mktemp -d)
pushd ${EXTRACT_DIR}
if [[ "${HOST_PLATFORM_ARCH}" == "aarch64" ]]; then
Expand Down Expand Up @@ -72,6 +74,9 @@ if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then
mv ./usr/local/cuda-${CUDA_COMPILER_VERSION}/targets/${CUDA_HOST_PLATFORM_ARCH}-linux ${CUDA_HOME}/targets/${CUDA_HOST_PLATFORM_ARCH}-linux
popd
rm -rf ${EXTRACT_DIR}
elif [[ "${CUDA_COMPILER_VERSION}" == "11.2" ]]; then
echo "cross compiling with cuda == 11.2 and cdt != cos8 not supported yet"
exit 1
elif [[ "${CUDA_COMPILER_VERSION}" != "None" ]]; then
# FIXME: can use anaconda.org/nvidia packages to get the includes and libs
# for cuda >=11.3.
Expand Down

0 comments on commit 0d2cb01

Please sign in to comment.