Skip to content

Commit e4292e6

Browse files
[Pallas/TPU] Add supports_sparse_core property to TpuInfo.
PiperOrigin-RevId: 823586333
1 parent 9366503 commit e4292e6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

jax/_src/pallas/mosaic/tpu_info.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ def is_split_chip(self) -> bool:
7878
# Is this a multi-core chip being used in single-core mode?
7979
return self.num_cores == 1 and not self.is_lite
8080

81+
@property
82+
def supports_sparse_core(self) -> bool:
83+
return (
84+
self.chip_version == ChipVersion.TPU_V5P and not self.is_split_chip
85+
) or self.chip_version in {ChipVersion.TPU_7X, ChipVersion.TPU_V6E}
86+
8187
def is_matmul_supported(
8288
self,
8389
lhs_dtype: jnp.dtype | str,

0 commit comments

Comments
 (0)