Skip to content
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

Add a reminder for the illegal memory error #3822

Merged
merged 4 commits into from
May 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions deepmd/utils/batch_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
self.maximum_working_batch_size = initial_batch_size
if self.is_gpu_available():
self.minimal_not_working_batch_size = 2**31
log.info(

Check warning on line 64 in deepmd/utils/batch_size.py

View check run for this annotation

Codecov / codecov/patch

deepmd/utils/batch_size.py#L64

Added line #L64 was not covered by tests
"If you encounter the error 'an illegal memory access was encountered', this may be due to a TensorFlow issue. "
"To avoid this, set the environment variable DP_INFER_BATCH_SIZE to a smaller value than the last adjusted batch size. "
"The environment variable DP_INFER_BATCH_SIZE controls the inference batch size (nframes * natoms). "
)
else:
self.minimal_not_working_batch_size = (
self.maximum_working_batch_size + 1
Expand Down
Loading