MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / benchmark

Function benchmark

lightx2v_kernel/python/lightx2v_kernel/utils.py:75–157  ·  view source on GitHub ↗

A decorator function to assist in performance testing of CUDA operations. This function will: 1. Automatically determine whether any parameters in the argument list, or the output of the `func`, are of type `torch.Tensor`. 2. If so, calculate the memory usage of the input an

(func: Callable, shape: List[int], tflops: float, steps: int, *args, **kwargs)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

test_performanceMethod · 0.90
test_performanceMethod · 0.90
test_performanceMethod · 0.90

Calls 3

calculate_memoryFunction · 0.85
is_availableMethod · 0.45
valuesMethod · 0.45

Tested by 3

test_performanceMethod · 0.72
test_performanceMethod · 0.72
test_performanceMethod · 0.72