Skip to content
Merged
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
6 changes: 5 additions & 1 deletion build_tools/print_driver_gpu_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
but does not fail.
"""

import fcntl
import os
from pathlib import Path
import platform
Expand All @@ -41,6 +40,11 @@


def _get_kfd_version() -> Tuple[int, int]:
# fcntl is a Unix-only stdlib module and is only needed for this Linux
# KFD ioctl query. Import it lazily so the Windows sanity check does not
# crash at import time with ModuleNotFoundError: No module named 'fcntl'.
import fcntl

fd = os.open(_KFD_DEVICE, os.O_RDWR)
try:
buf = bytearray(8)
Expand Down
Loading