-
Notifications
You must be signed in to change notification settings - Fork 217
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
update memory calculator #5244
base: dev
Are you sure you want to change the base?
update memory calculator #5244
Conversation
83ab2f0
to
702b222
Compare
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.
Nice! Looks mostly good to me, though I made some mostly just pedantic comments.
row_division = np.full(global_gpu_extent[dim], int(global_cell_extent[dim] / global_gpu_extent[dim]), dtype=np.int_) | ||
global_domain_division.append(row_division) | ||
|
||
print(f"global domain division: {global_domain_division}") |
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.
For me, it is not clear what domain division is supposed to be. I think you should name it differently.
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.
after an offline discussion I followed Pawel's advice and renamed it to grid_distribution
to match more closely the PIConGPU terminology.
|
||
print(f"global domain division: {global_domain_division}") | ||
|
||
# get cell extent of each GPU, <extent of the gpu domain>[simulation dimension, multi dimensional gpu index] |
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.
Not sure I get this notation
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.
rephrased the comment to make it clearer.
raise ValueError("unsupported precision {precision}") | ||
|
||
@staticmethod | ||
def get_predefined_attribute_dict(simulation_dimension: int, precision: int) -> dict[str, int]: |
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.
Why is it a static method? simulation_dimension
, precision
are also instance attributes. So as long as you put in the class, I would make just use these values.
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.
since these methods might be usable in other contexts I decided to make them independent of the current implementation.
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.
@BrianMarre ok, but in that case I would just take it out of the class :)
ci: no-compile
ci: no-compile
ci: no-compile
702b222
to
8593bdb
Compare
ci: no-compile
8593bdb
to
79ee6ef
Compare
This PR,