Skip to content

Fix: unify --rounds flag and disable profiling when rounds > 1#574

Merged
ChaoWao merged 1 commit intohw-native-sys:mainfrom
ChaoWao:fix/unify-rounds-disable-profiling
Apr 16, 2026
Merged

Fix: unify --rounds flag and disable profiling when rounds > 1#574
ChaoWao merged 1 commit intohw-native-sys:mainfrom
ChaoWao:fix/unify-rounds-disable-profiling

Conversation

@ChaoWao
Copy link
Copy Markdown
Collaborator

@ChaoWao ChaoWao commented Apr 16, 2026

Summary

  • Remove -n short form for --rounds in run_example.py and scene_test.py standalone entry to match pytest's conftest.py (which only defines --rounds)
  • Automatically disable --enable-profiling when --rounds > 1 with a warning, since profiling only captures the first round and multi-round mode is for benchmarking

Testing

  • Simulation tests pass
  • --rounds 3 --enable-profiling prints warning and disables profiling
  • --rounds 1 --enable-profiling still works normally

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the -n short flag for the --rounds argument and implements logic to disable profiling when multiple rounds are executed, accompanied by a warning. Feedback suggests that the check in run_example.py should also account for rounds defined in configuration files rather than just command-line arguments. Additionally, it is recommended to initialize logging before issuing the profiling warning in scene_test.py to ensure the warning is captured correctly by the logging system.

Comment thread examples/scripts/run_example.py
Comment thread simpler_setup/scene_test.py Outdated
@ChaoWao ChaoWao force-pushed the fix/unify-rounds-disable-profiling branch from 6bfc83e to e9d4a97 Compare April 16, 2026 01:42
Remove -n short form for --rounds in run_example.py and scene_test.py
standalone entry to match pytest's conftest.py (which only defines --rounds).
Automatically disable --enable-profiling when --rounds > 1 with a
logger.warning, since profiling only captures the first round and
multi-round mode is for benchmarking.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ChaoWao ChaoWao force-pushed the fix/unify-rounds-disable-profiling branch from e9d4a97 to fa5393e Compare April 16, 2026 01:49
@ChaoWao ChaoWao merged commit 83d2041 into hw-native-sys:main Apr 16, 2026
15 checks passed
@ChaoWao ChaoWao deleted the fix/unify-rounds-disable-profiling branch April 16, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant