| 25 | namespace { |
| 26 | |
| 27 | void check(cudaError_t e, const char* what) { |
| 28 | if (e != cudaSuccess) { |
| 29 | std::fprintf(stderr, "%s: %s\n", what, cudaGetErrorString(e)); |
| 30 | std::exit(1); |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | // The host reference for the specified order: top_k -> top_p -> temperature -> argmax. |
| 35 | // `temp_first` swaps the first and last stages, which is the intuitive-but-wrong order. |
no test coverage detected