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

[pjrt] Added a PjRtMemorySpace* overload for CreateUninitializedBuffer #21890

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion xla/pjrt/pjrt_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -641,9 +641,17 @@ class PjRtClient {
}

// Creates a buffer on the device without initializing or copying any data.
ABSL_DEPRECATED("Use CreateUninitializedBuffer(Shape, PjRtMemorySpace*)")
virtual absl::StatusOr<std::unique_ptr<PjRtBuffer>> CreateUninitializedBuffer(
const Shape& shape, PjRtDevice* device) {
return Unimplemented("CreateUnitializedBuffer is not supported.");
return Unimplemented("CreateUninitializedBuffer is not supported.");
}

// Creates a buffer in the given memory space without initializing or copying
// any data.
virtual absl::StatusOr<std::unique_ptr<PjRtBuffer>> CreateUninitializedBuffer(
const Shape& shape, PjRtMemorySpace* memory_space) {
return Unimplemented("CreateUninitializedBuffer is not supported.");
}

// Creates buffer in the given memory space that carries an error future
Expand Down
1 change: 1 addition & 0 deletions xla/pjrt/pjrt_stream_executor_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ class PjRtStreamExecutorClient : public PjRtClient {
// initialized the data.
absl::StatusOr<std::unique_ptr<PjRtBuffer>> CreateUninitializedBuffer(
const Shape& shape, PjRtDevice* device) override;
using PjRtClient::CreateUninitializedBuffer;
absl::StatusOr<std::unique_ptr<PjRtBuffer>> CreateUninitializedBuffer(
const Shape& shape, PjRtDevice* device,
std::shared_ptr<BufferSequencingEvent> definition_event);
Expand Down
Loading