Skip to content

Refactor xla::ifrt::ArraySpec from a struct to a class - #40239

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

Refactor xla::ifrt::ArraySpec from a struct to a class#40239
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_971355727

Conversation

@copybara-service

Copy link
Copy Markdown

Refactor xla::ifrt::ArraySpec from a struct to a class

  • Make dtype_, shape_, sharding_, and layout_ private members and provide const accessors.
  • Provide a 4-argument constructor ArraySpec(DType dtype, Shape shape, ShardingRef sharding, absl_nullable std::shared_ptr<const xla::PjRtLayout> layout) and remove the default constructor.
  • Update callers to use the new constructor and accessors.

@copybara-service
copybara-service Bot force-pushed the test_971355727 branch 2 times, most recently from fd660a9 to 45ef7c5 Compare August 26, 2026 22:18
- Make `dtype_`, `shape_`, `sharding_`, and `layout_` private members and provide const accessors.
- Provide a 4-argument constructor `ArraySpec(DType dtype, Shape shape, ShardingRef sharding, absl_nullable std::shared_ptr<const xla::PjRtLayout> layout)` and remove the default constructor.
- Update callers to use the new constructor and accessors.

PiperOrigin-RevId: 971355727
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