NVIDIA/Fuser

Update python benchmarks to use direct bindings.

Open

#5.285 aberto em 1 de out. de 2025

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)C++ (80 forks)github user discovery
good first issue

Métricas do repositório

Stars
 (392 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

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)

Guia do colaborador