-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
here is my test program, it simply called the cuInit(0);. but this function call takes cuInit time: 6557046 us. this call should be about 500ms for a normal GPU. @rnertney , do you know where the overhead comes from for this heavy initialization?
#include <iostream>
#include <cuda.h>
#include <chrono>
int main() {
int gpu_count = 0;
CUresult status;
auto start = std::chrono::high_resolution_clock::now();
status = cuInit(0);
auto end = std::chrono::high_resolution_clock::now();
auto duration_cuInit = std::chrono::duration_cast<std::chrono::microseconds>(end - start).count();
if (status != CUDA_SUCCESS) {
std::cerr << "cuInit failed: " << status << std::endl;
return 1;
}
std::cout << "cuInit time: " << duration_cuInit << " us" << std::endl;
return 0;
}
Metadata
Metadata
Assignees
Labels
No labels