NVIDIA cuDF plugin for Apache Spark
repository·main·Indexed 21 days ago
https://github.com/nvidia/cudf-sparkThe NVIDIA cuDF plugin for Apache Spark accelerates Spark workloads by offloading data processing to GPUs using the cuDF library. It serves as a drop-in replacement for standard Spark SQL operators. The repository includes tools for API validation between Spark and GPU Execs, a deterministic data generation tool (datagen) for scale testing, Delta Lake support across various Spark versions, and a host memory leak detection utility for libcudf.
What's inside cudf-spark
- The NVIDIA cuDF plugin for Apache Spark (formerly known as the RAPIDS Accelerator for Apache Spark) is a plugin library that leverages GPUs to accelerate Spark processing using the cuDF (CUDA DataFrame) libraries. It aims to produce results that are bit-for-bit identical with standard Apache Spark.
Supported Features in Release 23.02
mainRelease 23.02 introduced several new features for GPU acceleration in Spark, including:
- Hive Support: Support for scanning and writing Hive text tables (
HiveTableScanExec). - Delta Lake: Support for
UpdateCommand,DeleteCommand, andMERGE INTOoperations on Databricks. - SQL Functions: Support for
from_json(returningMapType),json_tuple,reverse(for strings and arrays), andbatched full join. - Databricks Compatibility: Support for Databricks 11.3 ML LTS.
- Profiling: New profiling tool section focused on I/O metrics.
- Hive Support: Support for scanning and writing Hive text tables (
Performance Improvements in Release 23.04
mainKey performance optimizations in the 23.04 release include:
- Regex Optimization: Optimized
regexp_replacein multi-replace scenarios and improvedregexp_extractby transpiling expressions to use only the necessary single capture group. - Delta Lake: Added support for Delta Lake optimized writes.
- UCX: Upgraded and documented UCX 1.14 support.
- Spilling Logic: Improved
SpillableColumnarBatchto better inform spill code of actual batch usage.
- Regex Optimization: Optimized
New features in Release 24.02
mainRelease 24.02 introduced several enhancements to the cuDF Spark plugin, including:
- JSON Support: Support for single quotes when reading JSON, mixed types as strings in
GpuJsonToStruct, and non-defaultdateFormatinfrom_json. - Timezone & Timestamp Operations: Expanded support for non-UTC timezones across various functions including
unix_timestamp,to_utc_timestamp,to_date,from_unixtime, andParseToTimestamp. Support for specific timezones like CST (China Standard Time) and non-DST timezones was added. - SQL Functions: Added support for
ascii,format_number, and improvedregexp_extractwith lazy quantifiers and specified group indices. - Compatibility: Added support for Spark 3.3.4 and Databricks 13.3. Support for RAPIDS Spark plugin on ARM architectures was also introduced.
- Performance: Optimized row-based window operations for
BOUNDEDranges and improved hash join logic to use the smaller table for the build side when the build side can change.
- JSON Support: Support for single quotes when reading JSON, mixed types as strings in
Performance improvements in Release 24.08
mainThe 24.08 release included the following performance optimizations:
- GpuSubstringIndex: Reworked to use
cudf::slice_strings. - RLIKE Optimization: Rewrote
pattern1|pattern2|pattern3to use multiplecontainsoperations inrliketo improve execution speed. - Hash Aggregation: Explored hash aggregation passthrough on partial aggregates.
- GpuSubstringIndex: Reworked to use
Qualification and Profiling tools in Release 22.12
mainThe 22.12 release enhanced the diagnostic and validation tools:
- Databricks Integration: Created demo notebooks on Databricks for both the qualification tool and the profiler tool usage.
- Qualification Tool Improvements: Added support for parsing expressions (part 2) and the ability to print timestamp-related functions.
Performance Improvements in Release 25.06
mainRelease 25.06 included several performance-related optimizations:
- Centralized Priority Assignment: Introduced 'Zero Config' centralized priority assignment.
- Aggregation Optimization: By default, the plugin now enables skipping aggregations when the inputs of the aggregation cannot be reduced.
- LocalAggregate: Added a specific physical rule for
LocalAggregateto improve efficiency.
Performance improvements in Release 22.12
mainRelease 22.12 included several performance-focused enhancements:
- Z-Ordering: Added support for z-ordering acceleration.
- Tiered Projections: Identified additional opportunities for tiered projections and improved efficiency by eliminating eclipsed columns in each tier.
- Optimized Operators: Investigated new CUDF-like operators and more efficient bound checks for
GpuCast. - Delta Lake Fallback: Implemented fallback to CPU for Delta lake
delta_logParquet checkpoint files.
Features in Release 23.04
mainThe 23.04 release introduced several new capabilities, including:
- Delta Lake Support: Added support for Delta Lake auto compaction and optimized writes.
- OOM Resilience: Implemented an Out-of-Memory (OOM) retry framework to improve job stability.
- Alluxio Integration: Added support to expose the Alluxio master URL to support Kubernetes (K8s) environments.
- Metrics: Added support for task-level metrics in the retry framework and removed executor-level spill metrics.
- ML Support: Added support in tools event parsing for ML functions, libraries, and expressions.
- Compatibility Changes: Dropped support for Databricks-9.1 ML LTS.
New features in Release 24.06
mainRelease 24.06 introduced several new capabilities and improvements:
- Function Support: Added support for
parse_urlandArrayFilter. - Observability: The plugin now dumps the complete set of build-info properties to the Spark eventLog via
SparkRapidsBuildInfoEvent. - Performance: Optimized
parse_urland specificRLIKEpatterns (e.g.,pattern[A-B]{X,Y}) using custom kernels.
- Function Support: Added support for
New features in Release 22.04
mainThe 22.04 release introduced several key features for GPU-accelerated Spark processing, including:
- Expanded Data Format Support:
- Support for reading Avro (primitive types).
- Improved JSON and CSV readers with better support for timestamps, dates, decimals, and boolean types.
- Support for ORC forced positional evolution.
- Support for
spark.sql.legacy.timeParserPolicywhen parsing CSV files.
- Enhanced SQL Functions and Expressions:
- Support for
approx_percentilein reduction contexts. - Support for
percent_rank. - Support for
hypotSQL function. - Support for
str_to_map(including regular expression delimiters). - Support for
ArrayExistsandGetArrayStructFieldsexpressions. - Support for
element_atwith non-literal indices. - Support for casting
maptostring.
- Support for
- Improved Data Type Handling:
- Support for filtering and comparisons on ANSI day time interval types.
- Support for partitioning on Decimal 128 in
<WindowExec>. - Support for
pmod,remainder, anddividewith decimal support.
- Compatibility and Infrastructure:
- Support for Databricks 10.4 ML LTS.
- Added Spark 3.1.4 shim.
- Set RMM async allocator as the default.
- Dropped support for Spark 3.0.1, 3.0.2, 3.0.3, and Databricks 7.3 ML LTS.
- Expanded Data Format Support:
Performance Improvements in Release 26.02
mainKey performance updates in Release 26.02 include:
- Kudo GPU reads: Enabled by default.
- Metrics expansion:
gpuSpillTimeandgpuReadSpillTimemetrics now include full spill operations. - GPU Aggregations: Reduced unnecessary data transformation steps in GPU aggregations.