Skip to content

Commit

Permalink
UTIL: fix pipeline params check for auto (#991)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei-Lebedev authored Jun 27, 2024
1 parent a360c7a commit 36389f4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/utils/ucc_parser.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* See file LICENSE for terms.
*/
Expand Down Expand Up @@ -698,7 +698,15 @@ static ucc_pipeline_params_t ucc_pipeline_params_default = {

int ucc_pipeline_params_is_auto(const ucc_pipeline_params_t *p)
{
return 0 == memcmp(p, &ucc_pipeline_params_auto, sizeof(*p));
if ((p->threshold == ucc_pipeline_params_auto.threshold) &&
(p->n_frags == ucc_pipeline_params_auto.n_frags) &&
(p->frag_size == ucc_pipeline_params_auto.frag_size) &&
(p->pdepth == ucc_pipeline_params_auto.pdepth) &&
(p->order == ucc_pipeline_params_auto.order)) {
return 1;
}

return 0;
}

int ucc_config_sscanf_pipeline_params(const char *buf, void *dest,
Expand Down

0 comments on commit 36389f4

Please sign in to comment.