RFC: Rename FusionDefinition.execute/manual_execute for clarity and add documentation on usage
@rdspring1 is already working on this.
Since Dec 19, 2025.
Assessment
This issue has not been assessed yet.
Description
Summary
The current method names in the Python API for nvFuser (FusionDefinition.execute and FusionDefinition.manual_execute) are unclear and could be misleading for users unfamiliar with the internal differences between FusionExecutorCache and KernelExecutor. This RFC proposes renaming these methods to better reflect their behavior and improve the documentation to clarify when and why each method should be used.
Background
FusionDefinition.executeuses FusionExecutorCache, which provides automatic shape specialization, scheduling, segmentation (multi-kernel), and kernel caching. It is the recommended high-level entry point for most users.FusionDefinition.manual_executeuses KernelExecutor, which is intended for manual, one-shot, static execution, typically in benchmarking or testing scenarios. It does not manage segmentation, shape specialization, or kernel caching.
Problems with Current Naming
- The name
executedoes not communicate automatic scheduling, segmentation, or caching. - The name
manual_executeis ambiguous: it could mean manual scheduling, manual cache bypass, or simply manual running of the kernel. - The documentation does not make the distinction clear, leading to misuse and confusion, especially for new users and contributors.
Proposed Changes
1. Rename Methods for Semantic Clarity
- Rename
executeto one of the following:run(): short and Pythonic, means “do the smart thing”execute_cached()orrun_cached(): reflects kernel cachingauto_execute()orauto_run(): indicates auto shape/scheduling support
- Rename
manual_executeto one of the following:run_kernel(): explicit that it executes a single kernelexecute_raw()orrun_raw(): highlights low-level/manual dispatchmanual_run()ormanual_execute(): explicit, but less informative
- Optionally, consider
run_dynamic()/run_static()if shape specialization is the main difference.
2. Documentation Improvements
- Clearly document the distinction:
- When to use each method
- What features are enabled/disabled (segmentation, cache, scheduling)
- Performance tradeoffs and typical use-cases (production vs. benchmarking)
- Provide example use-cases for each path (including distributed tensor support if relevant)
- Reference the underlying execution engine (FusionExecutorCache vs KernelExecutor) in the docstrings
3. Migration Plan
- Deprecate old names with clear warning messages in docstrings and runtime (for a transition period)
- Update all examples and guides to use the new method names
Motivation
- Make it easier for new users and contributors to understand which API to use and why
- Encourage best practices:
run()(previouslyexecute) should be the default path for almost everyone - Reduce maintenance and support burden due to confusion/discovery issues
Alternatives Considered
- Leave naming as-is and only improve documentation
- Less effective, could still lead to accidental misuse
- Overload a single method with optional parameters
- Might reduce confusion, but could clutter the interface and lose explicitness
Call for Discussion
- Which pair of names do people find most intuitive for the high-level (cached, segmented, scheduled, dynamic) and low-level (manual, single kernel, static, no cache) entry points?
- Should we prioritize Pythonic simplicity, technical explicitness, or symmetry?
- Any migration/breakage concerns for downstream usages?
- Are there strong reasons to retain the current names?
CC: @kevinstephano, @rdspring1
- Dominant language
- C++
- Stars
- 404
- Forks
- 84
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/Fuser
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Multi-GPU
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Multi-GPU
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Multi-GPU
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LadybirdBrowser/ladybird#12123 ·