/aosp_15_r20/external/armnn/python/pyarmnn/test/ |
H A D | test_const_tensor.py | 17 … (ann.DataType_Float32, np.random.randint(1, size=(2, 4)).astype(np.float32)), 18 … (ann.DataType_Float16, np.random.randint(1, size=(2, 4)).astype(np.float16)), 19 … (ann.DataType_QAsymmU8, np.random.randint(1, size=(2, 4)).astype(np.uint8)), 20 … (ann.DataType_QAsymmS8, np.random.randint(1, size=(2, 4)).astype(np.int8)), 21 … (ann.DataType_QSymmS8, np.random.randint(1, size=(2, 4)).astype(np.int8)), 22 … (ann.DataType_Signed32, np.random.randint(1, size=(2, 4)).astype(np.int32)), 23 … (ann.DataType_QSymmS16, np.random.randint(1, size=(2, 4)).astype(np.int16)) 37 … (ann.DataType_Float32, np.random.randint(1, size=(2, 2)).astype(np.float32)), 38 … (ann.DataType_Float16, np.random.randint(1, size=(2, 2)).astype(np.float16)), 39 … (ann.DataType_QAsymmU8, np.random.randint(1, size=(2, 2)).astype(np.uint8)), [all …]
|
/aosp_15_r20/external/pytorch/torchgen/static_runtime/ |
H A D | config.py | 99 arg_map["index"] = "at::randint(0, 216, {20}, torch::kInt64)" 101 arg_map["index"] = "at::randint(0, 1000, {100}, torch::kInt64)" 146 arg_map["target"] = "at::randint(6, {6}, torch::kInt64)" 150 arg_map["target"] = "at::randint(22, {22}, torch::kInt64)" 156 arg_map["target"] = "at::randint(6, {6, 6}, torch::kInt64)" 159 arg_map["target"] = "at::randint(22, {22, 22}, torch::kInt64)" 164 arg_map["target"] = "at::randint(6, {6}, torch::kInt64)" 168 arg_map["target"] = "at::randint(22, {22}, torch::kInt64)" 174 arg_map["target"] = "at::randint(6, {6, 6, 6}, torch::kInt64)" 178 arg_map["target"] = "at::randint(22, {22, 22, 22}, torch::kInt64)" [all …]
|
/aosp_15_r20/external/executorch/extension/llm/custom_ops/ |
H A D | test_update_quantized_cache.py | 90 k = torch.randint(0, 50, (1, 1, 8, 4), dtype=torch.int8) 91 v = torch.randint(0, 50, (1, 1, 8, 4), dtype=torch.int8) 94 k_zero_points = torch.randint(0, 20, (1, 1, 8, 1), dtype=torch.int64) 95 v_zero_points = torch.randint(0, 20, (1, 1, 8, 1), dtype=torch.int64) 103 k = torch.randint(0, 50, (1, 3, 8, 4), dtype=torch.int8) 104 v = torch.randint(0, 50, (1, 3, 8, 4), dtype=torch.int8) 107 k_zero_points = torch.randint(0, 20, (1, 3, 8, 1), dtype=torch.int64) 108 v_zero_points = torch.randint(0, 20, (1, 3, 8, 1), dtype=torch.int64) 116 k = torch.randint(0, 50, (1, 1, 8, 4), dtype=torch.int8) 117 v = torch.randint(0, 50, (1, 1, 8, 4), dtype=torch.int8) [all …]
|
/aosp_15_r20/external/ltp/testcases/network/nfsv4/acl/ |
H A D | random_gen.py | 32 group = self.gList[random.randint(0,len(self.gList)-1)][0] 154 l=random.randint(0,maxlength) 156 a = random.randint(0,a_length-1) 164 a = random.randint(0,a_length-1) 178 type = ace_type[random.randint(0,len(ace_type))] 179 flag = ace_flags[random.randint(0,len(ace_flags))] 180 mask = ace_mask[random.randint(0,len(ace_mask))] 181 who = ace_who[random.randint(0,len(ace_who))] 190 n = random.randint(0,userListSize-1) 200 if random.randint(0,1) == 1: [all …]
|
/aosp_15_r20/external/pytorch/test/ |
H A D | test_mkldnn.py | 106 for cpu_tensor in [torch.randint( 112 torch.randint( 237 N = torch.randint(3, 10, (1,)).item() 238 M = torch.randint(1, 3, (1,)).item() * groups 239 C = torch.randint(1, 3, (1,)).item() * groups 295 N = torch.randint(1, 3, (1,)).item() 296 M = torch.randint(1, 3, (1,)).item() * groups 297 C = torch.randint(1, 3, (1,)).item() * groups 364 N = torch.randint(3, 10, (1,)).item() 365 M = torch.randint(1, 3, (1,)).item() * groups [all …]
|
H A D | test_out_dtype_op.py | 31 weight = torch.randint(-128, 127, (5, 5), dtype=torch.int8) 33 x = torch.randint(-128, 127, (5, 5), dtype=torch.int8) 61 weight = torch.randint(-128, 127, (5, 5), dtype=torch.int8) 63 x = torch.randint(-128, 127, (5, 5), dtype=torch.int8) 88 weight = torch.randint(-128, 127, (5, 5), dtype=torch.int8) 90 x = torch.randint(-128, 127, (5, 5), dtype=torch.int8) 105 inp = (torch.randint(-128, 127, (5, 5), dtype=torch.int8), 3.0) 116 inp = (torch.randint(-128, 127, (5, 5), dtype=torch.int8), 3.0) 131 …M(), (torch.randint(-128, 127, (5, 5), dtype=torch.int8), torch.randint(-128, 127, (5, 5), dtype=t… 141 …f(torch.randint(-128, 127, (5, 5), dtype=torch.int8), torch.randint(-128, 127, (5, 5), dtype=torch… [all …]
|
H A D | test_scatter_gather_ops.py | 35 idx[tuple(ii)] = torch.randint(dim_size, (elems_per_row,)) 39 m, n, o = random.randint(10, 20), random.randint(10, 20), random.randint(10, 20) 40 elems_per_row = random.randint(1, 10) 79 index = torch.randint(0, 2, [3, 0], dtype=torch.int64, device=device) 88 m, n, o = random.randint(10, 20), random.randint(10, 20), random.randint(10, 20) 89 elems_per_row = random.randint(1, 10) 100 src_size = [random.randint(1, 5) + s for s in idx_size] 288 idx = torch.randint(0, dim_size, shape) 339 idx = torch.randint(0, dim_size, shape)
|
H A D | test_shape_ops.py | 46 x = torch.randn(*shape, device=device) * random.randint(30, 100) 49 x = torch.randn(*shape, dtype=dtype, device=device) * random.randint( 66 x = torch.randint(15, 100, shape, dtype=dtype, device=device) 185 range(nd), r=random.randint(1, nd) 195 random_idx = random.randint(0, len(src_sequence) - 1) 198 random_idx = random.randint(0, len(src_sequence) - 1) 201 random_idx = random.randint(0, len(src_sequence) - 1) 203 random_idx = random.randint(0, len(src_sequence) - 1) 303 mask = torch.randint(0, 2, X.shape, dtype=torch.bool, device=device) 553 return tuple(torch.randint(min_size, max_size + 1, (dim,))) [all …]
|
H A D | test_nn.py | 2197 end = torch.randint(1, L, size=()).item() 2638 targets = torch.randint(1, 15, (sum(target_lengths),), dtype=torch.int) 2651 targets = torch.randint(1, 15, (3, 29), dtype=torch.long, device='cuda') 2659 targets = torch.randint(1, 15, (3, 29), dtype=torch.int) 2672 …targets = torch.randint(low=1, high=vocab_size - 1, size=(batch_size, target_length), dtype=torch.… 2695 target = torch.randint(low=1, high=C, size=(S,), dtype=torch.int) 2711 target = torch.randint(low=1, high=C, size=(N, S), dtype=torch.int) 2732 targets = torch.randint(1, 15, (sum(target_lengths),), dtype=torch.int, device='cuda') 4414 upscale_factor = random.randint(2, 5) if upscale_factor is None else upscale_factor 4416 channels = random.randint(1, 4) * upscale_factor ** 2 + (0 if valid_channels_dim else 1) [all …]
|
/aosp_15_r20/external/pytorch/test/inductor/ |
H A D | test_pattern_matcher.py | 136 torch.randint(-128, 127, (32, 32), dtype=torch.int8, device="cuda"), 137 torch.randint(-128, 127, (32, 8), dtype=torch.int8, device="cuda"), 141 torch.randint(-128, 127, (32, 32), dtype=torch.int8, device="cuda"), 142 torch.randint(-128, 127, (32, 8), dtype=torch.int8, device="cuda"), 146 torch.randint(-128, 127, (32, 32), dtype=torch.int8, device="cuda"), 147 torch.randint(-128, 127, (32, 8), dtype=torch.int8, device="cuda"), 164 torch.randint(-128, 127, (32, 32), dtype=torch.int8, device="cuda"), 165 torch.randint(-128, 127, (32, 8), dtype=torch.int8, device="cuda"), 170 torch.randint(-128, 127, (32, 32), dtype=torch.int8, device="cuda"), 171 torch.randint(-128, 127, (32, 8), dtype=torch.int8, device="cuda"), [all …]
|
H A D | test_scatter_optimization.py | 41 x = torch.randint(0, N, (L, M), dtype=torch.int64) 59 x = torch.randint(0, M, (N,), dtype=torch.int64) 72 x = torch.randint(0, N, (M,), dtype=torch.int64) 85 x = torch.randint(0, N, (M // 2,), dtype=torch.int64) 99 x = torch.randint(0, N, (M,), dtype=torch.int64) 112 x = torch.randint(0, N, (M, N // 2), dtype=torch.int64) 128 x = torch.randint(0, N, (M, 1), dtype=torch.int64) 174 label = torch.randint(0, V, (B, T)).to(torch.int64)
|
/aosp_15_r20/external/tensorflow/tensorflow/python/kernel_tests/math_ops/ |
H A D | bincount_op_test.py | 88 arr = np.random.randint(0, 1000, num_samples) 90 weights = np.random.randint(-100, 100, num_samples) 102 arr = np.random.randint(0, 1000, num_samples) 111 arr = np.random.randint(0, 1000, size=1000) 116 arr = np.random.randint(0, 1000, size=(100, 100)) 192 inp = np.random.randint(0, size, (4096), dtype=dtype) 208 inp = np.random.randint(0, size, (4096,), dtype=dtype) 226 inp = np.random.randint(0, size, (4096), dtype=dtype) 243 inp = np.random.randint(0, size, (4096,), dtype=dtype) 255 inp = np.random.randint(0, size, (num_rows, num_cols), dtype=dtype) [all …]
|
/aosp_15_r20/external/pytorch/test/distributed/_tensor/ |
H A D | test_tensor_ops.py | 434 global_index = torch.randint(8, (4, 4, 8)) 452 global_index = torch.randint(8, (4, 1, 8)) 465 global_index = torch.randint(8, (4, 4, 8)) 488 torch.randint(5, (4, 8)), 494 torch.randint(5, (4,)), 500 torch.randint(5, (4,)), 506 torch.randint(5, (12,)), 512 torch.randint(5, (4, 8)), 518 torch.randint(5, (4, 12)), 524 torch.randint(5, (4, 8, 16)), [all …]
|
/aosp_15_r20/external/pytorch/test/quantization/core/ |
H A D | test_quantized_tensor.py | 150 n = np.random.randint(1, 10) 151 c = np.random.randint(2, 10) 152 h = np.random.randint(2, 10) 153 w = np.random.randint(2, 10) 156 zero_point = np.random.randint(0.0, 10) 158 dtype = qints[np.random.randint(0, len(qints))] 182 n = np.random.randint(1, 10) 183 c = np.random.randint(2, 10) 184 h = np.random.randint(2, 10) 185 w = np.random.randint(2, 10) [all …]
|
/aosp_15_r20/external/executorch/kernels/quantized/test/ |
H A D | test_quant_dequant_per_token.py | 37 zero_point = torch.randint(0, 10, (8, 1)) 50 zero_point = torch.randint(0, 10, (1, 3, 8, 1)) 63 zero_point = torch.randint(0, 10, (1, 1, 8, 1)) 75 zero_point = torch.randint(0, 10, (1, 3, 8, 1)) 86 input_tensor = torch.randint(-50, 120, (3, 3), dtype=torch.int8) 101 input_tensor = torch.randint(-50, 120, (8, 32), dtype=torch.int8) 103 zero_point = torch.randint(0, 10, (8, 1)) 114 input_tensor = torch.randint(-50, 120, (1, 3, 8, 32), dtype=torch.int8) 116 zero_point = torch.randint(0, 10, (1, 3, 8, 1)) 127 input_tensor = torch.randint(-50, 120, (1, 1, 8, 32), dtype=torch.int8) [all …]
|
/aosp_15_r20/external/executorch/backends/apple/mps/test/ |
H A D | test_mps_models.py | 94 torch.randint(0, 10, (2, 2)), 95 torch.randint(0, 10, (2, 2)), 96 random.randint(0, 10), 195 return (torch.randint(2, [1]) == 0, torch.randn(10)) 222 return (random.randint(0, 1) == 0, torch.randn(10)) 231 inputs=(torch.zeros([1]).to(dtype=torch.long), torch.randint(10, 100, [1])) 237 inputs=(torch.zeros([1]).to(dtype=torch.long), torch.randint(10, 100, [1])) 268 return (torch.zeros([1]).to(dtype=torch.long), torch.randint(10, 100, [1])) 277 inputs=(torch.zeros([1]).to(dtype=torch.long), torch.randint(10, 100, [1])) 283 torch.randint(10, 100, [1]), [all …]
|
/aosp_15_r20/external/pytorch/test/nn/ |
H A D | test_dropout.py | 48 b = random.randint(1, 5) 49 w = random.randint(1, 5) 50 h = random.randint(1, 5) 51 d = random.randint(1, 2) 213 random.randint(10, 15), 214 random.randint(10, 15), 215 random.randint(10, 15), 242 b = random.randint(1, 5) 243 w = random.randint(1, 5) 244 h = random.randint(1, 5) [all …]
|
/aosp_15_r20/external/pytorch/benchmarks/operator_benchmark/pt/ |
H A D | cat_test.py | 50 lambda: random.randint(2**6, 2**7), 60 lambda: random.randint(2**6, 2**7), 70 lambda: random.randint(2**6, 2**7), 75 [[lambda: random.randint(2**5, 2**6), 2**5, 2**6], 50, 0], # noqa: E241 77 [2**5, lambda: random.randint(2**5, 2**6), 2**6], # noqa: E241,E272 85 lambda: random.randint(2**5, 2**6), 114 [[lambda: random.randint(1, 10000)], 100, 0], 115 [[lambda: random.randint(1, 1000)], 1000, 0], 116 [[lambda: random.randint(1, 500)], 2000, 0], 117 [[lambda: random.randint(1, 300)], 3000, 0],
|
H A D | qembedding_bag_lookups_test.py | 108 self.num_lengths = np.random.randint(1, num_offsets + 1) 109 self.lengths = np.random.randint( 119 np.random.randint( 139 np.random.randint( 219 self.num_lengths = np.random.randint(1, num_offsets + 1) 220 self.lengths = np.random.randint( 230 np.random.randint( 250 np.random.randint(
|
/aosp_15_r20/external/executorch/test/end2end/ |
H A D | test_end2end.py | 146 torch.randint(0, 10, (2, 2)), 147 torch.randint(0, 10, (2, 2)), 148 random.randint(0, 10), 247 return (torch.randint(2, [1]) == 0, torch.randn(10)) 274 return (random.randint(0, 1) == 0, torch.randn(10)) 283 inputs=(torch.zeros([1]).to(dtype=torch.long), torch.randint(10, 100, [1])) 289 inputs=(torch.zeros([1]).to(dtype=torch.long), torch.randint(10, 100, [1])) 320 return (torch.zeros([1]).to(dtype=torch.long), torch.randint(10, 100, [1])) 329 inputs=(torch.zeros([1]).to(dtype=torch.long), torch.randint(10, 100, [1])) 335 torch.randint(10, 100, [1]), [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/compiler/mlir/tfrt/python_tests/ |
H A D | tf_matmul_test.py | 52 k = np.random.randint(1, 10) 59 k = np.random.randint(1, 10) 60 n = np.random.randint(1, 10) 67 m = np.random.randint(1, 10) 68 k = np.random.randint(1, 10) 75 m = np.random.randint(1, 10) 76 k = np.random.randint(1, 10) 77 n = np.random.randint(1, 10)
|
/aosp_15_r20/external/scapy/scapy/modules/ |
H A D | p0f.py | 24 from scapy.volatile import RandInt, RandByte, RandChoice, RandNum, RandShort, RandString 391 pers = pb[random.randint(0, len(pb) - 1)] 419 # why we use random.randint() 424 options.append(('MSS', random.randint(1, maxmss))) 431 'MSS', coef*random.randint(1, maxmss//coef))) 462 ts_a = random.randint(120, 100*60*60*24*365) 469 # FIXME: RandInt() here does not work (bug (?) in 474 # struct.pack('I', RandInt()) 475 ts_b = random.randint(1, 2**32-1) 529 elif qq == 'A': pkt.payload.ack = RandInt() [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/python/kernel_tests/data_structures/ |
H A D | priority_queue_test.py | 41 elem = np.random.randint(-5, 5, size=100).astype(np.int64) 75 elem = np.random.randint(-5, 5, size=100).astype(np.int64) 125 enqueue_counts = np.random.randint(10, size=num_threads) 127 np.random.randint( 178 enqueue_counts = np.random.randint(10, size=num_threads) 180 np.random.randint( 236 elem = np.random.randint(-5, 5, size=100).astype(np.int64) 285 elem = np.random.randint(-100, 100, size=1000).astype(np.int64) 305 elem = np.random.randint(-100, 100, size=1000).astype(np.int64) 313 elem = np.random.randint(-100, 100, size=1000).astype(np.int64)
|
/aosp_15_r20/external/pytorch/aten/src/ATen/ |
H A D | VmapModeRegistrations.cpp | 99 m.impl("randint", unsupportedRandomOp<int64_t, IntArrayRef, TENSOROPTIONS>); in TORCH_LIBRARY_IMPL() 100 …m.impl("randint.generator", unsupportedRandomOp<int64_t, IntArrayRef, std::optional<Generator>, TE… in TORCH_LIBRARY_IMPL() 101 m.impl("randint.low", unsupportedRandomOp<int64_t, int64_t, IntArrayRef, TENSOROPTIONS>); in TORCH_LIBRARY_IMPL() 102 …m.impl("randint.low_generator", unsupportedRandomOp<int64_t, int64_t, IntArrayRef, std::optional<G… in TORCH_LIBRARY_IMPL() 103 m.impl("randint.out", unsupportedRandomOp_<int64_t, IntArrayRef, Tensor&>); in TORCH_LIBRARY_IMPL() 104 …m.impl("randint.generator_out", unsupportedRandomOp_<int64_t, IntArrayRef, std::optional<Generator… in TORCH_LIBRARY_IMPL() 105 m.impl("randint.low_out", unsupportedRandomOp_<int64_t, int64_t, IntArrayRef, Tensor&>); in TORCH_LIBRARY_IMPL() 106 …m.impl("randint.low_generator_out", unsupportedRandomOp_<int64_t, int64_t, IntArrayRef, std::optio… in TORCH_LIBRARY_IMPL()
|
/aosp_15_r20/external/pytorch/benchmarks/static_runtime/ |
H A D | test_generated_ops.cc | 658 auto self0 = at::randint(1, 100, {6, 6, 6}, at::kInt); in TEST() 668 auto self1 = at::randint(1, 100, {22, 22, 22}, at::kInt); in TEST() 1508 auto self0 = at::randint(1, 100, {6, 6, 6}, at::kInt); in TEST() 1509 auto other0 = at::randint(1, 100, {6, 6, 6}, at::kInt); in TEST() 1519 auto self1 = at::randint(1, 100, {22, 22, 22}, at::kInt); in TEST() 1520 auto other1 = at::randint(1, 100, {22, 22, 22}, at::kInt); in TEST() 1540 auto self0 = at::randint(1, 100, {6, 6, 6}, at::kInt); in TEST() 1541 auto other0 = at::randint(1, 100, {6, 6, 6}, at::kInt); in TEST() 1551 auto self1 = at::randint(1, 100, {22, 22, 22}, at::kInt); in TEST() 1552 auto other1 = at::randint(1, 100, {22, 22, 22}, at::kInt); in TEST() [all …]
|