cpp_class() — pytorch Function Reference
Architecture documentation for the cpp_class() function in generate_kernels.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD a19035f6_8189_b8f7_6a21_4dbaf2229779["cpp_class()"] a8e20f8a_af7c_0de9_f90c_676b733830c2["cpp_class()"] a8e20f8a_af7c_0de9_f90c_676b733830c2 -->|calls| a19035f6_8189_b8f7_6a21_4dbaf2229779 a8e20f8a_af7c_0de9_f90c_676b733830c2["cpp_class()"] a19035f6_8189_b8f7_6a21_4dbaf2229779 -->|calls| a8e20f8a_af7c_0de9_f90c_676b733830c2 style a19035f6_8189_b8f7_6a21_4dbaf2229779 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
aten/src/ATen/native/transformers/cuda/mem_eff_attention/kernels/generate_kernels.py lines 193–208
def cpp_class(self) -> str:
template_args = ", ".join(
[
f"cutlass::arch::Sm{self.sm_range[0]}",
DTYPES[self.dtype],
"true" if self.aligned else "false",
"true" if self.apply_dropout else "false",
"true" if self.preload_mmas else "false",
str(self.block_i),
str(self.block_j),
str(self.max_k),
]
)
if self.keys_queries_aligned_to_blocksizes:
template_args += ", true"
return f"AttentionBackwardKernel<{template_args}>"
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does cpp_class() do?
cpp_class() is a function in the pytorch codebase.
What does cpp_class() call?
cpp_class() calls 1 function(s): cpp_class.
What calls cpp_class()?
cpp_class() is called by 1 function(s): cpp_class.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free