NVIDIA / NVIDIA/cudf

Consolidate and optimize integer power implementations in libcudf

Open
#14,243 0 comments 0 reactions 1 assignee Claimed by @bdice View on GitHub
feature request libcudf
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

Recently, some issues were identified where `std::pow` was being used with fixed-point values (#14210, #14233, #14242). There are many places in libcudf where we require an "integer power" operator, because `std::pow` uses floating-point values and thus gives erroneous results when handling high-precision integral values like `decimal128`. [This thread](https://github.com/rapidsai/cudf/pull/14233#discussion_r1340671836) covers a few key changes that are needed in libcudf:
- Consolidating existing "integer power" operators:
- https://github.com/rapidsai/cudf/blob/7825790eac838e7a852d9b2429c64e78710cee28/cpp/include/cudf/fixed_point/fixed_point.hpp#L93
- https://github.com/rapidsai/cudf/blob/7825790eac838e7a852d9b2429c64e78710cee28/cpp/src/binaryop/compiled/operation.cuh#L251
- Changes from #14233
- Changes from #14242
- Using a lookup table where possible (#9346), and exponentiation-by-squaring if outside the lookup table's bounds

Related: https://github.com/rapidsai/cudf/issues/10178

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.