MCPcopy Create free account
hub / github.com/RightNow-AI/autokernel / gen_softmax_inputs

Function gen_softmax_inputs

bench.py:211–215  ·  view source on GitHub ↗
(size: dict, dtype: torch.dtype, device: str, seed: int = 42)

Source from the content-addressed store, hash-verified

209
210
211def gen_softmax_inputs(size: dict, dtype: torch.dtype, device: str, seed: int = 42) -> dict:
212 torch.manual_seed(seed)
213 rows, cols = size["rows"], size["cols"]
214 x = torch.randn(rows, cols, device=device, dtype=dtype)
215 return {"x": x}
216
217
218def gen_layernorm_inputs(size: dict, dtype: torch.dtype, device: str, seed: int = 42) -> dict:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected