Repository navigation
[Core][TPU] Verify VFIO groups are backed by Google TPU PCI devices - #65105
Conversation
There was a problem hiding this comment.
Code Review
This pull request improves TPU detection by verifying that VFIO groups are backed by actual Google TPU PCI devices (vendor ID 0x1ae0), preventing non-TPU devices like NVIDIA BlueField-3 from being misidentified. The feedback suggests catching a broader OSError instead of only FileNotFoundError when listing /dev/vfio to avoid potential startup crashes in environments with restricted permissions.
7a128f4 to
26f0a62
Compare
Signed-off-by: iaalm <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: iaalm <[email protected]>
26f0a62 to
d608390
Compare
|
@ryanaoleary can you take a look please? |
|
Tested this PR to ensure it does not break TPU resource accounting and legacy behavior. I ran some tests on v6e and tpu7x TPUs, the latter of which exposes two vfio devices per chip. on v6e: on tpu7x (Ironwood):: in Ray, since KubeRay automatically passes the value of |
|
Some comments, mostly nits, but overall the change LGTM and I will approve after the remaining comments are resolved |
Signed-off-by: iaalm <[email protected]>
Signed-off-by: iaalm <[email protected]>
f772735 to
889dc62
Compare
|
This change maintains the existing user-facing behavior of TPU resource accounting, which is:
|
…ay-project#65105) ## Description Counting every numeric /dev/vfio/<group> entry as a TPU produced a false positive with BlueField-3. Confirm vendor ID with /sys/kernel/iommu_groups/<group>/devices/*/vendor. ## Related issues Close ray-project#65034 --------- Signed-off-by: iaalm <[email protected]> Co-authored-by: Ryan O'Leary <[email protected]>
…ay-project#65105) ## Description Counting every numeric /dev/vfio/<group> entry as a TPU produced a false positive with BlueField-3. Confirm vendor ID with /sys/kernel/iommu_groups/<group>/devices/*/vendor. ## Related issues Close ray-project#65034 --------- Signed-off-by: iaalm <[email protected]> Co-authored-by: Ryan O'Leary <[email protected]>
…ay-project#65105) ## Description Counting every numeric /dev/vfio/<group> entry as a TPU produced a false positive with BlueField-3. Confirm vendor ID with /sys/kernel/iommu_groups/<group>/devices/*/vendor. ## Related issues Close ray-project#65034 --------- Signed-off-by: iaalm <[email protected]> Co-authored-by: Ryan O'Leary <[email protected]> Signed-off-by: 400Ping <[email protected]>
…ay-project#65105) ## Description Counting every numeric /dev/vfio/<group> entry as a TPU produced a false positive with BlueField-3. Confirm vendor ID with /sys/kernel/iommu_groups/<group>/devices/*/vendor. ## Related issues Close ray-project#65034 --------- Signed-off-by: iaalm <[email protected]> Co-authored-by: Ryan O'Leary <[email protected]>
Description
Counting every numeric /dev/vfio/ entry as a TPU produced a false positive with BlueField-3. Confirm vendor ID with /sys/kernel/iommu_groups//devices/*/vendor.
Related issues
Close #65034