Skip to content

Commit c280d47

Browse files
authored
make platform tag explicit (#2832)
1 parent ffffc32 commit c280d47

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

ci/tools/env-vars

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,19 @@ CUDA_CORE_ARTIFACT_BASENAME="cuda-core-python${PYTHON_VERSION_FORMATTED}-${HOST_
3939
} >> $GITHUB_ENV
4040

4141
if [[ "${1}" == "build" ]]; then
42-
# platform is handled by the default value of platform (`auto`) in cibuildwheel
43-
# here we only need to specify the python version we want
44-
echo "CIBW_BUILD=cp${PYTHON_VERSION_FORMATTED}-*" >> $GITHUB_ENV
45-
if [[ "${HOST_PLATFORM}" == "win-arm64" ]]; then
46-
# cibuildwheel's `auto` architecture detection resolves to AMD64 on the
47-
# windows-11-arm hosted runner (the Actions runner process itself reports
48-
# AMD64 via emulation), so the target arch must be forced explicitly.
49-
echo "CIBW_ARCHS=ARM64" >> $GITHUB_ENV
42+
if [[ "${HOST_PLATFORM}" == "linux-64" ]]; then
43+
CIBW_PLATFORM_TAG="manylinux_x86_64"
44+
elif [[ "${HOST_PLATFORM}" == "linux-aarch64" ]]; then
45+
CIBW_PLATFORM_TAG="manylinux_aarch64"
46+
elif [[ "${HOST_PLATFORM}" == "win-64" ]]; then
47+
CIBW_PLATFORM_TAG="win_amd64"
48+
elif [[ "${HOST_PLATFORM}" == "win-arm64" ]]; then
49+
CIBW_PLATFORM_TAG="win_arm64"
50+
else
51+
echo "Error: unsupported HOST_PLATFORM=${HOST_PLATFORM}" >&2
52+
exit 1
5053
fi
54+
echo "CIBW_BUILD=cp${PYTHON_VERSION_FORMATTED}-${CIBW_PLATFORM_TAG}" >> "$GITHUB_ENV"
5155
BUILD_CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${CUDA_VER})"
5256
echo "BUILD_CUDA_MAJOR=${BUILD_CUDA_MAJOR}" >> $GITHUB_ENV
5357
echo "BUILD_PREV_CUDA_MAJOR=$((${BUILD_CUDA_MAJOR} - 1))" >> $GITHUB_ENV

cuda_bindings/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ build-verbosity = 1
8585
archs = "native"
8686

8787
[tool.cibuildwheel.windows]
88-
archs = "AMD64"
8988
before-build = "pip install delvewheel"
9089
repair-wheel-command = "delvewheel repair --namespace-pkg cuda -w {dest_dir} {wheel}"
9190

cuda_core/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,5 @@ build-verbosity = 1
154154
archs = "native"
155155

156156
[tool.cibuildwheel.windows]
157-
archs = "AMD64"
158157
before-build = "pip install delvewheel"
159158
repair-wheel-command = "delvewheel repair --namespace-pkg cuda --exclude \"torch_cpu.dll;torch_python.dll\" -w {dest_dir} {wheel}"

0 commit comments

Comments
 (0)