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

Clean up for JOSS paper #19

Merged
merged 17 commits into from
Jul 8, 2024
Merged

Clean up for JOSS paper #19

merged 17 commits into from
Jul 8, 2024

Conversation

ASKabalan
Copy link
Collaborator

@ASKabalan ASKabalan commented Jun 27, 2024

Major clean-up for JOSS paper

@ASKabalan ASKabalan changed the title U/as kabalan/clean up Clean up for JOSS paper Jun 27, 2024
@ASKabalan ASKabalan force-pushed the u/ASKabalan/clean-up branch 2 times, most recently from 9d50830 to 2bd0b2b Compare June 28, 2024 13:50
@ASKabalan
Copy link
Collaborator Author

@aboucaud @EiffL This is good for review

@ASKabalan ASKabalan force-pushed the u/ASKabalan/clean-up branch from 2bd0b2b to 3b414bb Compare July 4, 2024 18:00
@ASKabalan ASKabalan mentioned this pull request Jul 5, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@EiffL EiffL left a comment

Choose a reason for hiding this comment

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

A couple of comments and a request to remove the reduce option.

CMakeLists.txt Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Can you remove the halo_reduce option?
It is unclear what that option is supposed to be doing. Reading the docstring does not tell me what is supposed to happen, I don't think the users can use safely. And it also is implemented in jax, so they can do their own reduction operation if they want to after the halo exchange.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have actually removed it in another branch.
I implemented it in a much clever way in jaxPM

jaxdecomp/_src/padding.py Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Member

@EiffL EiffL left a comment

Choose a reason for hiding this comment

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

This looks good to go

@EiffL EiffL merged commit d551967 into main Jul 8, 2024
1 check passed
Copy link

@aboucaud aboucaud left a comment

Choose a reason for hiding this comment

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

Sorry for the late review.
Very nice job on the documentation and typing.
IMO the code looks very clean and ready for the JOSS review.

Copy link

Choose a reason for hiding this comment

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

No need to get rid of the template, it can guide a future maintainer in the process.

@@ -1,19 +1,18 @@
# Change log


<!-- Template for documenting changes
## jaxdecomp 0.0.1
Copy link

Choose a reason for hiding this comment

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

Are we really releasing a working code with several new additions as v0.0.1 ?

I would personally prefer something like 0.1.0 and if we are going for https://semver.org/ they would even prefer changing the major version since some of the changes are not backward compatible (to my knowledge).
I know this is a big leap so I would go for 0.1 if you guys agree.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't have enough open source experience to know the implication of a minor vs patch version
But I feel more like this was a minor version rather than a patch
(Then again the major version will always be 0 ..)

Comment on lines +11 to +12
* Added custom partitioning for slice_pad and slice_unpad
* Add example for multi-host FFTs in `examples/jaxdecomp_lpt.py`
Copy link

Choose a reason for hiding this comment

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

Careful with consistency Added or Add but not both.

set(CUDECOMP_CUDA_CC_LIST "70;80" CACHE STRING "List of CUDA compute capabilities to build cuDecomp for.")

# 70: Volta, 80: Ampere, 89: RTX 4060
set(CUDECOMP_CUDA_CC_LIST "70;80;89" CACHE STRING "List of CUDA compute capabilities to build cuDecomp for.")
Copy link

Choose a reason for hiding this comment

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

Should we already prepare for H100 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are right.
I will add 90

Comment on lines +25 to +31
return (double_precision == other.double_precision && halo_extents[0] == other.halo_extents[0] &&
halo_extents[1] == other.halo_extents[1] && halo_extents[2] == other.halo_extents[2] &&
halo_periods[0] == other.halo_periods[0] && halo_periods[1] == other.halo_periods[1] &&
halo_periods[2] == other.halo_periods[2] && axis == other.axis &&
config.gdims[0] == other.config.gdims[0] && config.gdims[1] == other.config.gdims[1] &&
config.gdims[2] == other.config.gdims[2] && config.pdims[0] == other.config.pdims[0] &&
config.pdims[1] == other.config.pdims[1]);
Copy link

Choose a reason for hiding this comment

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

Could you put one test per line for readability ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The formatter does the magic here
Its google I think .. I will look into it

Comment on lines +69 to +71
def abstract(x: Array, fft_type: xla_client.FftType, pdims: Tuple[int, int],
global_shape: Tuple[int, int,
int], adjoint: bool) -> ShapedArray:
Copy link

Choose a reason for hiding this comment

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

Weird formatting

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yapf..
I use pre-commit to format

Comment on lines +96 to +108
match fft_type:
case xla_client.FftType.FFT:
# FFT is X to Y to Z so Z-Pencil is returned
# Except if we are doing a YZ slab in which case we return a Y-Pencil
transpose_shape = (1, 2, 0)
transposed_pdims = pdims
case xla_client.FftType.IFFT:
# IFFT is Z to X to Y so X-Pencil is returned
# In YZ slab case we only need one transposition back to get the X-Pencil
transpose_shape = (2, 0, 1)
transposed_pdims = pdims
case _:
raise TypeError(
Copy link

Choose a reason for hiding this comment

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

Make sure to add Python ≥ 3.10 in the requirements to be allowed to use such pattern.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point

@ASKabalan ASKabalan deleted the u/ASKabalan/clean-up branch October 23, 2024 02:25
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.

3 participants