Skip to content

Commit 06405fa

Browse files
benchmark/nixlbench: gflags defines adjusted
This patch doesn't change any logic. It adjusts the parameter definitions to help us move to a different parameter parsing infrastructure in upcoming patches. Signed-off-by: Anton Nayshtut <[email protected]>
1 parent 41de732 commit 06405fa

File tree

1 file changed

+29
-47
lines changed

1 file changed

+29
-47
lines changed

benchmark/nixlbench/src/utils/utils.cpp

Lines changed: 29 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -38,44 +38,34 @@
3838
/**********
3939
* xferBench Config
4040
**********/
41-
DEFINE_string(benchmark_group,
42-
"default",
41+
DEFINE_string(benchmark_group, "default",
4342
"Name of benchmark group. Use different names to run multiple benchmarks in parallel "
4443
"(Default: default)");
4544
DEFINE_string(runtime_type, XFERBENCH_RT_ETCD, "Runtime type to use for communication [ETCD]");
4645
DEFINE_string(worker_type, XFERBENCH_WORKER_NIXL, "Type of worker [nixl, nvshmem]");
47-
DEFINE_string(
48-
backend,
49-
XFERBENCH_BACKEND_UCX,
50-
"Name of NIXL backend [UCX, UCX_MO, GDS, GDS_MT, POSIX, GPUNETIO, Mooncake, HF3FS, OBJ, GUSLI] \
51-
(only used with nixl worker)");
52-
DEFINE_string(initiator_seg_type, XFERBENCH_SEG_TYPE_DRAM, "Type of memory segment for initiator \
53-
[DRAM, VRAM]. Note: Storage backends always use DRAM locally.");
54-
DEFINE_string(target_seg_type, XFERBENCH_SEG_TYPE_DRAM, "Type of memory segment for target \
55-
[DRAM, VRAM]. Note: Storage backends determine remote type automatically.");
46+
DEFINE_string(backend, XFERBENCH_BACKEND_UCX,
47+
"Name of NIXL backend [UCX, UCX_MO, GDS, GDS_MT, POSIX, GPUNETIO, Mooncake, HF3FS, OBJ, GUSLI]"
48+
" (only used with nixl worker)");
49+
DEFINE_string(initiator_seg_type, XFERBENCH_SEG_TYPE_DRAM, "Type of memory segment for initiator"
50+
" [DRAM, VRAM]. Note: Storage backends always use DRAM locally.");
51+
DEFINE_string(target_seg_type, XFERBENCH_SEG_TYPE_DRAM, "Type of memory segment for target"
52+
" [DRAM, VRAM]. Note: Storage backends determine remote type automatically.");
5653
DEFINE_string(scheme, XFERBENCH_SCHEME_PAIRWISE, "Scheme: pairwise, maytoone, onetomany, tp");
5754
DEFINE_string(mode, XFERBENCH_MODE_SG, "MODE: SG (Single GPU per proc), MG (Multi GPU per proc) [default: SG]");
5855
DEFINE_string(op_type, XFERBENCH_OP_WRITE, "Op type: READ, WRITE");
5956
DEFINE_bool(check_consistency, false, "Enable Consistency Check");
60-
DEFINE_uint64(total_buffer_size, 8LL * 1024 * (1 << 20), "Total buffer \
61-
size across device for each process (Default: 80 GiB)");
62-
DEFINE_uint64(start_block_size, 4 * (1 << 10), "Max size of block \
63-
(Default: 4 KiB)");
64-
DEFINE_uint64(max_block_size, 64 * (1 << 20), "Max size of block \
65-
(Default: 64 MiB)");
57+
DEFINE_uint64(total_buffer_size, 8LL * 1024 * (1 << 20), "Total buffer"
58+
" size across device for each process (Default: 80 GiB)");
59+
DEFINE_uint64(start_block_size, 4 * (1 << 10), "Max size of block (Default: 4 KiB)");
60+
DEFINE_uint64(max_block_size, 64 * (1 << 20), "Max size of block (Default: 64 MiB)");
6661
DEFINE_uint64(start_batch_size, 1, "Starting size of batch (Default: 1)");
6762
DEFINE_uint64(max_batch_size, 1, "Max size of batch (starts from 1)");
6863
DEFINE_int32(num_iter, 1000, "Max iterations");
69-
DEFINE_int32(large_blk_iter_ftr,
70-
16,
71-
"factor to reduce test iteration when testing large block size(>1MB)");
64+
DEFINE_int32(large_blk_iter_ftr, 16, "factor to reduce test iteration when testing large block size(>1MB)");
7265
DEFINE_int32(warmup_iter, 100, "Number of warmup iterations before timing");
73-
DEFINE_int32 (
74-
num_threads,
75-
1,
76-
"Number of threads used by benchmark."
77-
" Num_iter must be greater or equal than num_threads and equally divisible by num_threads."
78-
" (Default: 1)");
66+
DEFINE_int32 (num_threads, 1, "Number of threads used by benchmark."
67+
" Num_iter must be greater or equal than num_threads and equally divisible by num_threads."
68+
" (Default: 1)");
7969
DEFINE_int32(num_initiator_dev, 1, "Number of device in initiator process");
8070
DEFINE_int32(num_target_dev, 1, "Number of device in target process");
8171
DEFINE_bool(enable_pt, false, "Enable Progress Thread (only used with nixl worker)");
@@ -95,23 +85,21 @@ DEFINE_int32(gds_mt_num_threads, 1, "Number of threads used by GDS MT plugin (De
9585
// TODO: We should take rank wise device list as input to extend support
9686
// <rank>:<device_list>, ...
9787
// For example- 0:mlx5_0,mlx5_1,mlx5_2,1:mlx5_3,mlx5_4, ...
98-
DEFINE_string(device_list, "all", "Comma-separated device name to use for \
99-
communication (only used with nixl worker)");
100-
DEFINE_string(etcd_endpoints,
101-
"",
88+
DEFINE_string(device_list, "all", "Comma-separated device name to use for"
89+
" communication (only used with nixl worker)");
90+
DEFINE_string(etcd_endpoints, "",
10291
"ETCD server endpoints for communication (optional for storage backends)");
10392

10493
// POSIX options - only used when backend is POSIX
105-
DEFINE_string (posix_api_type,
106-
XFERBENCH_POSIX_API_AIO,
94+
DEFINE_string (posix_api_type, XFERBENCH_POSIX_API_AIO,
10795
"API type for POSIX operations [AIO, URING] (only used with POSIX backend)");
10896

10997
// DOCA GPUNetIO options - only used when backend is DOCA GPUNetIO
110-
DEFINE_string(gpunetio_device_list, "0", "Comma-separated GPU CUDA device id to use for \
111-
communication (only used with nixl worker)");
98+
DEFINE_string(gpunetio_device_list, "0", "Comma-separated GPU CUDA device id to use for"
99+
" communication (only used with nixl worker)");
112100
// DOCA GPUNetIO options - only used when backend is DOCA GPUNetIO
113-
DEFINE_string(gpunetio_oob_list, "", "Comma-separated OOB network interface name \
114-
for control path (only used with nixl worker)");
101+
DEFINE_string(gpunetio_oob_list, "", "Comma-separated OOB network interface name"
102+
" for control path (only used with nixl worker)");
115103

116104
// OBJ options - only used when backend is OBJ
117105
DEFINE_string(obj_access_key, "", "Access key for S3 backend");
@@ -122,8 +110,7 @@ DEFINE_string(obj_scheme, XFERBENCH_OBJ_SCHEME_HTTP, "HTTP scheme for S3 backend
122110
DEFINE_string(obj_region, XFERBENCH_OBJ_REGION_EU_CENTRAL_1, "Region for S3 backend");
123111
DEFINE_bool(obj_use_virtual_addressing, false, "Use virtual addressing for S3 backend");
124112
DEFINE_string(obj_endpoint_override, "", "Endpoint override for S3 backend");
125-
DEFINE_string(obj_req_checksum,
126-
XFERBENCH_OBJ_REQ_CHECKSUM_SUPPORTED,
113+
DEFINE_string(obj_req_checksum, XFERBENCH_OBJ_REQ_CHECKSUM_SUPPORTED,
127114
"Required checksum for S3 backend [supported, required]");
128115
DEFINE_string(obj_ca_bundle, "", "Path to CA bundle for S3 backend");
129116

@@ -132,18 +119,13 @@ DEFINE_int32(hf3fs_iopool_size, 64, "Size of io memory pool");
132119

133120
// GUSLI options - only used when backend is GUSLI
134121
DEFINE_string(gusli_client_name, "NIXLBench", "Client name for GUSLI backend");
135-
DEFINE_int32(gusli_max_simultaneous_requests,
136-
32,
122+
DEFINE_int32(gusli_max_simultaneous_requests, 32,
137123
"Maximum number of simultaneous requests for GUSLI backend");
138-
DEFINE_string(
139-
gusli_config_file,
140-
"",
124+
DEFINE_string(gusli_config_file, "",
141125
"Configuration file content for GUSLI backend (if empty, auto-generated from device_list)");
142-
DEFINE_uint64(gusli_bdev_byte_offset,
143-
1048576,
126+
DEFINE_uint64(gusli_bdev_byte_offset, 1048576,
144127
"Byte offset in block device for GUSLI operations (default: 1MB)");
145-
DEFINE_string(gusli_device_security,
146-
"",
128+
DEFINE_string(gusli_device_security, "",
147129
"Comma-separated list of security flags per device (e.g. 'sec=0x3,sec=0x71'). "
148130
"If empty or fewer than devices, uses 'sec=0x3' as default. "
149131
"For GUSLI backend, use device_list in format 'id:type:path' where type is F (file) "

0 commit comments

Comments
 (0)