/usr/local/cuda/include/thrust/system/cuda/detail/cub/block/specializations/../../block/block_raking_layout.cuh(112): error: Uninitialized is not a template
/usr/local/cuda/include/thrust/system/cuda/detail/cub/block/specializations/../../block/block_raking_layout.cuh(112): error: not a class or struct name
You don’t mention which version of cub you are using. Make sure to use a version of cub that has been tested with cuda 8. You can discover this from the release notes:
cub is not bundled with CUDA 8.0. It is not bundled with any version of CUDA.
Portions of CUB are contained within the version of thrust that is included with recent versions of CUDA. However this is not a standalone version of CUB that can be used by:
is not documented anywhere and is not a workable attempt to get access to cub.
In fact, you should never include something via such a path in thrust. header files at that level of depth/nesting in thrust are not designed to be used directly in user code. User code that attempts to do so may break from one CUDA version to the next, due to changes in thrust implementation.
Cub is now included in CUDA toolkit distribution. So it should work natively if you have a recent CUDA toolkit version installed.
For other uses, you only need to git clone the master branch or whatever branch of cub you want to use, from the github repo, and then make sure you include path includes the cub header directory in the cloned materials, before it retrieves anything from the CUDA toolkit. I don’t recommend this for general usage, just use what is shipped with the latest CUDA toolkit.