pytorch/benchmarks
Nicolas Hug 9cf6be6b3e Fix torch.nn.functional.interpolate microbenchmark for non-4D inputs
Summary: This diff fixes the `interpolate` microbenchmark for non-4D inputs, which are not supported by the `bilinear` mode

Test Plan:
5D and 3D:

```
# Benchmarking PyTorch: interpolate
# Mode: Eager
# Name: interpolate_input_size(1,3,16,320,320)_output_size(8,256,256)
# Input: input_size: (1, 3, 16, 320, 320), output_size: (8, 256, 256)
Forward Execution Time (us) : 221008.660

# Benchmarking PyTorch: interpolate
# Mode: Eager
# Name: interpolate_input_size(4,512,320)_output_size(256,)
# Input: input_size: (4, 512, 320), output_size: (256,)
Forward Execution Time (us) : 9727.900

```

4D
```
# Benchmarking PyTorch: interpolate
# Mode: Eager
# Name: interpolate_input_size(1,3,60,40)_output_size(24,24)_channels_lastTrue
# Input: input_size: (1, 3, 60, 40), output_size: (24, 24), channels_last: True
Forward Execution Time (us) : 375.181

```

Reviewed By: fmassa

Differential Revision: D26486678

fbshipit-source-id: 5d476afba3f35da9f8b86db16e21505bdb00888b
2021-02-18 02:07:54 -08:00
..
cpp/tensorexpr [1/N] CPU pointwise optimization: Add a benchmark for Relu 2021-02-17 17:18:28 -08:00
distributed Fix benchmarks/distributed/ddp/benchmark.py (#51095) 2021-01-29 11:10:13 -08:00
fastrnns Back out "Revert D25717510: Clean up some type annotations in benchmarks/fastrnns" (#50556) 2021-01-14 15:15:03 -08:00
framework_overhead_benchmark
functional_autograd_benchmark Enable distribution validation if __debug__ (#48743) 2021-01-05 13:59:10 -08:00
operator_benchmark Fix torch.nn.functional.interpolate microbenchmark for non-4D inputs 2021-02-18 02:07:54 -08:00
overrides_benchmark
profiler_benchmark Use libkineto in profiler (#46470) 2020-11-25 04:32:16 -08:00
record_function_benchmark
serialization
sparse Sparse-sparse matrix multiplication (CPU/CUDA) (#39526) 2020-12-21 11:53:55 -08:00
static_runtime Out version for sum (#52225) 2021-02-16 12:01:02 -08:00
tensorexpr Fixing Softmax bench. (#51898) 2021-02-09 15:03:49 -08:00
compare-fastrnn-results.py
compare.sh
README.md
upload_scribe.py

PyTorch Benchmarks

NOTE: This folder is currently work in progress.

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
conda install pytorch torchvision -c pytorch

# Install the latest pytorch master from source.
# It should supersede the installation from the release binary.
cd $PYTORCH_HOME
python setup.py build develop

# Check the pytorch installation version
python -c "import torch; print(torch.__version__)"

Benchmark List

Please refer to each subfolder to discover each benchmark suite