Update generate_gpu to use gen_ext

So we can use gen_ext to output the generated ast_node and gpu_prog.