udf-judge-conversion

Review converted UDFs for correctness gaps and hidden fallback risks.

993|294|Updated May 14, 2020
One-click install
npx skills add https://github.com/NVIDIA/cudf-spark --skill udf-judge-conversion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: udf-judge-conversion
Source: https://github.com/NVIDIA/cudf-spark/tree/main/skills/udf-judge-conversion
Command: npx skills add https://github.com/NVIDIA/cudf-spark --skill udf-judge-conversion

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you judge whether a converted UDF is a trustworthy replacement for the original CPU implementation, reducing the risk of incorrect results, hidden CPU fallback, or weak test coverage.

Core Features & Use Cases

  • Test Review: Evaluates unit tests to see whether they truly specify the CPU UDF behavior across edge cases and expected inputs.
  • Comparison Validation: Checks that CPU and GPU or SQL paths run on the same data and are compared directly.
  • Implementation Scrutiny: Looks for test-tailored literals, host-side row-by-row logic, or other signs that the GPU path is not general-purpose.
  • Use Case: A reviewer can use this Skill after a UDF migration to decide whether the conversion is safe to merge or needs more work.

Quick Start

Review the generated UDF conversion by comparing the CPU unit tests, GPU or SQL comparison tests, and implementation files for weak assertions, hidden fallbacks, and test-specific logic.

Frequently Asked Questions about udf-judge-conversion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a converted UDF to ensure safe CPU to GPU migration?

To review a converted UDF safely, evaluate unit tests for edge-case coverage, verify direct CPU versus GPU result parity on identical data, and check the implementation for test-specific literals or host-side row-by-row logic.

What is a hidden CPU fallback risk in SQL or GPU UDF conversions?

A hidden CPU fallback risk occurs when a converted GPU UDF secretly reverts to CPU execution. It is identified during review by scrutinizing implementation files for non-general-purpose logic, host-side processing, or test-tailored behaviors.

How do I validate CPU and GPU UDF result parity after migration?

Validate CPU and GPU UDF result parity by running comparison tests that execute both paths on the same data and verifying direct output matching. Reviewing these tests ensures the migration handles expected inputs correctly.

How can I check if my UDF unit tests cover edge cases properly?

Check UDF unit test coverage by evaluating whether the tests truly specify the original CPU behavior across edge cases and expected inputs. Review assertions to ensure they validate actual logic rather than tailored or hardcoded values.

Does this UDF conversion review process work for SQL migrations as well as GPU?

Yes, the UDF conversion review process works for SQL migrations. It evaluates CPU-to-SQL conversion reviews by verifying comparison tests, checking edge-case coverage, and ensuring the SQL path is general-purpose without test-specific literals.

When should I not use an automated UDF conversion review?

You should not rely solely on automated UDF conversion review when implementation files lack comparison tests or unit tests entirely. The review requires completed migration files to verify edge-case coverage and CPU-versus-GPU parity.