Member not found due to automatic change of namespace

Hi, I am using llvm@14.0.0 to compile a cuda program with “cuda/annotated_ptr.h” included, and a problem occurs to me.

In file included from b5.cu:34:
In file included from /data/home/mzw/spack/opt/spack/linux-centos7-zen/gcc-7.5.0/cuda-11.5.0-m5vnfghinm5zygqtqh2s6uxvnbvo4wht/include/cuda/annotated_ptr:58:
In file included from /data/home/mzw/spack/opt/spack/linux-centos7-zen/gcc-7.5.0/cuda-11.5.0-m5vnfghinm5zygqtqh2s6uxvnbvo4wht/include/cuda/barrier:10:
In file included from /data/home/mzw/spack/opt/spack/linux-centos7-zen/gcc-7.5.0/cuda-11.5.0-m5vnfghinm5zygqtqh2s6uxvnbvo4wht/include/cuda/std/barrier:17:
/data/home/mzw/spack/opt/spack/linux-centos7-zen/gcc-7.5.0/cuda-11.5.0-m5vnfghinm5zygqtqh2s6uxvnbvo4wht/include/cuda/std/atomic:56:22: error: no member named 'thread_scope' in namespace 'cuda::std::__detail'
using std::__detail::thread_scope;

I tried to include the file define this variable, which is in directory called/data/home/mzw/spack/opt/spack/linux-centos7-zen/gcc-7.5.0/cuda-11.5.0-m5vnfghinm5zygqtqh2s6uxvnbvo4wht/include/cuda/std/detail/libcxx/include/support/atomic/, but no luck.

Does anyone know how to solve this? Thank you!