What's the expected output from Device.allDevices ? #1089
Description
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 ?