udf-benchmark
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "udf-benchmark" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-5d8480d1dc500992cf3fa438ea7e1b797583f5cdc2b2fc3ec936edea991bc57b. Verify the upstream source and version against https://github.com/Kilo-Org/kilo-marketplace before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Assist with benchmarking and analyzing the performance of Apache Spark UDFs on GPU. Intended as step 3 of the UDF conversion workflow (udf-gen-test -> udf-convert-to-* -> udf-benchmark). Use when you have a CPU UDF and a corresponding RapidsUDF or SQL implementation and need to compare their performance.
Introduction source: third_party · Kilo-Org · 0.0.1 Reference
SkillPi interpretation
- Inputs and outputs
- Upon successful completion: Benchmark utilities: `src/main/scala/com/udf/bench/BenchUtils.scala` Microbenchmarks (cuDF): `src/main/scala/com/udf/bench/MicroBenchRunner.scala` Generated data: `data/` Benchmark results: `results/`
- Software, accounts and paid services
- Project directory from Steps 1-2 (udf-gen-test, udf-convert-to-*) with passing tests Derive `<CamelName>` and `<snake_name>` from the UDF class name. **Note:** Commands require access to `/tmp` (Spark temp storage) and `/dev` (GPU device). If commands fail due to sandbox restrictions, re-run them unsandboxed.
- Testing
- Not tested
Browse files
Frontmatter
name: udf-benchmark
description: >-
Assists with benchmarking and profiling the performance of an Apache Spark UDF
on the GPU. This is step 3 of 3 in the UDF conversion workflow (udf-gen-test
-> udf-convert-to-* -> udf-benchmark). Use this skill when you have a CPU UDF
and a RapidsUDF or SQL implementation, and need to benchmark the performance
of the CPU UDF against the GPU implementation.
metadata:
spdx-file-copyright-text: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
upstream:
model: inherit
category: data
source:
repository: 'https://github.com/NVIDIA/cudf-spark'
path: skills/udf-benchmark
license_path: LICENSE
commit: a707353465abe170e486d91304944c98f64fd938UDF Benchmark
Workflow
- [ ] Step 1: Implement BenchUtils (fill in TODO methods)
- [ ] Step 2: Validate with a small dataset
- [ ] Step 3: Generate full benchmark data and run benchmarks
- [ ] Step 4: cuDF microbenchmarks (skip for SQL targets)
Before making any edits, create a visible TODO checklist for every workflow step in this skill and keep it updated. Do not produce a final answer until every required checklist item is marked complete.
Prerequisites
- Project directory from Steps 1-2 (udf-gen-test, udf-convert-to-*) with passing tests
Derive <CamelName> and <snake_name> from the UDF class name.
Note: Commands require access to
/tmp(Spark temp storage) and/dev(GPU device). If commands fail due to sandbox restrictions, re-run them unsandboxed.
Step 1: Implement BenchUtils
Read src/main/scala/com/udf/bench/BenchUtils.scala. Replace placeholders with the actual camel/snake UDF name.
Fill in the TODO methods following the docstrings. For variable-length inputs, generate sizable rows representative of enterprise-scale data. Refer to the unit test for schema and example data.
Step 2: Validate
Make scripts executable:
chmod +x *.sh
Run validation mode to test with a small dataset:
./run_gen_data.sh --rows 1000 --validate
This runs both the CPU and GPU implementations on the dataset. If validation fails, analyze the error and fix the BenchUtils implementation.
Step 3: Generate Data and Run Benchmarks
The scripts set the default heap size to 16g in .mvn/jvm.config; adjust depending on data size.
Generate benchmark data (10M rows):
./run_gen_data.sh --rows 10000000
Run benchmarks:
# CPU benchmark
./run_spark_benchmark.sh --mode cpu --data-path data/bench_data_10000000_rows.parquet
# GPU benchmark
./run_spark_benchmark.sh --mode gpu --data-path data/bench_data_10000000_rows.parquet
Results are saved to the results/ directory as JSON files.
Step 4: cuDF Microbenchmarks
Skip this step for SQL targets. This only applies to cuDF RapidsUDF conversions.
Follow CUDF_MICROBENCHMARKS.md to implement and run in-memory microbenchmarks.
Output
Upon successful completion:
- Benchmark utilities:
src/main/scala/com/udf/bench/BenchUtils.scala - Microbenchmarks (cuDF):
src/main/scala/com/udf/bench/MicroBenchRunner.scala - Generated data:
data/ - Benchmark results:
results/
Version history
-
skills-20261103210927-6c1b454
GitHub ↗
Original release notes
Automated skills release from commit 6c1b4543cac1d45a80bf5904e4b69ac315117323
-
skills-20260928190452-ff51758
GitHub ↗
Original release notes
Automated skills release from commit ff51758b06b8249007116184096765d47bdb7505
-
skills-20260924105536-d31110d
GitHub ↗
Original release notes
Automated skills release from commit d31110d62dc0bd00c22f1d6f6a630d1e702a0049
-
skills-20260923085113-cea285e
GitHub ↗
Original release notes
Automated skills release from commit cea285ef0e4d6ec47cd2fd9fdbca03813a3363c7
-
skills-20260922193956-97d7333
GitHub ↗
Original release notes
Automated skills release from commit 97d7333d8200e5ac556c659c8669f3a83ba10866
Only the five most recent versions are shown. View full version history at the source ↗
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 针对 Apache Spark UDF GPU 性能基准测试的专业工具
- 提供完整的端到端工作流,解决实际工程痛点
- 面向有明确技术需求的专业用户群体
Highlights
- 触发条件描述清晰具体,边界明确
- 准确描述了使用前提和场景
- 与 UDF 转换流程的其他步骤关联清晰
Areas to improve
-
缺少明确的 When to Use 章节标题 Reported severity: Minor
文档中提到了使用场景,但没有明确的 When to Use 章节标题
Recommendation: 建议添加明确的 When to Use 章节,使文档结构更清晰
Highlights
- 工作流程步骤清晰,有明确的4步执行流程
- 包含详细的命令示例和输出说明
- frontmatter 完整,文档结构良好
Areas to improve
-
异常处理说明不够详细 Reported severity: Minor
文档提到了 sandbox 限制,但对其他可能的执行异常情况说明不足
Recommendation: 建议增加更多异常处理说明,如内存不足、GPU 设备不可用等情况
Highlights
- 提供了验证步骤确保执行正确性
- 包含具体的脚本执行命令和参数说明
- 说明了结果输出位置和文件结构
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Project directory from Steps 1-2 (udf-gen-test, udf-convert-to-*) with passing tests Derive `<CamelName>` and `<snake_name>` from the UDF class name. **Note:** Commands require access to `/tmp` (Spark temp storage) and `/dev` (GPU device). If commands fail due to sandbox restrictions, re-run them unsandboxed.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.