diff --git a/lib/cmake/thrust/README.md b/lib/cmake/thrust/README.md index 09cbc6debb5..57fe02f6238 100644 --- a/lib/cmake/thrust/README.md +++ b/lib/cmake/thrust/README.md @@ -38,6 +38,22 @@ If using Thrust from the CCCL sources, this would be $ cmake . -DThrust_DIR=/thrust/thrust/cmake/ ``` +#### Large Array (>2^32 element) Handling: `DISPATCH` + +The `DISPATCH` option allows users to select the tradeoff of compile-time / binary-size +vs. performance vs. scalability when given large inputs with greater than 2^32 elements. +This currently only applies when DEVICE=CUDA. + +- `Dynamic` Compiles each kernel twice, once for 32-bit offsets and again for 64-bit offsets, + and chooses dynamically using the input size at runtime. + This significantly increases compile-time and binary-size, but provides optimal performance + for small input sizes while also supporting 64-bit indexed workloads. +- `Force32bit` forces Thrust to use a 32 bit offset type. This improves compile time and + binary size but limits the input size. +- `Force64bit` forces Thrust to use a 64 bit offset type. This improves compile time and + binary size and allows large input sizes. However, it may degrade runtime performance + for 32-bit indexed workloads. + #### TBB / OpenMP To explicitly specify host/device systems, `HOST` and `DEVICE` arguments can be @@ -56,17 +72,21 @@ host system, but will find and use TBB or OpenMP for the device system. To allow a Thrust target to be configurable easily via `cmake-gui` or `ccmake`, pass the `FROM_OPTIONS` flag to `thrust_create_target`. This will add -`THRUST_HOST_SYSTEM` and `THRUST_DEVICE_SYSTEM` options to the CMake cache that -allow selection from the systems supported by this version of Thrust. +`THRUST_HOST_SYSTEM`, `THRUST_DEVICE_SYSTEM`, and `THRUST_DISPATCH_TYPE` options +to the CMake cache that allow selection from the systems supported by this version +of Thrust. ```cmake thrust_create_target(Thrust FROM_OPTIONS [HOST_OPTION