quack() — pytorch Function Reference
Architecture documentation for the quack() function in kernels.py from the pytorch codebase.
Entity Profile
Relationship Graph
Source Code
benchmarks/dynamo/genai_layers/kernels.py lines 176–185
def quack(self, args, kwargs=None) -> Any:
from quack.cross_entropy import cross_entropy
if kwargs is not None:
raise AssertionError(f"Expected kwargs to be None, but got {kwargs}")
x, target, dloss = args
loss = cross_entropy(x, target)
return lambda: torch.autograd.grad(
loss, x, grad_outputs=dloss, retain_graph=True
)
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free