Skip to content

Commit 63ad1ad

Browse files
authored
Replace setup.py bdist_wheel with python -m build --wheel --no-isolation for PyTorch (#5241)
Modern way to make bdist. `build` module is an extra dependency but for PyTorch it's already in https://github.com/pytorch/pytorch/blob/main/requirements.txt Signed-off-by: Anatoly Myachev <[email protected]>
1 parent ecf1997 commit 63ad1ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/actions/setup-pytorch/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ runs:
126126
# CMake Error at third_party/protobuf/cmake/CMakeLists.txt:2 (cmake_minimum_required)
127127
pip install 'cmake<4.0.0'
128128
pip install -r requirements.txt
129-
USE_XCCL=1 USE_STATIC_MKL=1 python setup.py bdist_wheel 2>&1 | grep -v \
129+
USE_XCCL=1 USE_STATIC_MKL=1 python -m build --wheel --no-isolation 2>&1 | grep -v \
130130
"Double arithmetic operation is not supported on this platform with FP64 conversion emulation mode (poison FP64 kernels is enabled)." | grep -v '^$'
131131
132132
- name: Install PyTorch (built from source)

scripts/install-pytorch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ function build_pytorch {
257257
export libuv_ROOT="$PYTORCH_PROJ/libuv-1.40.0"
258258
fi
259259

260-
USE_XCCL=1 USE_STATIC_MKL=1 python setup.py bdist_wheel
260+
USE_XCCL=1 USE_STATIC_MKL=1 python -m build --wheel --no-isolation
261261
}
262262

263263
function install_pytorch {

0 commit comments

Comments
 (0)