|
| __device__ __forceinline__ bool | is_whitespace (char c) |
| |
| __device__ uint32_t | crc_multiply (uint32_t a, uint32_t b) |
| | a * b modulo the CRC-32 polynomial, bit-reflected (zlib's multmodp).
|
| |
| __device__ uint32_t | crc_combine (uint32_t first, uint32_t second, uint64_t second_bytes, uint32_t const *x2n) |
| | crc32(A || B) from crc32(A), crc32(B) and |B| (zlib's crc32_combine).
|
| |
| __device__ __forceinline__ uint32_t | slot_containing (uint64_t const *slots, uint32_t files, uint64_t position) |
| | The last of files slots that starts at or before position.
|
| |
| __device__ __forceinline__ uint32_t | kept_in_word (uint64_t word, uint32_t first, uint32_t last) |
| | How many of word's bytes [first, last) kept_byte keeps.
|
| |
| size_t | hardware_inflate_limit (int device) |
| | Largest output, in bytes, that device's hardware decompression engine (Blackwell B200, B300, GB200, GB300) inflates in one operation, or 0 for a device without one.
|
| |
| cuda::device_memory_pool_ref | hardware_inflate_pool (cuda::device_ref device) |
| | Device memory device's decompression engine can read and write.
|
| |
| PFN_cuMemBatchDecompressAsync_v12060 | batch_decompress_entry () |
| | The driver's cuMemBatchDecompressAsync, or nullptr where the driver lacks it.
|
| |
| size_t | deflate_offset (char const *bytes, size_t size) |
| | Where the DEFLATE stream starts in the size bytes of a gzip candidate (one member, no FEXTRA), or 0 if its header runs into the trailer.
|
| |
| size_t cuddl::detail::device_gzip::hardware_inflate_limit |
( |
int |
device | ) |
|
|
inline |
Largest output, in bytes, that device's hardware decompression engine (Blackwell B200, B300, GB200, GB300) inflates in one operation, or 0 for a device without one.
nvCOMP sends a whole batch to the SMs once any output buffer in it exceeds this.
Definition at line 618 of file device_gzip.cuh.
618 {
619 void* address = nullptr;
620 cudaDriverEntryPointQueryResult found{};
621 if (cudaGetDriverEntryPointByVersion(
622 "cuDeviceGetAttribute", &address, 12000U, cudaEnableDefault, &found
623 ) != cudaSuccess ||
624 found != cudaDriverEntryPointSuccess) {
625 return 0;
626 }
627 int limit = 0;
628 auto const attribute = reinterpret_cast<decltype(&cuDeviceGetAttribute)>(address);
629 auto const status =
630 attribute(&limit, CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH, device);
631 return status == CUDA_SUCCESS && limit > 0 ? static_cast<size_t>(limit) : 0;
632}
| cuda::device_memory_pool_ref cuddl::detail::device_gzip::hardware_inflate_pool |
( |
cuda::device_ref |
device | ) |
|
|
inline |
Device memory device's decompression engine can read and write.
CUDA's default pool is not: nvCOMP then falls back to the SMs, which on a B300 inflated 2,000 genomes at 7.3 GB/s of gzip against 57.6 GB/s from this pool. One pool per device for the life of the process, like device_pinned_pool.
Definition at line 638 of file device_gzip.cuh.
638 {
639 static std::mutex mutex;
640 static std::vector<cudaMemPool_t> pools(cuda::devices.size());
641 std::lock_guard lock(mutex);
642 auto& pool = pools.at(static_cast<size_t>(device.get()));
643 if (pool == nullptr) {
644 cudaMemPoolProps properties{};
645 properties.allocType = cudaMemAllocationTypePinned;
646 properties.location = {cudaMemLocationTypeDevice, device.get()};
647 properties.usage = cudaMemPoolCreateUsageHwDecompress;
649 }
650 return cuda::device_memory_pool_ref(pool);
651}
#define CUDDL_CUDA_CALL(err)
Checks a CUDA runtime call and throws std::runtime_error on failure.