Skip to content

Commit e23a2f1

Browse files
committed
update
1 parent 5263095 commit e23a2f1

File tree

4 files changed

+35
-24
lines changed

4 files changed

+35
-24
lines changed

loadgen/mlperf.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ retinanet.Server.target_latency = 100
7777
bert.Server.target_latency = 130
7878
dlrm.Server.target_latency = 60
7979
dlrm-v2.Server.target_latency = 60
80+
dlrm-v3.Server.target_latency = 80
8081
rnnt.Server.target_latency = 1000
8182
gptj.Server.target_latency = 20000
8283
stable-diffusion-xl.Server.target_latency = 20000

recommendation/dlrm_v3/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Set `run.compute_eval` will run the accuracy test and dump prediction outputs in
8282
```
8383
python accuracy.py --path path/to/mlperf_log_accuracy.json
8484
```
85-
We use normalized entropy (NE), accuracy, and AUC as the metrics to evaluate the model quality. The accuracy for the reference implementation evaluated on 34,996 requests across 10 inference timestamps are listed below:
85+
We use normalized entropy (NE), accuracy, and AUC as the metrics to evaluate the model quality. For accepted submissions, all three metrics (NE, Accuracy, AUC) must be within 99% of the reference implementation values. The accuracy for the reference implementation evaluated on 34,996 requests across 10 inference timestamps are listed below:
8686
```
8787
NE: 86.687%
8888
Accuracy: 69.651%

recommendation/dlrm_v3/main.py

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -75,49 +75,49 @@ def get_args(): # pyre-ignore [3]
7575
"""
7676
parser = argparse.ArgumentParser()
7777
parser.add_argument(
78-
"--dataset", default="sampled-streaming-100b", choices=SUPPORTED_DATASETS, help="name of the dataset"
78+
"--dataset", type=str, default="sampled-streaming-100b", choices=SUPPORTED_DATASETS, help="name of the dataset"
7979
)
8080
parser.add_argument(
81-
"--model-path", default="", help="path to the model checkpoint. Example: /home/username/data/dlrmv3_trained_checkpoint/"
81+
"--model-path", type=str, default="", help="path to the model checkpoint. Example: /home/username/data/dlrmv3_trained_checkpoint/"
8282
)
8383
parser.add_argument(
84-
"--scenario-name", default="Server", choices={"Server", "Offline"}, help="inference benchmark scenario"
84+
"--scenario-name", type=str, default="Server", choices={"Server", "Offline"}, help="inference benchmark scenario"
8585
)
8686
parser.add_argument(
87-
"--batchsize", default=10, help="batch size used in the benchmark"
87+
"--batchsize", type=int, default=10, help="batch size used in the benchmark"
8888
)
8989
parser.add_argument(
90-
"--output-trace", default=False, help="Whether to output trace"
90+
"--output-trace", type=bool, default=False, help="Whether to output trace"
9191
)
9292
parser.add_argument(
93-
"--data-producer-threads", default=8, help="Number of threads used in data producer"
93+
"--data-producer-threads", type=int, default=8, help="Number of threads used in data producer"
9494
)
9595
parser.add_argument(
96-
"--compute-eval", default=False, help="If true, will run AccuracyOnly mode and outputs both predictions and labels for accuracy calcuations"
96+
"--compute-eval", type=bool, default=False, help="If true, will run AccuracyOnly mode and outputs both predictions and labels for accuracy calcuations"
9797
)
9898
parser.add_argument(
99-
"--find-peak-performance", default=False, help="Whether to find peak performance in the benchmark"
99+
"--find-peak-performance", type=bool, default=False, help="Whether to find peak performance in the benchmark"
100100
)
101101
parser.add_argument(
102-
"--dataset-path-prefix", default=f"/home/{os.getlogin()}/dlrmv3_dataset/", help="Prefix to the dataset path. Example: /home/username/"
102+
"--dataset-path-prefix", type=str, default=f"/home/{os.getlogin()}/dlrmv3_dataset/", help="Prefix to the dataset path. Example: /home/username/"
103103
)
104104
parser.add_argument(
105-
"--warmup-ratio", default=0.1, help="The ratio of the dataset used to warmup SUT"
105+
"--warmup-ratio", type=float, default=0.1, help="The ratio of the dataset used to warmup SUT"
106106
)
107107
parser.add_argument(
108-
"--num-queries", default=None, help="Number of queries to run in the benchmark"
108+
"--num-queries", type=int, default=None, help="Number of queries to run in the benchmark"
109109
)
110110
parser.add_argument(
111-
"--target-qps", default=1000, help="Benchmark target QPS. Needs to be tuned for different implementations to balance latency and throughput"
111+
"--target-qps", type=int, default=1000, help="Benchmark target QPS. Needs to be tuned for different implementations to balance latency and throughput"
112112
)
113113
parser.add_argument(
114-
"--numpy-rand-seed", default=123, help="Numpy random seed"
114+
"--numpy-rand-seed", type=int, default=123, help="Numpy random seed"
115115
)
116116
parser.add_argument(
117-
"--sparse-quant", default=False, help="Whether to quantize sparse arch"
117+
"--sparse-quant", type=bool, default=False, help="Whether to quantize sparse arch"
118118
)
119119
parser.add_argument(
120-
"--dataset-percentage", default=0.001, help="Percentage of the dataset to run in the benchmark"
120+
"--dataset-percentage", type=float, default=0.0001, help="Percentage of the dataset to run in the benchmark"
121121
)
122122
args, unknown_args = parser.parse_known_args()
123123
logger.warning(f"unknown_args: {unknown_args}")
@@ -338,16 +338,24 @@ def add_results(
338338
result_batches: List of batch sizes processed.
339339
"""
340340
percentiles: list[float] = [50.0, 80.0, 90.0, 95.0, 99.0, 99.9]
341+
buckets_dict: Dict[str, List[float]] = {}
342+
buckets_str_dict: Dict[str, str] = {}
341343
total_timing: list[float] = [result["total"] for result in result_timing]
342-
buckets = np.percentile(total_timing, percentiles).tolist()
343-
buckets_str: str = ",".join(
344-
["{}:{:.4f}".format(p, b) for p, b in zip(percentiles, buckets)]
345-
)
344+
for key in ["total", "prediction", "queue", "batching", "sparse", "dense"]:
345+
timing: list[float] = [result[key] for result in result_timing]
346+
buckets: List[float] = np.percentile(timing, percentiles).tolist()
347+
buckets_str: str = ",".join(
348+
["| {}:{:.4f}| ".format(p, b) for p, b in zip(percentiles, buckets)]
349+
)
350+
buckets_dict[key] = buckets
351+
buckets_str_dict[key] = buckets_str
346352
total_batches = sum(result_batches)
347353

348354
final_results["good"] = len(total_timing)
349355
final_results["avg_time"] = np.mean(total_timing)
350-
final_results["percentiles"] = {str(k): v for k, v in zip(percentiles, buckets)}
356+
final_results["percentiles"] = {
357+
str(k): v for k, v in zip(percentiles, buckets_dict["total"])
358+
}
351359
final_results["qps"] = total_batches / final_results["took"]
352360
final_results["count"] = total_batches
353361

@@ -361,9 +369,11 @@ def add_results(
361369
final_results["avg_time"],
362370
final_results["took"],
363371
len(result_timing),
364-
buckets_str,
372+
buckets_str_dict["total"],
365373
)
366374
)
375+
for key in ["prediction", "queue", "batching", "sparse", "dense"]:
376+
logger.warning(f"{key}: {buckets_str_dict[key]}")
367377

368378

369379
def get_num_queries(

recommendation/dlrm_v3/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def get_dataset(name: str, new_path_prefix: str = ""):
390390
DLRMv3SyntheticStreamingDataset,
391391
{
392392
"ratings_file_prefix": os.path.join(
393-
new_path_prefix, "data/streaming-100b/"
393+
new_path_prefix, ""
394394
),
395395
"train_ts": 90,
396396
"total_ts": 100,
@@ -405,7 +405,7 @@ def get_dataset(name: str, new_path_prefix: str = ""):
405405
DLRMv3SyntheticStreamingDataset,
406406
{
407407
"ratings_file_prefix": os.path.join(
408-
new_path_prefix, "data/streaming-100b/sampled_data/"
408+
new_path_prefix, "sampled_data/"
409409
),
410410
"train_ts": 90,
411411
"total_ts": 100,

0 commit comments

Comments
 (0)