Skip to content

Use upstream BackendDevice instead of inherit from it #3490

@JackCaoG

Description

@JackCaoG

🚀 Feature

Currently we inherit a Device from torch::lazy::BackendDevice but that should be unneceaary.

struct Device : public torch::lazy::BackendDevice {

We should use BackendDevice directly in PyTorch/XLA.

Motivation

Going forward we will need to use functions like torch::lazy::GetBackendDevice which returns a c10::optional<BackendDevice>

This is also blocking us from using code-gen.

@alanwaketan @wonjoolee95

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions