Skip to content

Commit

Permalink
Added extra command line option to turn off rccl for causal tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pranswarup committed Jan 10, 2025
1 parent 93b2749 commit d60a1fb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion source/bin/omnitrace-causal/impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,11 @@ parse_args(int argc, char** argv, std::vector<char*>& _env,
.action([&](parser_t& p) {
update_env(_env, "OMNITRACE_CAUSAL_DURATION", p.get<double>("duration"));
});

parser
.add_argument({ "--nrccl" },
"Don't set Use_RCCLP environment variable to true.")
.max_count(1);

int64_t _niterations = 1;
auto _virtual_speedups = std::vector<std::string>{};
Expand Down Expand Up @@ -828,7 +833,17 @@ parse_args(int argc, char** argv, std::vector<char*>& _env,
#endif

#if defined(OMNITRACE_USE_RCCL) && OMNITRACE_USE_RCCL > 0
add_default_env(_env, "OMNITRACE_USE_RCCLP", true);
bool add_to_env = true;
for(int i = 0; i < argc; ++i)
{
if(std::string_view{ argv[i] } == "--nrccl")
{
add_to_env = false;
}
}
if (add_to_env){
add_default_env(_env, "OMNITRACE_USE_RCCLP", true);
}
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion tests/omnitrace-testing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ function(OMNITRACE_ADD_CAUSAL_TEST)

if(TARGET ${TEST_TARGET})
set(COMMAND_PREFIX $<TARGET_FILE:omnitrace-causal> --reset -m ${TEST_CAUSAL_MODE}
${TEST_CAUSAL_ARGS} --)
${TEST_CAUSAL_ARGS} --nrccl --)

if(NOT TEST_SKIP_BASELINE)
add_test(
Expand Down

0 comments on commit d60a1fb

Please sign in to comment.