Thrust v20.9 Release Notes

Release Date: 2020-09-16 // 6 months ago

Previous changes from v1.9.10

  • Summary

    ๐Ÿš€ Thrust 1.9.10 is the release accompanying the NVIDIA HPC SDK 20.5. It adds CMake support for compilation with NVC++ and a number of minor bug fixes for NVC++. It also adds CMake find_package support.

    ๐Ÿ†• New Features

    • ๐Ÿ“ฆ #1130: CMake find_package support. This is significant because there is a legacy FindThrust.cmake script authored by a third party in widespread use in the community which has a bug in how it parses Thrust version numbers which will cause it to incorrectly parse 1.9.10. This script only handles the first digit of each part of the Thrust version number correctly: for example, Thrust 17.17.17 would be interpreted as Thrust 1.1.1701717. You can find directions for using the new CMake find_package support and migrating away from the legacy FindThrust.cmake here
    • #1129: Added thrust::detail::single_device_tls_caching_allocator, a convenient way to get an MR caching allocator for device memory, which is used by NVC++.

    Other Enhancements

    • โ™ป๏ธ #1129: Refactored RDC handling in CMake to be a global option and not create two targets for each example and test.

    ๐Ÿ› Bug Fixes

    • #1129: Fix the legacy thrust::return_temporary_buffer API to support passing a size. This was necessary to enable usage of Thrust caching MR allocators with synchronous Thrust algorithms. This change has allowed NVC++โ€™s C++17 Parallel Algorithms implementation to switch to use Thrust caching MR allocators for device temporary storage, which gives a 2x speedup on large multi-GPU systems such as V100 and A100 DGX where cudaMalloc is very slow.
    • #1128: Respect CUDA_API_PER_THREAD_DEFAULT_STREAM. Thanks to Rong Ou for this contribution.
    • ๐Ÿšš #1131: Fix the one-policy overload of thrust::async::copy to not copy the policy, resolving use-afer-move issues.
    • #1145: When cleaning up type names in unittest::base_class_name, only call std::string::replace if we found the substring we are looking to replace.
    • #1139: Don't use cxx::__demangle in NVC++.
    • #1102: Don't use thrust::detail::normal_distribution_nvcc for Feta because it uses erfcinv, a non-standard function that Feta doesn't have.