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

Implement kernel for casting float to decimal #2078

Merged
merged 36 commits into from
Jul 26, 2024

Conversation

ttnghia
Copy link
Collaborator

@ttnghia ttnghia commented May 28, 2024

This implements a casting operation from floating point values to decimal values, following the rules of Apache Spark. The casting function also returns an additional boolean flag indicating if there was any failures with any input rows, leaving the caller to make decision whether to accept the result as-is or raise an exception.

Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
@ttnghia ttnghia changed the base branch from branch-24.06 to branch-24.08 May 29, 2024 22:07
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
@ttnghia
Copy link
Collaborator Author

ttnghia commented Jun 10, 2024

Related: NVIDIA/spark-rapids#9847 and NVIDIA/spark-rapids#10890.

This reverts commit e4a1d5d.

# Conflicts:
#	thirdparty/cudf
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
@ttnghia ttnghia added bug Something isn't working and removed feature request labels Jul 19, 2024
@ttnghia ttnghia marked this pull request as ready for review July 19, 2024 23:29
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
@ttnghia ttnghia force-pushed the float_to_decimal branch 2 times, most recently from 8607d14 to 98f603b Compare July 20, 2024 05:05
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
@ttnghia
Copy link
Collaborator Author

ttnghia commented Jul 20, 2024

build

Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
@ttnghia
Copy link
Collaborator Author

ttnghia commented Jul 24, 2024

build

jlowe
jlowe previously approved these changes Jul 25, 2024
Copy link
Member

@jlowe jlowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits on comments. Do we have any performance measurements for the new kernel? Wondering if it's worth making a benchmark for it.

@ttnghia
Copy link
Collaborator Author

ttnghia commented Jul 25, 2024

Minor nits on comments. Do we have any performance measurements for the new kernel? Wondering if it's worth making a benchmark for it.

Previously @thirtiseven helped with benchmarking, like this NVIDIA/spark-rapids#10917 (comment). @thirtiseven can you run such benchmark again on this please? Thanks.

Signed-off-by: Nghia Truong <nghiat@nvidia.com>
Signed-off-by: Nghia Truong <nghiat@nvidia.com>
@jlowe
Copy link
Member

jlowe commented Jul 25, 2024

build

@thirtiseven
Copy link
Collaborator

New perf numbers:

Type CPU 24.08 gluten This PR
Double 147,121.5 524.25 7,105.5 520.5
Float 89,442 440.75 8,007.5 657.75

Float type is a little slower than current code, but it runs much faster than cpu and gluten.

@ttnghia ttnghia merged commit 0862ce7 into NVIDIA:branch-24.08 Jul 26, 2024
3 checks passed
@ttnghia ttnghia deleted the float_to_decimal branch July 26, 2024 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants