(self, dtype)
| 126 | self._testLargeSort(np.float16) |
| 127 | |
| 128 | def _testLargeTopK(self, dtype): |
| 129 | b = 10 |
| 130 | n = 5000 |
| 131 | k = n - 1 |
| 132 | inputs = np.random.permutation( |
| 133 | np.linspace(0, 100, b * n, dtype=dtype)).reshape(b, n) |
| 134 | indices = np.argsort(-inputs, axis=1)[:, :k] |
| 135 | values = -np.sort(-inputs, axis=1)[:, :k] |
| 136 | self._validateTopK(inputs, k, values, indices) |
| 137 | |
| 138 | def testLargeTopK(self): |
| 139 | self._testLargeTopK(np.float32) |
no test coverage detected