Skip to content

Commit 25c604c

Browse files
Fix typo, corrected control flow logic flaw
Verify that `--profile` option results in setting `m_run_once`: ``` (nvbench) opavlyk@ee09c48-lcedt:~/repos/nvbench$ ./build/bin/nvbench.example.cpp20.axes -b simple -d 0 --profile | grep "Pass: Cold" Pass: Cold: 1.006560ms GPU, 1.009277ms CPU, 0.00s total GPU, 0.00s total wall, 1x (nvbench) opavlyk@ee09c48-lcedt:~/repos/nvbench$ ./build/bin/nvbench.example.cpp20.axes -b simple -d 0 | grep "Pass: Cold" Pass: Cold: 1.002844ms GPU, 1.011917ms CPU, 0.50s total GPU, 0.52s total wall, 499x ```
1 parent 5b6c381 commit 25c604c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nvbench/option_parser.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,8 @@ catch (std::exception &e)
751751

752752
void option_parser::enable_profile()
753753
{
754-
// If no active benchmakr, save args as global
754+
// If no active benchmark, save args as global
755+
if (m_benchmarks.empty())
755756
{
756757
m_global_benchmark_args.push_back("--profile");
757758
return;

0 commit comments

Comments
 (0)