MCPcopy Create free account
hub / github.com/apache/tvm / get_random_tensor

Function get_random_tensor

tests/python/contrib/test_cutlass_gemm.py:28–33  ·  view source on GitHub ↗
(shape, dtype)

Source from the content-addressed store, hash-verified

26
27
28def get_random_tensor(shape, dtype):
29 if dtype == "int8":
30 return np.random.randint(-128, 128, shape).astype(dtype)
31 elif dtype == "uint8":
32 return np.random.randint(0, 256, shape).astype(dtype)
33 return np.random.uniform(-1, 1, shape).astype(dtype)
34
35
36def verify_group_gemm(

Callers 1

get_ref_dataFunction · 0.85

Calls 2

uniformMethod · 0.80
astypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…