pytorch
ad95099f - fix benchmark_all_test when running on gpu (#29818)

Commit
5 years ago
fix benchmark_all_test when running on gpu (#29818) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/29818 When some of the test running on cuda, there is a runtime error because of missing data transfer from cpu to cuda. This diff fixes that issue. Test Plan: ``` buck run mode/opt //caffe2/benchmarks/operator_benchmark:benchmark_all_test -- --iterations 1 # ---------------------------------------- # PyTorch/Caffe2 Operator Micro-benchmarks # ---------------------------------------- # Tag : short # Benchmarking PyTorch: add # Mode: Eager # Name: add_M64_N64_K64_cpu # Input: M: 64, N: 64, K: 64, device: cpu Forward Execution Time (us) : 165.241 # Benchmarking PyTorch: add # Mode: Eager # Name: add_M64_N64_K64_cuda # Input: M: 64, N: 64, K: 64, device: cuda Forward Execution Time (us) : 56.546 ... Reviewed By: hl475 Differential Revision: D18506269 fbshipit-source-id: 87942d7a52bd398600766c0f5363d791b74a6ca6
Author
Parents
Loading