mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-09 06:18:07 +00:00
zr5: reinit the card correctly on errors
previous method was doing a segfault...
This commit is contained in:
parent
dcdafd8732
commit
0fceca6ffe
5
skein.cu
5
skein.cu
@ -416,7 +416,9 @@ extern "C" int scanhash_skeincoin(int thr_id, uint32_t *pdata,
|
||||
|
||||
if (!init[thr_id])
|
||||
{
|
||||
cudaDeviceReset();
|
||||
cudaSetDevice(device_map[thr_id]);
|
||||
|
||||
CUDA_SAFE_CALL(cudaMalloc(&d_hash[thr_id], 64 * throughput));
|
||||
|
||||
cuda_check_cpu_init(thr_id, throughput);
|
||||
@ -469,8 +471,7 @@ extern "C" int scanhash_skeincoin(int thr_id, uint32_t *pdata,
|
||||
else {
|
||||
applog(LOG_INFO, "GPU #%d: result for nonce $%08X does not validate on CPU!", device_map[thr_id], foundNonce);
|
||||
|
||||
// reinit card
|
||||
cudaDeviceReset();
|
||||
// reinit the card
|
||||
init[thr_id] = false;
|
||||
}
|
||||
}
|
||||
|
4
zr5.cu
4
zr5.cu
@ -302,6 +302,7 @@ extern "C" int scanhash_zr5(int thr_id, uint32_t *pdata, const uint32_t *ptarget
|
||||
|
||||
if (!init[thr_id])
|
||||
{
|
||||
cudaDeviceReset();
|
||||
cudaSetDevice(device_map[thr_id]);
|
||||
|
||||
// constants
|
||||
@ -406,8 +407,7 @@ extern "C" int scanhash_zr5(int thr_id, uint32_t *pdata, const uint32_t *ptarget
|
||||
} else {
|
||||
applog(LOG_WARNING, "GPU #%d: result for %08x does not validate on CPU!", device_map[thr_id], foundNonce);
|
||||
|
||||
// reinit card..
|
||||
cudaDeviceReset();
|
||||
// reinit the card..
|
||||
init[thr_id] = false;
|
||||
|
||||
pdata[19]++;
|
||||
|
Loading…
Reference in New Issue
Block a user