Sort abit: add hybrid kernels for steps 6 and 8

Put common code of hybrid kernels in macros.