| 74 | BM_RNG(gpu, TruncatedNormal); |
| 75 | |
| 76 | Tensor VecAlphas(int64 n) { |
| 77 | Tensor alphas(DT_DOUBLE, TensorShape({n})); |
| 78 | for (int i = 0; i < n; i++) { |
| 79 | // Alternate back and forth between small-and-growing (.25) and |
| 80 | // large-and-shrinking (26.67) alpha. |
| 81 | alphas.vec<double>()(i) = |
| 82 | 0.25 + MathUtil::IPow(1.1, i % 2 == 0 ? i : n - i); |
| 83 | } |
| 84 | return alphas; |
| 85 | } |
| 86 | |
| 87 | void BM_cpu_RandomGamma(int iters, int nsamp, int nalpha) { |
| 88 | testing::ItemsProcessed(static_cast<int64>(iters) * nsamp * nalpha); |
no test coverage detected