From e1c8ef117f4a3b86d4f645665de6068a6f8ac26c Mon Sep 17 00:00:00 2001 From: Tim Liu Date: Wed, 24 Jan 2024 17:56:46 +0800 Subject: [PATCH 1/3] Enable auto-merge from branch-24.02 to branch-24.04 (#350) Signed-off-by: Tim Liu --- .github/workflows/auto-merge.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index e9e10f5dc..523fee346 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ name: auto-merge HEAD to BASE on: pull_request_target: branches: - - branch-23.12 + - branch-24.02 types: [closed] jobs: @@ -29,14 +29,14 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: branch-23.12 # force to fetch from latest upstream instead of PR ref + ref: branch-24.02 # force to fetch from latest upstream instead of PR ref - name: auto-merge job uses: ./.github/workflows/auto-merge env: OWNER: NVIDIA REPO_NAME: spark-rapids-examples - HEAD: branch-23.12 - BASE: branch-24.02 + HEAD: branch-24.02 + BASE: branch-24.04 AUTOMERGE_TOKEN: ${{ secrets.AUTOMERGE_TOKEN }} # use to merge PR From f1642c4a2caef89c7bd32621d6f4ad76f78382af Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Wed, 24 Jan 2024 17:39:41 -0600 Subject: [PATCH 2/3] Update RAPIDS accelerated native UDFs example to use static CUDA runtime (#354) * Update RAPIDS accelerated native UDFs example to use static CUDA runtime Signed-off-by: Jason Lowe * Improve native UDF example in README --------- Signed-off-by: Jason Lowe --- .../UDF-Examples/RAPIDS-accelerated-UDFs/README.md | 13 ++++++------- .../src/main/cpp/CMakeLists.txt | 6 +++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/examples/UDF-Examples/RAPIDS-accelerated-UDFs/README.md b/examples/UDF-Examples/RAPIDS-accelerated-UDFs/README.md index 26f510c67..c3794cb06 100644 --- a/examples/UDF-Examples/RAPIDS-accelerated-UDFs/README.md +++ b/examples/UDF-Examples/RAPIDS-accelerated-UDFs/README.md @@ -215,11 +215,10 @@ schema = StructType([ StructField("c2", IntegerType()), ]) data = [ - ("s1",1), - ("s2",2), - ("s1",3), - ("s2",3), - ("s1",3), + ("a b c d",1), + ("",2), + (None,3), + ("the quick brown fox jumped over the lazy dog",3), ] df = spark.createDataFrame( SparkContext.getOrCreate().parallelize(data, numSlices=2), @@ -227,6 +226,6 @@ df = spark.createDataFrame( df.createOrReplaceTempView("tab") spark.sql("CREATE TEMPORARY FUNCTION {} AS '{}'".format("wordcount", "com.nvidia.spark.rapids.udf.hive.StringWordCount")) -spark.sql("select wordcount(c1) from tab group by c1").show() -spark.sql("select wordcount(c1) from tab group by c1").explain() +spark.sql("select c1, wordcount(c1) from tab").show() +spark.sql("select c1, wordcount(c1) from tab").explain() ``` diff --git a/examples/UDF-Examples/RAPIDS-accelerated-UDFs/src/main/cpp/CMakeLists.txt b/examples/UDF-Examples/RAPIDS-accelerated-UDFs/src/main/cpp/CMakeLists.txt index c5a03390b..bf827f490 100755 --- a/examples/UDF-Examples/RAPIDS-accelerated-UDFs/src/main/cpp/CMakeLists.txt +++ b/examples/UDF-Examples/RAPIDS-accelerated-UDFs/src/main/cpp/CMakeLists.txt @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # 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 # - cudf ------------------------------------------------------------------------------------------- # Ensure CUDA runtime is dynamic despite statically linking Arrow in libcudf -set(CUDA_USE_STATIC_CUDA_RUNTIME OFF) +set(CUDA_USE_STATIC_CUDA_RUNTIME ON) rapids_cpm_init() rapids_cpm_find(cudf 23.12.00 @@ -94,7 +94,7 @@ rapids_cpm_find(cudf 23.12.00 "BUILD_BENCHMARKS OFF" "CUDF_USE_ARROW_STATIC ON" "JITIFY_USE_CACHE ON" - "CUDA_STATIC_RUNTIME OFF" + "CUDA_STATIC_RUNTIME ${CUDA_USE_STATIC_CUDA_RUNTIME}" "DISABLE_DEPRECATION_WARNING ON" "AUTO_DETECT_CUDA_ARCHITECTURES OFF" ) From 6ae94c34f7a5838c97ad91ea40113ff344339610 Mon Sep 17 00:00:00 2001 From: Tim Liu Date: Tue, 6 Feb 2024 00:05:05 +0800 Subject: [PATCH 3/3] Update cudf dependency to 24.02 from 23.12 (#359) Update rapidsai cudf/rmm to branch-24.02 for spark rapids UDF native example app , to fix: issue: https://github.com/NVIDIA/spark-rapids-examples/issues/349 Signed-off-by: Tim Liu --- .../RAPIDS-accelerated-UDFs/src/main/cpp/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/UDF-Examples/RAPIDS-accelerated-UDFs/src/main/cpp/CMakeLists.txt b/examples/UDF-Examples/RAPIDS-accelerated-UDFs/src/main/cpp/CMakeLists.txt index bf827f490..6412d7d63 100755 --- a/examples/UDF-Examples/RAPIDS-accelerated-UDFs/src/main/cpp/CMakeLists.txt +++ b/examples/UDF-Examples/RAPIDS-accelerated-UDFs/src/main/cpp/CMakeLists.txt @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.23.1 FATAL_ERROR) -file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.12/RAPIDS.cmake +file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.02/RAPIDS.cmake ${CMAKE_BINARY_DIR}/RAPIDS.cmake) include(${CMAKE_BINARY_DIR}/RAPIDS.cmake) @@ -32,7 +32,7 @@ if(DEFINED GPU_ARCHS) endif() rapids_cuda_init_architectures(UDFEXAMPLESJNI) -project(UDFEXAMPLESJNI VERSION 23.12.0 LANGUAGES C CXX CUDA) +project(UDFEXAMPLESJNI VERSION 24.02.0 LANGUAGES C CXX CUDA) option(PER_THREAD_DEFAULT_STREAM "Build with per-thread default stream" OFF) option(BUILD_UDF_BENCHMARKS "Build the benchmarks" OFF) @@ -84,10 +84,10 @@ set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -w --expt-extended-lambda --expt-relax set(CUDA_USE_STATIC_CUDA_RUNTIME ON) rapids_cpm_init() -rapids_cpm_find(cudf 23.12.00 +rapids_cpm_find(cudf 24.02.00 CPM_ARGS GIT_REPOSITORY https://github.com/rapidsai/cudf.git - GIT_TAG branch-23.12 + GIT_TAG branch-24.02 GIT_SHALLOW TRUE SOURCE_SUBDIR cpp OPTIONS "BUILD_TESTS OFF"