mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Replace setup.py install with pip install (#156711)
#156027 already replaced most use of `python setup.py install`. This PR only adds a few more occurrences and adds `--no-build-isolation` in a few places. Pull Request resolved: https://github.com/pytorch/pytorch/pull/156711 Approved by: https://github.com/atalman
This commit is contained in:
committed by
PyTorch MergeBot
parent
92284fb2ff
commit
fa54b08cd5
@ -104,7 +104,7 @@ if [[ "$DESIRED_CUDA" == *"rocm"* ]]; then
|
||||
export ROCclr_DIR=/opt/rocm/rocclr/lib/cmake/rocclr
|
||||
fi
|
||||
|
||||
echo "Calling 'python -m pip install .' at $(date)"
|
||||
echo "Calling -m pip install . -v --no-build-isolation at $(date)"
|
||||
|
||||
if [[ $LIBTORCH_VARIANT = *"static"* ]]; then
|
||||
STATIC_CMAKE_FLAG="-DTORCH_STATIC=1"
|
||||
|
@ -1617,7 +1617,7 @@ test_operator_benchmark() {
|
||||
test_inductor_set_cpu_affinity
|
||||
|
||||
cd benchmarks/operator_benchmark/pt_extension
|
||||
python -m pip install .
|
||||
python -m pip install . -v --no-build-isolation
|
||||
|
||||
cd "${TEST_DIR}"/benchmarks/operator_benchmark
|
||||
$TASKSET python -m benchmark_all_test --device "$1" --tag-filter "$2" \
|
||||
|
@ -20,7 +20,7 @@ Key Features:
|
||||
The instruction below installs a cpp\_extension for PyTorch and it is required to run the benchmark suite.
|
||||
```bash
|
||||
cd pt_extension
|
||||
python -m pip install .
|
||||
python -m pip install . -v --no-build-isolation
|
||||
```
|
||||
|
||||
## How to run the benchmarks:
|
||||
|
@ -148,7 +148,8 @@ class TestCppExtensionAOT(common.TestCase):
|
||||
|
||||
@unittest.skipIf(IS_WINDOWS, "Not available on Windows")
|
||||
def test_no_python_abi_suffix_sets_the_correct_library_name(self):
|
||||
# For this test, run_test.py will call `python -m pip install .` in the
|
||||
# For this test, run_test.py will call
|
||||
# `python -m pip install . -v --no-build-isolation` in the
|
||||
# cpp_extensions/no_python_abi_suffix_test folder, where the
|
||||
# `BuildExtension` class has a `no_python_abi_suffix` option set to
|
||||
# `True`. This *should* mean that on Python 3, the produced shared
|
||||
|
@ -5696,7 +5696,7 @@ def install_cpp_extension(extension_root):
|
||||
shutil.rmtree(d)
|
||||
|
||||
# Build the extension
|
||||
cmd = [sys.executable, "-m", "pip", "install", "--no-build-isolation", "-v", ".", "--root", install_dir]
|
||||
cmd = [sys.executable, "-m", "pip", "install", extension_root, "-v", "--no-build-isolation", "--root", install_dir]
|
||||
return_code = shell(cmd, cwd=extension_root, env=os.environ)
|
||||
if return_code != 0:
|
||||
raise RuntimeError(f"build failed for cpp extension at {extension_root}")
|
||||
|
Reference in New Issue
Block a user