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 implementation for Distribution API #776

Merged
merged 12 commits into from
Aug 23, 2023
Merged

Conversation

qlzh727
Copy link
Member

@qlzh727 qlzh727 commented Aug 23, 2023

  1. Implemented DeviceMesh and TensorLayout
  2. Implemented list_devices.
  3. Add backend functions for list_devices, and conversion functions to jax native Mesh and Sharding.
  4. Update the TensorLayout to also include the DeviceMesh, which is needed when converting the actual backend layout.
  5. Added unit tests.

Note that there is a dummy distribution_lib in the backend/init.py, the unit test will fail for other backends (due to import) if this dummy placeholder is not there.

@qlzh727 qlzh727 requested a review from fchollet August 23, 2023 00:01
Copy link
Member

@fchollet fchollet left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

keras_core/backend/jax/distribution_lib.py Outdated Show resolved Hide resolved
keras_core/backend/jax/distribution_lib.py Outdated Show resolved Hide resolved
keras_core/backend/jax/distribution_lib.py Outdated Show resolved Hide resolved
keras_core/backend/jax/distribution_lib.py Outdated Show resolved Hide resolved
@qlzh727 qlzh727 requested a review from fchollet August 23, 2023 03:31
Copy link
Member

@fchollet fchollet left a comment

Choose a reason for hiding this comment

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

Thanks for the update!

keras_core/backend/jax/distribution_lib.py Show resolved Hide resolved
keras_core/backend/jax/distribution_lib.py Show resolved Hide resolved
keras_core/backend/jax/distribution_lib.py Outdated Show resolved Hide resolved
keras_core/distribution/distribution_lib.py Outdated Show resolved Hide resolved
@qlzh727 qlzh727 requested a review from fchollet August 23, 2023 16:42
Copy link
Member

@fchollet fchollet left a comment

Choose a reason for hiding this comment

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

LGTM

@fchollet fchollet merged commit a7ccc71 into keras-team:main Aug 23, 2023
6 checks passed
@qlzh727 qlzh727 deleted the distribut-1 branch August 23, 2023 21:17
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.

2 participants