Skip to content

Fix Gather/Scatter sharding rule for dimensions not in start_index_map.#1085

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_889374677
Open

Fix Gather/Scatter sharding rule for dimensions not in start_index_map.#1085
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_889374677

Conversation

@copybara-service
Copy link
Copy Markdown

Fix Gather/Scatter sharding rule for dimensions not in start_index_map.

For the gather operand, its dimension can be

  1. batching dimension
  2. pointed out by the start_index_map. It can be a
    2.1 pass-through dimension (dimension size is the same as slice size)
    2.2 reduction dimension (dimension size and slice size are different and slice size is 1)
    2.3 need-replication dimension (dimension size and slice size are different and slice size is not 1)
  3. other dimensions. The factor type is
    3.1 pass-through dimension (dimension size is the same as slice size)
    3.2 need-replication dimension (dimension size and slice size are different)

We may want to update 3.2 as reduction dimension in the future.

For the gather operand, its dimension can be
1. batching dimension
2. pointed out by the `start_index_map`. It can be a
   2.1 pass-through dimension (dimension size is the same as slice size)
   2.2 reduction dimension (dimension size and slice size are different and slice size is 1)
   2.3 need-replication dimension (dimension size and slice size are different and slice size is not 1)
3. other dimensions. The factor type is
   3.1 pass-through dimension (dimension size is the same as slice size)
   3.2 need-replication dimension (dimension size and slice size are different)

We may want to update 3.2 as reduction dimension in the future.

PiperOrigin-RevId: 889374677
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.

1 participant