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

Append Tensor to FactorSharding struct name. #145

Closed
wants to merge 1 commit into from

Conversation

copybara-service[bot]
Copy link

Append Tensor to FactorSharding struct name.

FactorSharding has isMinorMost field which depends on the tensor, while the other fields, axisRef, overflowAxes, and isClosed can be shared among the tensors.

Hence TensorFactorSharding defines a tensor-depending factor sharding. The target, by a subsequent change, is to get the following structured:

TensorFactorSharding {
FactorSharding factorSharding,
bool isMinorMost
}

FactorSharding {
SmallVector axisRefs,
bool isClosed,
SmallVector overflowAxes
}

One motivation is ShardingProjection::build from common factor shardings, where the isMinorMost needs to be tensor specific and should be determined by the sharding rule, not from the common factor sharding.

FactorSharding has isMinorMost field which depends on the tensor, while the other fields, axisRef, overflowAxes, and isClosed can be shared among the tensors.

Hence TensorFactorSharding defines a tensor-depending factor sharding. The target, by a subsequent change, is to get the following structured:

TensorFactorSharding {
  FactorSharding factorSharding,
  bool isMinorMost
}

FactorSharding {
  SmallVector<AxisRef> axisRefs,
  bool isClosed,
  SmallVector<AxisRef> overflowAxes
}

One motivation is ShardingProjection::build from common factor shardings, where the isMinorMost needs to be tensor specific and should be determined by the sharding rule, not from the common factor sharding.

PiperOrigin-RevId: 688056929
@copybara-service copybara-service bot closed this Oct 27, 2024
@copybara-service copybara-service bot deleted the test_688056929 branch October 27, 2024 18:22
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