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

Adding float to string kernel #1508

Merged
merged 40 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0e7485c
wip
thirtiseven Oct 13, 2023
2c04fff
wip
thirtiseven Oct 18, 2023
6883988
Merge branch 'NVIDIA:branch-23.12' into float_to_string
thirtiseven Oct 18, 2023
cbce724
Add float to string kernel
thirtiseven Oct 18, 2023
8d7ead2
Update src/main/cpp/src/cast_float_to_string.cu
thirtiseven Oct 19, 2023
9ab2089
Update src/main/cpp/src/cast_float_to_string.cu
thirtiseven Oct 19, 2023
c3b3d64
address comments and use different precision for float
thirtiseven Oct 19, 2023
007cf5e
rewrite the solution with ryu
thirtiseven Nov 6, 2023
1264317
update license
thirtiseven Nov 6, 2023
a87a403
clean up
thirtiseven Nov 7, 2023
979dc39
Split ftos_converter out
thirtiseven Nov 13, 2023
4c75bc7
clean up
thirtiseven Nov 13, 2023
744d0df
Merge branch 'float_to_string' of https://github.com/thirtiseven/spar…
thirtiseven Nov 14, 2023
f1c11e6
resolve cudf conflicts
thirtiseven Nov 14, 2023
760799b
resolve cudf conflicts
thirtiseven Nov 14, 2023
bfba655
resolve cudf conflicts
thirtiseven Nov 14, 2023
ad27fee
resolve cudf conflicts
thirtiseven Nov 14, 2023
77841d9
Merge branch 'float_to_string' of https://github.com/thirtiseven/spar…
thirtiseven Nov 14, 2023
6728170
Merge branch 'thirtiseven-float_to_string' into float_to_string
thirtiseven Nov 14, 2023
40a4cb8
remove cudf changes
thirtiseven Nov 14, 2023
05f5517
remove cudf changes
thirtiseven Nov 14, 2023
07c961e
Merge branch 'NVIDIA:branch-23.12' into float_to_string
thirtiseven Nov 14, 2023
da2197b
Add copyright and notice
thirtiseven Nov 16, 2023
48a5d7a
Merge branch 'float_to_string' of https://github.com/thirtiseven/spar…
thirtiseven Nov 16, 2023
2c6cdcb
Fix copyrights and license
thirtiseven Nov 17, 2023
3228755
cudf conflict resolve
thirtiseven Nov 17, 2023
dc570cb
Add nv apache license to ftos_converter
thirtiseven Nov 21, 2023
360a77b
Update src/main/cpp/src/ftos_converter.cu
thirtiseven Nov 21, 2023
ced33b6
address some comments
thirtiseven Nov 22, 2023
199e1db
Merge remote-tracking branch 'upstream/branch-24.02' into float_to_st…
thirtiseven Nov 23, 2023
131e48c
cudf conflict
thirtiseven Nov 23, 2023
3c09c49
Update src/main/cpp/src/cast_float_to_string.cu
thirtiseven Nov 23, 2023
b78e3b3
addressed comments
thirtiseven Nov 27, 2023
62aa3ba
Merge branch 'NVIDIA:branch-24.02' into float_to_string
thirtiseven Dec 4, 2023
04d1c4f
clang format
thirtiseven Dec 4, 2023
388cb50
Address comments
thirtiseven Dec 4, 2023
54fa73c
Address comments
thirtiseven Dec 4, 2023
683e73f
sync
thirtiseven Dec 4, 2023
944863b
Merge branch 'branch-24.02' into float_to_string
thirtiseven Dec 6, 2023
97e64af
address comments
thirtiseven Dec 7, 2023
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
1 change: 1 addition & 0 deletions src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ add_library(
src/ZOrderJni.cpp
src/bloom_filter.cu
src/cast_decimal_to_string.cu
src/cast_float_to_string.cu
src/cast_string.cu
src/cast_string_to_float.cu
src/datetime_rebase.cu
Expand Down
15 changes: 15 additions & 0 deletions src/main/cpp/src/CastStringJni.cpp
ttnghia marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,21 @@ JNIEXPORT jlong JNICALL Java_com_nvidia_spark_rapids_jni_CastStrings_toFloat(
CATCH_CAST_EXCEPTION(env, 0);
}

JNIEXPORT jlong JNICALL Java_com_nvidia_spark_rapids_jni_CastStrings_fromFloat(
JNIEnv* env, jclass, jlong input_column, jint j_dtype)
ttnghia marked this conversation as resolved.
Show resolved Hide resolved
{
JNI_NULL_CHECK(env, input_column, "input column is null", 0);

try {
cudf::jni::auto_set_device(env);

cudf::column_view cv{*reinterpret_cast<cudf::column_view const*>(input_column)};
thirtiseven marked this conversation as resolved.
Show resolved Hide resolved
return cudf::jni::release_as_jlong(
spark_rapids_jni::float_to_string(cv, cudf::get_default_stream()));
}
CATCH_CAST_EXCEPTION(env, 0);
}

JNIEXPORT jlong JNICALL Java_com_nvidia_spark_rapids_jni_CastStrings_fromDecimal(JNIEnv* env,
jclass,
jlong input_column)
Expand Down
Loading