| 356 | |
| 357 | template <class DType> |
| 358 | void copy_to_cpu_async(DType* hptr, DType* dptr, std::vector<int> shape, |
| 359 | cudaStream_t stream = 0) { |
| 360 | CUDA_CHECK(cudaMemcpyAsync( |
| 361 | hptr, dptr, |
| 362 | std::accumulate(shape.begin(), shape.end(), 1, std::multiplies<int>()) * |
| 363 | sizeof(DType), |
| 364 | cudaMemcpyDeviceToHost, stream)); |
| 365 | } |
| 366 | |
| 367 | template <class DType> |
| 368 | void assert_allclose(DType* res_ptr, DType* golden_ptr, std::vector<int> shape, |
nothing calls this directly
no outgoing calls
no test coverage detected