benchmark_kernel_in_milliseconds() — pytorch Function Reference
Architecture documentation for the benchmark_kernel_in_milliseconds() function in utils.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD 52d0e3c4_92e4_8027_cd0e_d942bee8cfc8["benchmark_kernel_in_milliseconds()"] 3d4e92c5_a13f_fad7_1514_52cd7fc93a06["benchmark_single_shape_for_backend()"] 3d4e92c5_a13f_fad7_1514_52cd7fc93a06 -->|calls| 52d0e3c4_92e4_8027_cd0e_d942bee8cfc8 style 52d0e3c4_92e4_8027_cd0e_d942bee8cfc8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmarks/dynamo/genai_layers/utils.py lines 15–20
def benchmark_kernel_in_milliseconds(func: Callable, *args, **kwargs) -> float:
# warmup
for _ in range(5):
func(*args, **kwargs)
with torch.compiler.set_stance("fail_on_recompile"):
return benchmarker.benchmark_gpu(lambda: func(*args, **kwargs))
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does benchmark_kernel_in_milliseconds() do?
benchmark_kernel_in_milliseconds() is a function in the pytorch codebase.
What calls benchmark_kernel_in_milliseconds()?
benchmark_kernel_in_milliseconds() is called by 1 function(s): benchmark_single_shape_for_backend.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free