diff options
author | A. Unique TensorFlower <nobody@tensorflow.org> | 2016-05-10 10:50:45 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-05-10 12:01:18 -0700 |
commit | aec09b6cb61c63a28e01f6b413499602e224da2f (patch) | |
tree | c6a4175f95e319c44a65f5535172e764dd6e0e31 /tensorflow/core/platform/test_benchmark.h | |
parent | 885cc6bf55745142b8ecc578c61c5f03ff45e6ce (diff) |
fp16 support for BiasAdd. Includes support for atomic adds for Eigen::half,
although beware, they are going to be very slow.
Also:
- Remove the testGradientBias() test, since it was a fp64-only duplication of
tests we already had in other subtests.
- Extend gradient microbenchmarks to measure NCHW and NHWC, not just the
default in a two-dimensional tensor.
- Fix cuda_builtin::__ldg() definition; seemingly calling ::__ldg() on gcudacc
returns only zero, not the __ldg() function we defined a few lines further
up.
Change: 121970776
Diffstat (limited to 'tensorflow/core/platform/test_benchmark.h')
-rw-r--r-- | tensorflow/core/platform/test_benchmark.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tensorflow/core/platform/test_benchmark.h b/tensorflow/core/platform/test_benchmark.h index 4c90cf7f85..3536548f00 100644 --- a/tensorflow/core/platform/test_benchmark.h +++ b/tensorflow/core/platform/test_benchmark.h @@ -17,6 +17,7 @@ limitations under the License. #ifndef TENSORFLOW_PLATFORM_TEST_BENCHMARK_H_ #define TENSORFLOW_PLATFORM_TEST_BENCHMARK_H_ +#include <utility> #include <vector> #include "tensorflow/core/platform/macros.h" #include "tensorflow/core/platform/platform.h" @@ -48,20 +49,23 @@ class Benchmark { public: Benchmark(const char* name, void (*fn)(int)); Benchmark(const char* name, void (*fn)(int, int)); + Benchmark(const char* name, void (*fn)(int, int, int)); Benchmark* Arg(int x); + Benchmark* ArgPair(int x, int y); Benchmark* Range(int lo, int hi); static void Run(const char* pattern); private: string name_; int num_args_; - std::vector<int> args_; + std::vector<std::pair<int, int>> args_; void (*fn0_)(int) = nullptr; void (*fn1_)(int, int) = nullptr; + void (*fn2_)(int, int, int) = nullptr; void Register(); - void Run(int arg, int* run_count, double* run_seconds); + void Run(int arg1, int arg2, int* run_count, double* run_seconds); }; #endif |