|
|
@ -82,9 +82,9 @@ void cuda_print_devices() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Can't be called directly in cpu-miner.c
|
|
|
|
void cuda_shutdown() |
|
|
|
void cuda_devicereset() |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
cudaDeviceSynchronize(); |
|
|
|
cudaDeviceReset(); |
|
|
|
cudaDeviceReset(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -173,6 +173,20 @@ int cuda_gpu_clocks(struct cgpu_info *gpu) |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if we use 2 threads on the same gpu, we need to reinit the threads
|
|
|
|
|
|
|
|
void cuda_reset_device(int thr_id, bool *init) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
int dev_id = device_map[thr_id]; |
|
|
|
|
|
|
|
for (int i=0; i < MAX_GPUS; i++) { |
|
|
|
|
|
|
|
if (device_map[i] == dev_id) { |
|
|
|
|
|
|
|
init[i] = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
restart_threads(); |
|
|
|
|
|
|
|
cudaDeviceSynchronize(); |
|
|
|
|
|
|
|
cudaDeviceReset(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void cudaReportHardwareFailure(int thr_id, cudaError_t err, const char* func) |
|
|
|
void cudaReportHardwareFailure(int thr_id, cudaError_t err, const char* func) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct cgpu_info *gpu = &thr_info[thr_id].gpu; |
|
|
|
struct cgpu_info *gpu = &thr_info[thr_id].gpu; |
|
|
|