FAQ  •  Login

Could I call a kernel in a kernel?

<<

xiudongwu

Newbie
Newbie

Posts: 15

Joined: Fri Sep 04, 2015 12:51 pm

Unread post Mon Dec 14, 2015 9:50 pm

Could I call a kernel in a kernel?

I want to call a kernel in a kernel.
<<

xiudongwu

Newbie
Newbie

Posts: 15

Joined: Fri Sep 04, 2015 12:51 pm

Unread post Mon Dec 14, 2015 9:54 pm

Re: Could I call a kernel in a kernel?

maybe I just need call several kernel
<<

kema

Newbie
Newbie

Posts: 41

Joined: Fri Sep 04, 2015 12:51 pm

Unread post Tue Dec 15, 2015 12:07 am

Re: Could I call a kernel in a kernel?

No. A kernel is a __global__ function, which means it can only be called on host and executed on device.
<<

shantanurajendrabhate

Newbie
Newbie

Posts: 19

Joined: Fri Sep 04, 2015 12:51 pm

Unread post Wed Dec 16, 2015 1:19 pm

Re: Could I call a kernel in a kernel?

If your GPU compute capability supports dynamic parallelism, you can call kernels from within kernels.
<<

jingli

Newbie
Newbie

Posts: 3

Joined: Fri Sep 04, 2015 12:51 pm

Unread post Wed Dec 16, 2015 4:54 pm

Re: Could I call a kernel in a kernel?

Don't think you may call __global__ function() again, because you are now in device, the '__global__ function()' can only be called from host.
<<

yuelinpeng

Newbie
Newbie

Posts: 7

Joined: Fri Sep 04, 2015 12:51 pm

Unread post Fri Dec 18, 2015 3:30 pm

Re: Could I call a kernel in a kernel?

Someone said we can do that with certain CUDA version. I am not sure if that is ture or not.

Return to ME759 Fall 2015: High Performance Computing

Who is online

Users browsing this forum: No registered users and 4 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.