Skip to content
Closed
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
2 changes: 1 addition & 1 deletion tpu_info/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ requires = ["hatchling", "hatch-build-scripts", "grpcio-tools~=1.65.5"]
build-backend = "hatchling.build"

[project]
version = "0.1.0"
version = "0.1.1"
name = "tpu-info"
dependencies = [
# `grpcio` should match `grpcio-tools` build dependency
Expand Down
4 changes: 3 additions & 1 deletion tpu_info/tpu_info/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Info(typing.NamedTuple):
V4 = Info("v4", hbm_gib=32, devices_per_chip=1)
V5E = Info("v5e", hbm_gib=16, devices_per_chip=1)
V5P = Info("v5p", hbm_gib=95, devices_per_chip=1)
V6E = Info("v6e", hbm_gib=32, devices_per_chip=1)

@classmethod
def from_pci_device_id(
Expand All @@ -58,6 +59,7 @@ def from_pci_device_id(
"0x005e": cls.V4,
"0x0063": cls.V5E,
"0x0062": cls.V5P,
"0x006f": cls.V6E,
}

return device_id_to_device.get(device_id)
Expand Down Expand Up @@ -91,7 +93,7 @@ def get_local_chips() -> Tuple[Optional[TpuChip], int]:

def chip_path(chip_type: TpuChip, index: int):
"""Returns the expected `/dev` path for a given TPU device type."""
if chip_type in [TpuChip.V5E, TpuChip.V5P]:
if chip_type in [TpuChip.V5E, TpuChip.V5P, TpuChip.V6E]:
return f"/dev/vfio/{index}"
else:
return f"/dev/accel{index}"
Expand Down