Is it possible to get the warp/wavefront size in runtime?

(I need it inside the kernel so a predefined macro would be great, but if it's only possible to find this value at the host side than I can pass it to the kernel at compilation time.)

Thanks in advance,