# benchmark TorchBench is a collection of open source benchmarks used to evaluate PyTorch performance. 基准测试 ``` conda create -n torchbenchmark python=3.10 conda activate torchbenchmark conda install -y -c pytorch magma-cuda118 conda install pytorch torchvision torchtext torchaudio pytorch-cuda=11.8 -c pytorch-nightly -c nvidia git clone https://github.com/pytorch/benchmark cd benchmark python install.py ``` 测试 ``` python test.py -k "test_BERT_pytorch_train_cpu" python run.py [-d {cpu,cuda}] [-t {eval,train}] [--profile] ```