pytorch
747233e3 - minir edit to fix benchmark_all_test cuda error (#29829)

Commit
5 years ago
minir edit to fix benchmark_all_test cuda error (#29829) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/29829 This diff replaces the if check cuda with to(device...) which is a much cleaner interface. 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) : 129.548 # Benchmarking PyTorch: add # Mode: Eager # Name: add_M64_N64_K64_cuda # Input: M: 64, N: 64, K: 64, device: cuda Forward Execution Time (us) : 48.313 ... Reviewed By: bddppq Differential Revision: D18507568 fbshipit-source-id: 32534e76b2e27d59a631a4d76a0d93700e975ea4
Author
Parents
Loading