-
Notifications
You must be signed in to change notification settings - Fork 484
Added n_workers in generate_data for diffusion_FWI #1229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Greptile OverviewGreptile SummaryThis PR adds a PR Description Notes:
Important Files Changed
Critical Issues Identified:
Recommendation: Before merging, implement proper GPU memory management (e.g., memory limits per worker, GPU locks, or torch multiprocessing) and address the formatting issues. Consider adding validation to ensure Confidence Score: 2/5 - While the performance optimization intent is valid, the implementation has significant resource management risks that could cause runtime failures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 2 comments
| args: list[tuple[str, str, int, int]] = [ | ||
| (filepath, output_path, i % num_gpus, user_source_frequency) | ||
| for i, filepath in enumerate(file_list) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Multiple workers will be assigned to the same GPU (via modulo), but each worker loads models/data onto the same GPU device without coordination. This could cause CUDA out-of-memory errors. Have you tested this with multiple workers per GPU to ensure GPU memory usage doesn't exceed available VRAM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been tested. Default n_wrokers are set according to that.
String formatting in logging Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
PhysicsNeMo Pull Request
Description
Added option to multiple workers per GPU in
generate_data.pyfor diffusion_FWI. Now it can use multiple workers (default 8) for each GPU for faster generation.Checklist
Dependencies
Review Process
All PRs are reviewed by the PhysicsNeMo team before merging.
Depending on which files are changed, GitHub may automatically assign a maintainer for review.
We are also testing AI-based code review tools (e.g., Greptile), which may add automated comments with a confidence score.
This score reflects the AI’s assessment of merge readiness and is not a qualitative judgment of your work, nor is
it an indication that the PR will be accepted / rejected.
AI-generated feedback should be reviewed critically for usefulness.
You are not required to respond to every AI comment, but they are intended to help both authors and reviewers.
Please react to Greptile comments with 👍 or 👎 to provide feedback on their accuracy.