Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WDDM causes kernel timed out #10

Open
krypdkat opened this issue Jul 11, 2019 · 1 comment
Open

WDDM causes kernel timed out #10

krypdkat opened this issue Jul 11, 2019 · 1 comment

Comments

@krypdkat
Copy link

Sometimes it shows "unspecified launch failure" since all gpu mem and kernel got crashed before running cuda_find_peach. Mostly happens on low-end CPU rigs (i don't know why), undervolted GPUs.
Solution is:

  1. unlock WDDM: https://docs.nvidia.com/gameworks/content/developertools/desktop/timeout_detection_recovery.htm

  2. split this kernel:
    https://github.com/mochimodev/winminer/blob/master/winminer_v1/winminer/algo/peach/cuda_peach.cu#L401

here is what my code does (which fixes almost all crashed cases):

__global__ void cuda_build_map(uint32_t offset, uint8_t *g_map)
{
    const uint32_t thread = offset + blockDim.x * blockIdx.x + threadIdx.x;
    if (thread < MAP)
        cuda_gen_tile(thread, g_map);
}

gridBuildMap = get_number_SM;
for (int offset_build_map = 0; offset_build_map < MAP; offset_build_map += 256 * gridBuildMap)
                {
                    cuda_build_map << <gridBuildMap, 256, 0, ctx.queue >> >(offset_build_map, ctx.d_map);
                }

since it only runs once per block, it won't hurt the performance much.

@krypdkat
Copy link
Author

plus, you can't check kernel errors if it's not synced yet, at this line: https://github.com/mochimodev/winminer/blob/master/winminer_v1/winminer/algo/peach/cuda_peach.cu#L403

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant