/third_party/ltp/testcases/kernel/device-drivers/zram/ |
D | zram_lib.sh | 51 if [ -z "$dev_num" ]; then 52 dev_num=0 54 dev_num=$((dev_num+1)) 58 if [ $dev_num -le 0 ]; then 62 tst_set_timeout $((dev_num*450)) 64 tst_res TINFO "create '$dev_num' zram device(s)" 70 dev_end=$(($dev_start + $dev_num - 1)) 82 modprobe zram num_devices=$dev_num 90 modprobe zram num_devices=$dev_num 94 dev_end=$(($dev_num - 1))
|
D | zram03.c | 33 static int modprobe, dev_num, hot_add_flag; variable 116 sprintf(zram_stat_path, "/sys/block/zram%d/stat", dev_num); in print_stat() 128 sprintf(zram_mm_stat_path, "/sys/block/zram%d/mm_stat", dev_num); in print_mm_stat() 141 sprintf(zram_obsolete_file_path, "/sys/block/zram%d/num_reads", dev_num); in dump_info() 183 SAFE_FILE_SCANF(HOT_ADD_PATH, "%d", &dev_num); in setup() 219 SAFE_FILE_SCANF(zramctl_log_path, "/dev/zram%d", &dev_num); in setup() 223 sprintf(zram_block_path, "/sys/block/zram%d", dev_num); in setup() 224 sprintf(zram_dev_path, "/dev/zram%d", dev_num); in setup() 230 SAFE_FILE_PRINTF(HOT_REMOVE_PATH, "%d", dev_num); in cleanup()
|
D | zram01.sh | 40 dev_num=0 53 dev_num=$((dev_num+1)) 60 [ $dev_num -eq 0 ] && \
|
/third_party/ltp/testcases/kernel/uevents/ |
D | uevent01.c | 32 int pid, fd, dev_num; in verify_uevent() local 53 dev_num = tst_find_free_loopdev(dev_path, sizeof(dev_path)); in verify_uevent() 55 if (dev_num < 0) in verify_uevent() 59 "change@/devices/virtual/block/loop%i", dev_num); in verify_uevent() 62 "DEVPATH=/devices/virtual/block/loop%i", dev_num); in verify_uevent() 64 snprintf(ev_dev_minor, sizeof(ev_dev_minor), "MINOR=%i", dev_num); in verify_uevent() 65 snprintf(ev_dev_name, sizeof(ev_dev_name), "DEVNAME=loop%i", dev_num); in verify_uevent()
|
/third_party/ltp/testcases/kernel/syscalls/ioctl/ |
D | ioctl_loop01.c | 31 static int dev_num, attach_flag, dev_fd, parted_sup; variable 104 dev_num = tst_find_free_loopdev(dev_path, sizeof(dev_path)); in setup() 105 if (dev_num < 0) in setup() 123 sprintf(partscan_path, "/sys/block/loop%d/loop/partscan", dev_num); in setup() 124 sprintf(autoclear_path, "/sys/block/loop%d/loop/autoclear", dev_num); in setup() 125 sprintf(backing_path, "/sys/block/loop%d/loop/backing_file", dev_num); in setup() 126 sprintf(sys_loop_partpath, "/sys/block/loop%d/loop%dp1", dev_num, dev_num); in setup()
|
D | ioctl09.c | 22 static int dev_num, attach_flag, dev_fd; variable 39 dev_num, dev_num, part_num); in check_partition() 92 dev_num = tst_find_free_loopdev(dev_path, sizeof(dev_path)); in setup() 93 if (dev_num < 0) in setup()
|
D | ioctl_loop07.c | 25 static int dev_num, dev_fd, file_fd, attach_flag, loop_configure_sup = 1; variable 111 dev_num = tst_find_free_loopdev(dev_path, sizeof(dev_path)); in setup() 112 if (dev_num < 0) in setup() 119 sprintf(sys_loop_sizepath, "/sys/block/loop%d/size", dev_num); in setup() 120 sprintf(sys_loop_sizelimitpath, "/sys/block/loop%d/loop/sizelimit", dev_num); in setup()
|
D | ioctl_loop02.c | 106 int dev_num; in setup() local 110 dev_num = tst_find_free_loopdev(dev_path, sizeof(dev_path)); in setup() 111 if (dev_num < 0) in setup() 118 sprintf(backing_path, "/sys/block/loop%d/loop/backing_file", dev_num); in setup() 121 sprintf(loop_ro_path, "/sys/block/loop%d/ro", dev_num); in setup()
|
D | ioctl_loop04.c | 24 static int dev_num, dev_fd, file_fd, attach_flag; variable 66 dev_num = tst_find_free_loopdev(dev_path, sizeof(dev_path)); in setup() 67 if (dev_num < 0) in setup() 72 sprintf(sys_loop_sizepath, "/sys/block/loop%d/size", dev_num); in setup()
|
D | ioctl_loop03.c | 19 static int dev_num, dev_fd, file_fd, attach_flag; variable 39 dev_num = tst_find_free_loopdev(dev_path, sizeof(dev_path)); in setup() 40 if (dev_num < 0) in setup()
|
D | ioctl_loop05.c | 36 static int dev_num, dev_fd, block_devfd, attach_flag, logical_block_size; variable 101 dev_num = tst_find_free_loopdev(dev_path, sizeof(dev_path)); in setup() 102 if (dev_num < 0) in setup() 105 sprintf(sys_loop_diopath, "/sys/block/loop%d/loop/dio", dev_num); in setup()
|
D | ioctl_loop06.c | 18 static int dev_num, dev_fd, file_fd, attach_flag, loop_configure_sup = 1; variable 96 dev_num = tst_find_free_loopdev(dev_path, sizeof(dev_path)); in setup() 97 if (dev_num < 0) in setup()
|
/third_party/alsa-utils/alsaucm/ |
D | dump.c | 454 int err = 0, j, dev_num; in render_devlist() local 457 dev_num = snd_use_case_get_list(uc_mgr, buf, &dev_list); in render_devlist() 458 if (dev_num < 0) { in render_devlist() 461 return dev_num; in render_devlist() 463 if (dev_num > 0) { in render_devlist() 467 for (j = 0; j < dev_num; j++) { in render_devlist() 468 err = value(render, dev_list[j], j + 1 == dev_num); in render_devlist() 475 snd_use_case_free_list(dev_list, dev_num); in render_devlist() 550 int i, j, num, dev_num; in render() local 569 dev_num = snd_use_case_get_list(uc_mgr, buf, &dev_list); in render() [all …]
|
/third_party/mindspore/tests/ut/python/parallel/ |
D | test_auto_parallel_resnet.py | 290 dev_num = 8 291 context.set_auto_parallel_context(parallel_mode=ParallelMode.AUTO_PARALLEL, device_num=dev_num) 308 assert v[0][0] == dev_num 310 assert v == [[dev_num, 1], [1, 1]] 312 assert v == [[dev_num, 1]] 665 dev_num = 8 666 context.set_auto_parallel_context(parallel_mode=ParallelMode.AUTO_PARALLEL, device_num=dev_num) 684 assert v[0][0] == dev_num 686 assert v == [[1, 1], [dev_num, 1]] 688 assert v == [[1, dev_num]] [all …]
|
D | test_batchnorm_batch_parallel.py | 33 dev_num = 8 variable 34 strategy_weight = ((dev_num, 1, 1, 1), (1, 1, 1, 1)) 35 strategy_bn = ((dev_num, 1, 1, 1), (1,), (1,), (1,), (1,)) 36 strategy_fc_weight_bias = ((dev_num, 1), (1, 1), (1,)) 97 strategy_no_weight = ((dev_num, 1, 1, 1),) 112 x = self.reshape(x, (32 * dev_num, 200704)) 123 …ontext.set_auto_parallel_context(parallel_mode=ParallelMode.SEMI_AUTO_PARALLEL, device_num=dev_num) 138 loss.softmax_cross_entropy.shard(((dev_num, 1), (dev_num, 1)))
|
D | test_operator_model_parallel.py | 36 dev_num = 8 variable 37 strategy_no_weight = ((dev_num, 1, 1, 1),) 38 strategy_weight = ((dev_num, 1, 1, 1), (1, 1, 1, 1)) 39 strategy_add = ((dev_num, 1, 1, 1), (dev_num, 1, 1, 1)) 40 strategy_bn = ((dev_num, 1, 1, 1), (1,), (1,), (1,), (1,)) 42 strategy_fc_weight_nobias = ((1, dev_num), (1, dev_num)) 43 strategy_tensor_add = ((1, dev_num), (dev_num,)) 322 self.relu = P.ReLU().shard(((1, dev_num, 1, 1),)) 356 context.set_auto_parallel_context(device_num=dev_num, global_rank=0) 357 …ontext.set_auto_parallel_context(parallel_mode=ParallelMode.SEMI_AUTO_PARALLEL, device_num=dev_num) [all …]
|
D | test_range.py | 70 dev_num = 4 variable 71 _x = Tensor(np.ones([64 // dev_num, 8]), dtype=ms.float32) 88 …context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=dev_num, global_r… 97 …context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=dev_num, global_r… 106 …context.set_auto_parallel_context(parallel_mode="auto_parallel", device_num=dev_num, global_rank=2)
|
D | test_auto_parallel_resnet_sharding_propagation.py | 291 dev_num = 8 292 context.set_auto_parallel_context(parallel_mode=ParallelMode.AUTO_PARALLEL, device_num=dev_num, 303 matmul_stra = ((1, 1), (dev_num, 1)) 304 squeeze_stra = ((dev_num, 1, 1, 1),) 313 assert v[0][0] == dev_num 315 assert v == [[1, 1], [dev_num, 1]] 317 assert v == [[1, dev_num]]
|
D | test_auto_parallel_resnet_predict.py | 31 dev_num = 8 32 …context.set_auto_parallel_context(parallel_mode=ParallelMode.AUTO_PARALLEL, device_num=dev_num, fu…
|
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/tensor_layout/ |
D | tensor_redistribution.cc | 259 int64_t dev_num = attrs[TRANSFER_PERMUTE_DEV_NUM_INDEX]; in ComputePermuteCost() local 260 computation_cost_ += (input_size + input_size * dev_num + input_size * dev_num); in ComputePermuteCost() 261 memory_cost_ += (input_size * dev_num + input_size * dev_num + input_size); in ComputePermuteCost() 273 double dev_num = attrs[TRANSFER_CONCAT_SPLIT_COUNT_INDEX]; in ComputeConcatCost() local 275 forward_comm_cost_ += input_size * dev_num * ALLGATHER_REDUCESCATTER_SCALE_FACTOR; in ComputeConcatCost() 277 comm_cost_ += input_size * (dev_num + 1.0) * ALLGATHER_REDUCESCATTER_SCALE_FACTOR; in ComputeConcatCost() 282 memory_cost_ += input_size * dev_num; in ComputeConcatCost() 285 computation_cost_ += (input_size + input_size * dev_num + input_size * dev_num); in ComputeConcatCost() 286 memory_cost_ += (input_size * dev_num + input_size * dev_num + input_size); in ComputeConcatCost()
|
/third_party/mindspore/mindspore/lite/tools/optimizer/parallel/ |
D | depthwise_conv2d_info.cc | 186 size_t dev_num = splits_.size(); in CheckSplitOutputs() local 187 if (feature_split_outputs.size() != dev_num) { in CheckSplitOutputs() 190 if (kernel_split_outputs.size() != dev_num) { in CheckSplitOutputs() 196 if (bias_split_outputs.size() != dev_num) { in CheckSplitOutputs() 212 int64_t dev_num = static_cast<int64_t>(splits_.size()); in AdJustConvPrim() local 227 if (output_conv_index != (dev_num - 1)) { in AdJustConvPrim() 236 if (output_conv_index != dev_num - 1) { in AdJustConvPrim() 245 if (output_conv_index != dev_num - 1) { in AdJustConvPrim() 254 if (output_conv_index != dev_num - 1) { in AdJustConvPrim() 320 int dev_num = static_cast<int>(splits_.size()); in ConstructOutputCNodes() local [all …]
|
D | conv2d_info.cc | 236 size_t dev_num = strategy_.dev_num; in InferParallelCNodes() local 246 …re_split_cnode = CreateOutputsOfSplit(cnode_, 0, &feature_split_outputs, kAxisH, dev_num, splits_); in InferParallelCNodes() 247 if (CheckSplitResult(feature_split_cnode, feature_split_outputs, dev_num) != RET_OK) { in InferParallelCNodes() 273 size_t dev_num = strategy_.dev_num; in ConstructOutputCNodes() local 278 for (size_t i = 0; i < dev_num; ++i) { in ConstructOutputCNodes() 306 if (i != (dev_num - 1)) { in ConstructOutputCNodes() 368 size_t dev_num = strategy_.dev_num; in InferReplaceOp() local 371 replace_op_ = CreateReduceNode(cnode_, parallel_output_nodes_, dev_num); in InferReplaceOp() 382 replace_op_ = CreateConcateNode(cnode_, parallel_output_nodes_, concat_dim, dev_num); in InferReplaceOp()
|
/third_party/ltp/testcases/kernel/syscalls/ustat/ |
D | ustat01.c | 20 static dev_t dev_num; variable 26 TEST(tst_syscall(__NR_ustat, (unsigned int)dev_num, &ubuf)); in run() 41 dev_num = buf.st_dev; in setup()
|
/third_party/mindspore/mindspore/ops/_grad/ |
D | grad_comm_ops.py | 161 dev_num = self.dev_num 163 scale = 1 / dev_num 245 dev_num = get_group_size(self.group) 246 split = P.Split(output_num=dev_num) 274 dev_num = get_group_size(self.group) 275 split = P.Split(output_num=dev_num) 399 dev_num = self.dev_num 422 num = F.scalar_cast(dev_num, F.dtype(dx)) 428 num = F.scalar_cast(dev_num, F.dtype(grad)) 450 dev_num = self.dev_num [all …]
|
/third_party/mindspore/mindspore/ops/operations/ |
D | comm_ops.py | 725 def __init__(self, group=None, dev_num=None, mean_flag=None): argument 728 self.dev_num = dev_num 755 def __init__(self, group=None, dev_num=None, mean_flag=None, grad_accumulation_step=None): argument 758 self.dev_num = dev_num 883 def __init__(self, group=None, dev_num=None, mean_flag=None): argument 886 self.dev_num = dev_num
|