Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Decimal <--> Floating conversion #15905

Merged
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a38f983
Decimal <--> Floating conversion.
pmattione-nvidia Jun 2, 2024
26ed8fe
Remove xfail from python conversion test
pmattione-nvidia Jun 3, 2024
b77472b
Corrected increment, use CUDF_ENABLE_IF, denormals working
pmattione-nvidia Jun 24, 2024
5b181e0
Merge branch 'branch-24.08' into main_conversion_branch
pmattione-nvidia Jun 24, 2024
720b838
Update comments
pmattione-nvidia Jun 24, 2024
aeff9bc
Merge branch 'main_conversion_branch' of https://github.com/pmattione…
pmattione-nvidia Jun 24, 2024
b9eb32d
Change ++ on trunc to add half-bit on trunc.
pmattione-nvidia Jun 25, 2024
027140f
Fix compile error
pmattione-nvidia Jun 25, 2024
b86af73
Merge branch 'branch-24.08' into main_conversion_branch
pmattione-nvidia Jun 27, 2024
6a47a0a
Fix java tests. Long.MAX_VALUE gets converted to a double of 2^64 on …
pmattione-nvidia Jun 27, 2024
28457b3
Update test comment
pmattione-nvidia Jun 27, 2024
8fceaa9
Merge branch 'main_conversion_branch' of https://github.com/pmattione…
pmattione-nvidia Jun 27, 2024
ac9587d
Fix conversion from java int to long
pmattione-nvidia Jun 27, 2024
ac042d3
Update java/src/test/java/ai/rapids/cudf/ColumnVectorTest.java
pmattione-nvidia Jun 27, 2024
c7441eb
Actually fix conversion from java int to long
pmattione-nvidia Jun 27, 2024
3e4265f
Last python tests pass, matching pandas
pmattione-nvidia Jul 1, 2024
f7a8663
Remove unused python package
pmattione-nvidia Jul 1, 2024
cf531d4
Address comments
pmattione-nvidia Jul 1, 2024
55859d9
Remove last-bit-shift rounding needed to match pyarrow; not desired
pmattione-nvidia Jul 8, 2024
5954b6b
Fix overflow bug
pmattione-nvidia Jul 9, 2024
4d88358
Merge branch 'branch-24.08' into main_conversion_branch
pmattione-nvidia Jul 9, 2024
738f1a5
Split shifting into separate function.
pmattione-nvidia Jul 9, 2024
a5bfaad
Merge branch 'main_conversion_branch' of https://github.com/pmattione…
pmattione-nvidia Jul 9, 2024
0606673
Don't add half bit if converting a whole number!
pmattione-nvidia Jul 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions cpp/benchmarks/decimal/convert_floating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ void bench_cast_decimal(nvbench::state& state, nvbench::type_list<InputType, Out

static constexpr bool is_double =
std::is_same_v<InputType, double> || std::is_same_v<OutputType, double>;
static constexpr bool is_32bit =
std::is_same_v<InputType, numeric::decimal32> || std::is_same_v<OutputType, numeric::decimal32>;
static constexpr bool is_128bit = std::is_same_v<InputType, numeric::decimal128> ||
std::is_same_v<OutputType, numeric::decimal128>;

Expand Down Expand Up @@ -69,21 +67,6 @@ void bench_cast_decimal(nvbench::state& state, nvbench::type_list<InputType, Out
return;
}

// The current float <--> decimal conversion algorithm is limited
static constexpr bool is_64bit = !is_32bit && !is_128bit;
if (is_32bit && (exp_mode != 3)) {
state.skip("Decimal32 conversion only works up to scale factors of 10^9.");
return;
}
if (is_64bit && ((exp_mode < 2) || (exp_mode > 4))) {
state.skip("Decimal64 conversion only works up to scale factors of 10^18.");
return;
}
if (is_128bit && ((exp_mode == 0) || (exp_mode == 6))) {
state.skip("Decimal128 conversion only works up to scale factors of 10^38.");
return;
}

// Type IDs
auto const input_id = cudf::type_to_id<InputType>();
auto const output_id = cudf::type_to_id<OutputType>();
Expand Down
Loading
Loading