mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 00:20:18 +01:00
Modernize the development installation:
```bash
# python setup.py develop
python -m pip install --no-build-isolation -e .
# python setup.py install
python -m pip install --no-build-isolation .
```
Now, the `python setup.py develop` is a wrapper around `python -m pip install -e .` since `setuptools>=80.0`:
- pypa/setuptools#4955
`python setup.py install` is deprecated and will emit a warning during run. The warning will become an error on October 31, 2025.
- 9c4d383631/setuptools/command/install.py (L58-L67)
> ```python
> SetuptoolsDeprecationWarning.emit(
> "setup.py install is deprecated.",
> """
> Please avoid running ``setup.py`` directly.
> Instead, use pypa/build, pypa/installer or other
> standards-based tools.
> """,
> see_url="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html",
> due_date=(2025, 10, 31),
> )
> ```
- pypa/setuptools#3849
Additional Resource:
- [Why you shouldn't invoke setup.py directly](https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/156027
Approved by: https://github.com/ezyang
35 lines
1.2 KiB
Markdown
35 lines
1.2 KiB
Markdown
# PyTorch Benchmarks
|
|
|
|
This folder contains scripts that produce reproducible timings of various PyTorch features.
|
|
|
|
It also provides mechanisms to compare PyTorch with other frameworks.
|
|
|
|
## Setup environment
|
|
Make sure you're on a machine with CUDA, torchvision, and pytorch installed. Install in the following order:
|
|
```
|
|
# Install torchvision. It comes with the pytorch stable release binary
|
|
python -m pip install torch torchvision
|
|
|
|
# Install the latest pytorch master from source.
|
|
# It should supersede the installation from the release binary.
|
|
cd $PYTORCH_HOME
|
|
python -m pip install --no-build-isolation -v -e .
|
|
|
|
# Check the pytorch installation version
|
|
python -c "import torch; print(torch.__version__)"
|
|
```
|
|
|
|
## Benchmark List
|
|
|
|
Please refer to each subfolder to discover each benchmark suite. Links are provided where descriptions exist:
|
|
|
|
* [Fast RNNs](fastrnns/README.md)
|
|
* [Dynamo](dynamo/README.md)
|
|
* [Functional autograd](functional_autograd_benchmark/README.md)
|
|
* [Instruction counts](instruction_counts/README.md)
|
|
* [Operator](operator_benchmark/README.md)
|
|
* [Overrides](overrides_benchmark/README.md)
|
|
* [Sparse](sparse/README.md)
|
|
* [Tensor expression](tensorexpr/HowToRun.md)
|
|
* [Data](data/README.md)
|