MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / random_tensor

Function random_tensor

tests/gemm_dequantize/th_gemm_dequantize.py:4–5  ·  view source on GitHub ↗
(shape, dtype, device, mean=0, std=1)

Source from the content-addressed store, hash-verified

2import unittest
3
4def random_tensor(shape, dtype, device, mean=0, std=1):
5 return torch.empty(shape, dtype=dtype, device=device).normal_(mean, std)
6
7class TestGemmDequantize(unittest.TestCase):
8 def setUp(self) -> None:

Callers 2

bench_helperMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected