Commit f1642c4 1 parent e1c8ef1 commit f1642c4 Copy full SHA for f1642c4
File tree 2 files changed +9
-10
lines changed
examples/UDF-Examples/RAPIDS-accelerated-UDFs
2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -215,18 +215,17 @@ schema = StructType([
215
215
StructField("c2", IntegerType()),
216
216
])
217
217
data = [
218
- ("s1",1),
219
- ("s2",2),
220
- ("s1",3),
221
- ("s2",3),
222
- ("s1",3),
218
+ ("a b c d",1),
219
+ ("",2),
220
+ (None,3),
221
+ ("the quick brown fox jumped over the lazy dog",3),
223
222
]
224
223
df = spark.createDataFrame(
225
224
SparkContext.getOrCreate().parallelize(data, numSlices=2),
226
225
schema)
227
226
df.createOrReplaceTempView("tab")
228
227
229
228
spark.sql("CREATE TEMPORARY FUNCTION {} AS ' {}' ".format("wordcount", "com.nvidia.spark.rapids.udf.hive.StringWordCount"))
230
- spark.sql("select wordcount(c1) from tab group by c1 ").show()
231
- spark.sql("select wordcount(c1) from tab group by c1 ").explain()
229
+ spark.sql("select c1, wordcount(c1) from tab").show()
230
+ spark.sql("select c1, wordcount(c1) from tab").explain()
232
231
```
Original file line number Diff line number Diff line change 1
1
#=============================================================================
2
- # Copyright (c) 2021-2022 , NVIDIA CORPORATION.
2
+ # Copyright (c) 2021-2024 , NVIDIA CORPORATION.
3
3
#
4
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
5
# you may not use this file except in compliance with the License.
@@ -81,7 +81,7 @@ set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -w --expt-extended-lambda --expt-relax
81
81
# - cudf -------------------------------------------------------------------------------------------
82
82
83
83
# Ensure CUDA runtime is dynamic despite statically linking Arrow in libcudf
84
- set (CUDA_USE_STATIC_CUDA_RUNTIME OFF )
84
+ set (CUDA_USE_STATIC_CUDA_RUNTIME ON )
85
85
86
86
rapids_cpm_init()
87
87
rapids_cpm_find(cudf 23.12.00
@@ -94,7 +94,7 @@ rapids_cpm_find(cudf 23.12.00
94
94
"BUILD_BENCHMARKS OFF"
95
95
"CUDF_USE_ARROW_STATIC ON"
96
96
"JITIFY_USE_CACHE ON"
97
- "CUDA_STATIC_RUNTIME OFF "
97
+ "CUDA_STATIC_RUNTIME ${CUDA_USE_STATIC_CUDA_RUNTIME} "
98
98
"DISABLE_DEPRECATION_WARNING ON"
99
99
"AUTO_DETECT_CUDA_ARCHITECTURES OFF"
100
100
)
You can’t perform that action at this time.
0 commit comments