NVIDIA/Fuser

Update python benchmarks to use direct bindings.

Open

#5 285 ouverte le 1 oct. 2025

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)C++ (80 forks)github user discovery
good first issue

Métriques du dépôt

Stars
 (392 stars)
Métriques de merge PR
 (Métriques PR en attente)

Description

We need to update the python benchmarks to use the direct bindings. I'd recommend updating the test files that only need updates to their FusionDefinition before updating core.py.

  • CI command: !test --pybench

General

  • Replace import nvfuser with import nvfuser_direct as nvfuser

Update core.py in benchmarks/python

  • Direct bindings does not use FusionCache. Remove from benchmarks/python/core.py and update benchmarks appropriately.
  • Direct bindings does not support profile argument in fd.execute. profiling was disabled for CUDA 13. Either add profiling to direct bindings or remove option from benchmarks.
  • benchmarks/python/host tests the FusionCache, so you can make a copy of core.py just for these tests OR remove the completely.

Update FusionDefinition for benchmarks.

There are some API Differences between direct and legacy bindings. Update FusionDefinition so they run correctly.

  • Replace fd.define_vector with regular python list.
V6 = fd.define_vector([T0.size(0), 1], dtype=DataType.Int)   # Not Implemented in direct bindings
V6 = [T0.size(0), 1]  # Replace with regular python list
  • Replace fd.add_output(output, stride_order) with
output = fd.stride_order(a, stride_order)
fd.add_output(output)

Guide contributeur