Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

What's the expected output from Device.allDevices ? #1089

Closed
@xihui-wu

Description

@xihui-wu

I ran this on colab with CPU, GPT and TPU respectively. Here are their outputs:

CPU:
1 element
▿ 0 : Device(kind: .CPU, ordinal: 0, backend: .XLA)
- kind : TensorFlow.Device.Kind.CPU
- ordinal : 0
- backend : TensorFlow.Device.Backend.XLA

GPU:
1 element
▿ 0 : Device(kind: .GPU, ordinal: 0, backend: .XLA)
- kind : TensorFlow.Device.Kind.GPU
- ordinal : 0
- backend : TensorFlow.Device.Backend.XLA

TPU:
9 elements
▿ 0 : Device(kind: .CPU, ordinal: 0, backend: .XLA)
- kind : TensorFlow.Device.Kind.CPU
- ordinal : 0
- backend : TensorFlow.Device.Backend.XLA
▿ 1 : Device(kind: .TPU, ordinal: 0, backend: .XLA)
- kind : TensorFlow.Device.Kind.TPU
- ordinal : 0
- backend : TensorFlow.Device.Backend.XLA
▿ 2 : Device(kind: .TPU, ordinal: 1, backend: .XLA)
- kind : TensorFlow.Device.Kind.TPU
- ordinal : 1
- backend : TensorFlow.Device.Backend.XLA
...
▿ 8 : Device(kind: .TPU, ordinal: 7, backend: .XLA)
- kind : TensorFlow.Device.Kind.TPU
- ordinal : 7
- backend : TensorFlow.Device.Backend.XLA

My confusion is why GPU output doesn't contain CPU device but that of TPU does ? What are expected ?

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