Skip to content

Commit f5090ba

Browse files
authored
Merge pull request #10847 from NVIDIA/merge-branch-24.04-to-main
Merge branch-24.04 into main
2 parents c0c142e + 4202049 commit f5090ba

File tree

9 files changed

+83
-38
lines changed

9 files changed

+83
-38
lines changed

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Change log
2-
Generated on 2024-05-09
2+
Generated on 2024-05-20
33

44
## Release 24.04
55

@@ -29,6 +29,7 @@ Generated on 2024-05-09
2929
### Bugs Fixed
3030
|||
3131
|:---|:---|
32+
|[#10700](https://github.com/NVIDIA/spark-rapids/issues/10700)|[BUG] get_json_object cannot handle ints or boolean values|
3233
|[#10645](https://github.com/NVIDIA/spark-rapids/issues/10645)|[BUG] java.lang.IllegalStateException: Expected to only receive a single batch|
3334
|[#10665](https://github.com/NVIDIA/spark-rapids/issues/10665)|[BUG] Need to update private jar's version to v24.04.1 for spark-rapids v24.04.0 release|
3435
|[#10589](https://github.com/NVIDIA/spark-rapids/issues/10589)|[BUG] ZSTD version mismatch in integration tests|
@@ -85,6 +86,7 @@ Generated on 2024-05-09
8586
|||
8687
|:---|:---|
8788
|[#10782](https://github.com/NVIDIA/spark-rapids/pull/10782)|Update latest changelog [skip ci]|
89+
|[#10780](https://github.com/NVIDIA/spark-rapids/pull/10780)|[DOC]Update download page for v24.04.1 [skip ci]|
8890
|[#10777](https://github.com/NVIDIA/spark-rapids/pull/10777)|Update rapids JNI dependency: private to 24.04.2|
8991
|[#10683](https://github.com/NVIDIA/spark-rapids/pull/10683)|Update latest changelog [skip ci]|
9092
|[#10681](https://github.com/NVIDIA/spark-rapids/pull/10681)|Update rapids JNI dependency to 24.04.0, private to 24.04.1|

docs/archive.md

+46
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,52 @@ nav_order: 15
55
---
66
Below are archived releases for RAPIDS Accelerator for Apache Spark.
77

8+
## Release v24.04.0
9+
### Hardware Requirements:
10+
11+
The plugin is tested on the following architectures:
12+
@@ -67,14 +67,14 @@ for your hardware's minimum driver version.
13+
### RAPIDS Accelerator's Support Policy for Apache Spark
14+
The RAPIDS Accelerator maintains support for Apache Spark versions available for download from [Apache Spark](https://spark.apache.org/downloads.html)
15+
16+
### Download RAPIDS Accelerator for Apache Spark v24.04.0
17+
18+
| Processor | Scala Version | Download Jar | Download Signature |
19+
|-----------|---------------|--------------|--------------------|
20+
| x86_64 | Scala 2.12 | [RAPIDS Accelerator v24.04.0](https://repo1.maven.org/maven2/com/nvidia/rapids-4-spark_2.12/24.04.0/rapids-4-spark_2.12-24.04.0.jar) | [Signature](https://repo1.maven.org/maven2/com/nvidia/rapids-4-spark_2.12/24.04.0/rapids-4-spark_2.12-24.04.0.jar.asc) |
21+
| x86_64 | Scala 2.13 | [RAPIDS Accelerator v24.04.0](https://repo1.maven.org/maven2/com/nvidia/rapids-4-spark_2.13/24.04.0/rapids-4-spark_2.13-24.04.0.jar) | [Signature](https://repo1.maven.org/maven2/com/nvidia/rapids-4-spark_2.13/24.04.0/rapids-4-spark_2.13-24.04.0.jar.asc) |
22+
| arm64 | Scala 2.12 | [RAPIDS Accelerator v24.04.0](https://repo1.maven.org/maven2/com/nvidia/rapids-4-spark_2.12/24.04.0/rapids-4-spark_2.12-24.04.0-cuda11-arm64.jar) | [Signature](https://repo1.maven.org/maven2/com/nvidia/rapids-4-spark_2.12/24.04.0/rapids-4-spark_2.12-24.04.0-cuda11-arm64.jar.asc) |
23+
| arm64 | Scala 2.13 | [RAPIDS Accelerator v24.04.0](https://repo1.maven.org/maven2/com/nvidia/rapids-4-spark_2.13/24.04.0/rapids-4-spark_2.13-24.04.0-cuda11-arm64.jar) | [Signature](https://repo1.maven.org/maven2/com/nvidia/rapids-4-spark_2.13/24.04.0/rapids-4-spark_2.13-24.04.0-cuda11-arm64.jar.asc) |
24+
25+
This package is built against CUDA 11.8. It is tested on V100, T4, A10, A100, L4 and H100 GPUs with
26+
CUDA 11.8 through CUDA 12.0.
27+
28+
### Verify signature
29+
* Download the [PUB_KEY](https://keys.openpgp.org/[email protected]).
30+
* Import the public key: `gpg --import PUB_KEY`
31+
* Verify the signature for Scala 2.12 jar:
32+
`gpg --verify rapids-4-spark_2.12-24.04.0.jar.asc rapids-4-spark_2.12-24.04.0.jar`
33+
* Verify the signature for Scala 2.13 jar:
34+
`gpg --verify rapids-4-spark_2.13-24.04.0.jar.asc rapids-4-spark_2.13-24.04.0.jar`
35+
36+
The output of signature verify:
37+
38+
gpg: Good signature from "NVIDIA Spark (For the signature of spark-rapids release jars) <[email protected]>"
39+
40+
### Release Notes
41+
* New functionality and performance improvements for this release include:
42+
* Performance improvements for S3 reading.
43+
Refer to perfio.s3.enabled in [advanced_configs](./additional-functionality/advanced_configs.md) for more details.
44+
* Performance improvements when doing a joins on unique keys.
45+
* Enhanced decompression kernels for zstd and snappy.
46+
* Enhanced Parquet reading performance with modular kernels.
47+
* Added compatibility with Spark version 3.5.1.
48+
* Deprecated support for Databricks 10.4 ML LTS.
49+
* For updates on RAPIDS Accelerator Tools, please visit [this link](https://github.com/NVIDIA/spark-rapids-tools/releases).
50+
51+
For a detailed list of changes, please refer to the
52+
[CHANGELOG](https://github.com/NVIDIA/spark-rapids/blob/main/CHANGELOG.md).
53+
854
## Release v24.02.0
955
### Hardware Requirements:
1056

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@
699699
<cuda.version>cuda11</cuda.version>
700700
<jni.classifier>${cuda.version}</jni.classifier>
701701
<spark-rapids-jni.version>24.04.0</spark-rapids-jni.version>
702-
<spark-rapids-private.version>24.04.2</spark-rapids-private.version>
702+
<spark-rapids-private.version>24.04.3</spark-rapids-private.version>
703703
<scala.binary.version>2.12</scala.binary.version>
704704
<alluxio.client.version>2.8.0</alluxio.client.version>
705705
<scala.recompileMode>incremental</scala.recompileMode>

scala2.13/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@
699699
<cuda.version>cuda11</cuda.version>
700700
<jni.classifier>${cuda.version}</jni.classifier>
701701
<spark-rapids-jni.version>24.04.0</spark-rapids-jni.version>
702-
<spark-rapids-private.version>24.04.2</spark-rapids-private.version>
702+
<spark-rapids-private.version>24.04.3</spark-rapids-private.version>
703703
<scala.binary.version>2.13</scala.binary.version>
704704
<alluxio.client.version>2.8.0</alluxio.client.version>
705705
<scala.recompileMode>incremental</scala.recompileMode>

sql-plugin/src/main/scala/org/apache/spark/sql/rapids/execution/python/GpuAggregateInPandasExec.scala

+11-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
2+
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,8 +31,8 @@ import org.apache.spark.rdd.RDD
3131
import org.apache.spark.sql.catalyst.expressions._
3232
import org.apache.spark.sql.catalyst.plans.physical.{AllTuples, ClusteredDistribution, Distribution, Partitioning}
3333
import org.apache.spark.sql.execution.SparkPlan
34-
import org.apache.spark.sql.rapids.execution.python.shims.GpuArrowPythonRunner
35-
import org.apache.spark.sql.rapids.shims.{ArrowUtilsShim, DataTypeUtilsShim}
34+
import org.apache.spark.sql.rapids.execution.python.shims.GpuGroupedPythonRunnerFactory
35+
import org.apache.spark.sql.rapids.shims.DataTypeUtilsShim
3636
import org.apache.spark.sql.types.{DataType, StructField, StructType}
3737
import org.apache.spark.sql.vectorized.ColumnarBatch
3838

@@ -109,8 +109,6 @@ case class GpuAggregateInPandasExec(
109109
val (mNumInputRows, mNumInputBatches, mNumOutputRows, mNumOutputBatches) = commonGpuMetrics()
110110

111111
lazy val isPythonOnGpuEnabled = GpuPythonHelper.isPythonOnGpuEnabled(conf)
112-
val sessionLocalTimeZone = conf.sessionLocalTimeZone
113-
val pythonRunnerConf = ArrowUtilsShim.getPythonRunnerConfMap(conf)
114112
val childOutput = child.output
115113
val resultExprs = resultExpressions
116114

@@ -204,27 +202,22 @@ case class GpuAggregateInPandasExec(
204202
}
205203
}
206204

205+
val runnerFactory = GpuGroupedPythonRunnerFactory(conf, pyFuncs, argOffsets,
206+
aggInputSchema, DataTypeUtilsShim.fromAttributes(pyOutAttributes),
207+
PythonEvalType.SQL_GROUPED_AGG_PANDAS_UDF)
208+
207209
// Third, sends to Python to execute the aggregate and returns the result.
208210
if (pyInputIter.hasNext) {
209211
// Launch Python workers only when the data is not empty.
210-
val pyRunner = new GpuArrowPythonRunner(
211-
pyFuncs,
212-
PythonEvalType.SQL_GROUPED_AGG_PANDAS_UDF,
213-
argOffsets,
214-
aggInputSchema,
215-
sessionLocalTimeZone,
216-
pythonRunnerConf,
217-
// The whole group data should be written in a single call, so here is unlimited
218-
Int.MaxValue,
219-
DataTypeUtilsShim.fromAttributes(pyOutAttributes))
220-
212+
val pyRunner = runnerFactory.getRunner()
221213
val pyOutputIterator = pyRunner.compute(pyInputIter, context.partitionId(), context)
222214

223215
val combinedAttrs = gpuGroupingExpressions.map(_.toAttribute) ++ pyOutAttributes
224216
val resultRefs = GpuBindReferences.bindGpuReferences(resultExprs, combinedAttrs)
225217
// Gets the combined batch for each group and projects for the output.
226-
new CombiningIterator(batchProducer.getBatchQueue, pyOutputIterator, pyRunner,
227-
mNumOutputRows, mNumOutputBatches).map { combinedBatch =>
218+
new CombiningIterator(batchProducer.getBatchQueue, pyOutputIterator,
219+
pyRunner.asInstanceOf[GpuArrowOutput], mNumOutputRows,
220+
mNumOutputBatches).map { combinedBatch =>
228221
withResource(combinedBatch) { batch =>
229222
GpuProjectExec.project(batch, resultRefs)
230223
}

sql-plugin/src/main/scala/org/apache/spark/sql/rapids/execution/python/GpuFlatMapGroupsInPandasExec.scala

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
2+
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ import com.nvidia.spark.rapids.python.PythonWorkerSemaphore
2121
import com.nvidia.spark.rapids.shims.ShimUnaryExecNode
2222

2323
import org.apache.spark.TaskContext
24-
import org.apache.spark.api.python.ChainedPythonFunctions
24+
import org.apache.spark.api.python.{ChainedPythonFunctions, PythonEvalType}
2525
import org.apache.spark.rdd.RDD
2626
import org.apache.spark.sql.catalyst.expressions._
2727
import org.apache.spark.sql.catalyst.plans.physical.{AllTuples, ClusteredDistribution, Distribution, Partitioning}
@@ -123,7 +123,8 @@ case class GpuFlatMapGroupsInPandasExec(
123123
resolveArgOffsets(child, groupingAttributes)
124124

125125
val runnerFactory = GpuGroupedPythonRunnerFactory(conf, chainedFunc, Array(argOffsets),
126-
DataTypeUtilsShim.fromAttributes(dedupAttrs), pythonOutputSchema)
126+
DataTypeUtilsShim.fromAttributes(dedupAttrs), pythonOutputSchema,
127+
PythonEvalType.SQL_GROUPED_MAP_PANDAS_UDF)
127128

128129
// Start processing. Map grouped batches to ArrowPythonRunner results.
129130
child.executeColumnar().mapPartitionsInternal { inputIter =>

sql-plugin/src/main/spark311/scala/org/apache/spark/sql/rapids/execution/python/shims/GpuGroupedPythonRunnerFactory.scala

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, NVIDIA CORPORATION.
2+
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@
3939
spark-rapids-shim-json-lines ***/
4040
package org.apache.spark.sql.rapids.execution.python.shims
4141

42-
import org.apache.spark.api.python.{ChainedPythonFunctions, PythonEvalType}
42+
import org.apache.spark.api.python.ChainedPythonFunctions
4343
import org.apache.spark.sql.rapids.shims.ArrowUtilsShim
4444
import org.apache.spark.sql.types.StructType
4545
import org.apache.spark.sql.vectorized.ColumnarBatch
@@ -49,14 +49,15 @@ case class GpuGroupedPythonRunnerFactory(
4949
chainedFunc: Seq[ChainedPythonFunctions],
5050
argOffsets: Array[Array[Int]],
5151
dedupAttrs: StructType,
52-
pythonOutputSchema: StructType) {
52+
pythonOutputSchema: StructType,
53+
evalType: Int) {
5354
val sessionLocalTimeZone = conf.sessionLocalTimeZone
5455
val pythonRunnerConf = ArrowUtilsShim.getPythonRunnerConfMap(conf)
5556

5657
def getRunner(): GpuBasePythonRunner[ColumnarBatch] = {
5758
new GpuArrowPythonRunner(
5859
chainedFunc,
59-
PythonEvalType.SQL_GROUPED_MAP_PANDAS_UDF,
60+
evalType,
6061
argOffsets,
6162
dedupAttrs,
6263
sessionLocalTimeZone,
@@ -65,4 +66,4 @@ case class GpuGroupedPythonRunnerFactory(
6566
Int.MaxValue,
6667
pythonOutputSchema)
6768
}
68-
}
69+
}

sql-plugin/src/main/spark330db/scala/org/apache/spark/sql/rapids/execution/python/shims/GpuGroupedPythonRunnerFactory.scala

+5-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
spark-rapids-shim-json-lines ***/
2121
package org.apache.spark.sql.rapids.execution.python.shims
2222

23-
import org.apache.spark.api.python.{ChainedPythonFunctions, PythonEvalType}
23+
import org.apache.spark.api.python.ChainedPythonFunctions
2424
import org.apache.spark.sql.rapids.shims.ArrowUtilsShim
2525
import org.apache.spark.sql.types.StructType
2626
import org.apache.spark.sql.vectorized.ColumnarBatch
@@ -30,7 +30,8 @@ case class GpuGroupedPythonRunnerFactory(
3030
chainedFunc: Seq[ChainedPythonFunctions],
3131
argOffsets: Array[Array[Int]],
3232
dedupAttrs: StructType,
33-
pythonOutputSchema: StructType) {
33+
pythonOutputSchema: StructType,
34+
evalType: Int) {
3435
// Configs from DB runtime
3536
val maxBytes = conf.pandasZeroConfConversionGroupbyApplyMaxBytesPerSlice
3637
val zeroConfEnabled = conf.pandasZeroConfConversionGroupbyApplyEnabled
@@ -41,7 +42,7 @@ case class GpuGroupedPythonRunnerFactory(
4142
if (zeroConfEnabled && maxBytes > 0L) {
4243
new GpuGroupUDFArrowPythonRunner(
4344
chainedFunc,
44-
PythonEvalType.SQL_GROUPED_MAP_PANDAS_UDF,
45+
evalType,
4546
argOffsets,
4647
dedupAttrs,
4748
sessionLocalTimeZone,
@@ -52,7 +53,7 @@ case class GpuGroupedPythonRunnerFactory(
5253
} else {
5354
new GpuArrowPythonRunner(
5455
chainedFunc,
55-
PythonEvalType.SQL_GROUPED_MAP_PANDAS_UDF,
56+
evalType,
5657
argOffsets,
5758
dedupAttrs,
5859
sessionLocalTimeZone,

sql-plugin/src/main/spark341db/scala/org/apache/spark/sql/rapids/execution/python/shims/GpuGroupedPythonRunnerFactory.scala

+6-5
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,25 @@ import org.apache.spark.sql.rapids.shims.ArrowUtilsShim
2424
import org.apache.spark.sql.types._
2525
import org.apache.spark.sql.vectorized.ColumnarBatch
2626

27-
//TODO is this needed? we already have a similar version in spark330db
2827
case class GpuGroupedPythonRunnerFactory(
2928
conf: org.apache.spark.sql.internal.SQLConf,
3029
chainedFunc: Seq[ChainedPythonFunctions],
3130
argOffsets: Array[Array[Int]],
3231
dedupAttrs: StructType,
33-
pythonOutputSchema: StructType) {
32+
pythonOutputSchema: StructType,
33+
evalType: Int) {
3434
// Configs from DB runtime
3535
val maxBytes = conf.pandasZeroConfConversionGroupbyApplyMaxBytesPerSlice
3636
val zeroConfEnabled = conf.pandasZeroConfConversionGroupbyApplyEnabled
37+
val isArrowBatchSlicingEnabled = conf.pythonArrowBatchSlicingEnabled
3738
val sessionLocalTimeZone = conf.sessionLocalTimeZone
3839
val pythonRunnerConf = ArrowUtilsShim.getPythonRunnerConfMap(conf)
3940

4041
def getRunner(): GpuBasePythonRunner[ColumnarBatch] = {
41-
if (zeroConfEnabled && maxBytes > 0L) {
42+
if (isArrowBatchSlicingEnabled || (zeroConfEnabled && maxBytes > 0L)) {
4243
new GpuGroupUDFArrowPythonRunner(
4344
chainedFunc,
44-
PythonEvalType.SQL_GROUPED_MAP_PANDAS_UDF,
45+
evalType,
4546
argOffsets,
4647
dedupAttrs,
4748
sessionLocalTimeZone,
@@ -52,7 +53,7 @@ case class GpuGroupedPythonRunnerFactory(
5253
} else {
5354
new GpuArrowPythonRunner(
5455
chainedFunc,
55-
PythonEvalType.SQL_GROUPED_MAP_PANDAS_UDF,
56+
evalType,
5657
argOffsets,
5758
dedupAttrs,
5859
sessionLocalTimeZone,

0 commit comments

Comments
 (0)