thread_block block = this_thread_block();
Description Resource Path Location Type
identifier “thread_block” is undefined /cudaDBN/src line 83 C/C++ Problem

yes you need to include a header file

In the blog you linked, please read it. Look for the very first include statement listed in that blog.

Or study any CUDA sample code.

Also note that the synchronization of blocks in cooperative groups will require specific GPU and system characteristics, as well as specific compile options.

编译器用的Nsight Eclipse 头文件#include <cooperative_groups.h>已经包含.GPU是gtx980.系统为Ubuntu18.10任然出错.难道是Nsight需要配置吗?

study a CUDA sample code project that uses cooperative groups

you can import it as a makefile project into nsight eclipse if you wish

GTX 980 cannot do inter-block synchronization via grid.sync() in cooperative groups.