Skip to content
Open
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
3 changes: 2 additions & 1 deletion .github/workflows/ci-pixi-source-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ jobs:
runs-on: "linux-amd64-gpu-l4-latest-1" # same label scheme as test-wheel-linux.yml
timeout-minutes: 90
container:
options: -u root --security-opt seccomp=unconfined --shm-size 16g
# /run/udev: cuFile 12.x needs the udev database; see test-wheel-linux.yml.
options: -u root --security-opt seccomp=unconfined --shm-size 16g -v /run/udev:/run/udev:ro
image: ubuntu:24.04
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test-wheel-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ jobs:
# Custom-DRIVER rows need --privileged --pid=host so install_gpu_driver.sh
# can nsenter to the host for the install + refresh the toolkit bind mounts
# back inside the container. Stock options for latest/earliest rows.
options: ${{ ((matrix.DRIVER == 'latest' || matrix.DRIVER == 'earliest') && '-u root --security-opt seccomp=unconfined --shm-size 16g') || '-u root --security-opt seccomp=unconfined --shm-size 16g --privileged --pid=host' }}
# /run/udev: cuFile 12.x (libcufile 1.14) looks up the block device behind
# a file in the udev database; without it, cuFileHandleRegister fails with
# CU_FILE_INTERNAL_ERROR on the workspace.
options: ${{ ((matrix.DRIVER == 'latest' || matrix.DRIVER == 'earliest') && '-u root --security-opt seccomp=unconfined --shm-size 16g -v /run/udev:/run/udev:ro') || '-u root --security-opt seccomp=unconfined --shm-size 16g -v /run/udev:/run/udev:ro --privileged --pid=host' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major · Functional Correctness · Heavy lift

important: Add an automatic check that the ten cuFile tests ran on Linux CUDA 12.

The ten isSupportedFilesystem() tests in cuda_bindings_12/tests/test_cufile.py skip on unsupported filesystems. Skipped tests do not fail a pytest run, so the Linux CUDA 12 bindings job can pass with all ten skipped. This PR does not add a check for that case. Linked issue #3592 requires an automatic way to confirm that these tests run in at least one CI configuration.

Add a required check to the Linux CUDA 12 bindings path after run-tests bindings in .github/workflows/test-wheel-linux.yml. The check must fail unless the ten named cuFile tests are reported as passed. Scope it to the CUDA 12 rows so it does not affect other configurations.

image: ubuntu:24.04
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
Expand Down
31 changes: 8 additions & 23 deletions cuda_bindings_12/tests/test_cufile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
import pathlib
import platform
import subprocess
import tempfile
from contextlib import suppress
from functools import cache
Expand Down Expand Up @@ -95,29 +96,13 @@ def cufileVersionLessThan(target):

@cache
def isSupportedFilesystem():
"""Check if the current filesystem is supported (ext4 or xfs)."""
try:
# Try to get filesystem type from /proc/mounts
with open("/proc/mounts") as f:
for line in f:
parts = line.split()
if len(parts) >= 2:
mount_point = parts[1]
fs_type = parts[2]

# Check if current directory is under this mount point
current_dir = os.path.abspath(".")
if current_dir.startswith(mount_point):
fs_type_lower = fs_type.lower()
logging.info(f"Current filesystem type: {fs_type_lower}")
return fs_type_lower in ["ext4", "xfs"]

# If we get here, we couldn't determine the filesystem type
logging.warning("Could not determine filesystem type from /proc/mounts")
return False
except Exception as e:
logging.error(f"Error checking filesystem type: {e}")
return False
"""Check if the current filesystem is supported (ext4 or xfs).

This uses `findmnt` so the kernel's mount table logic owns the decoding of the filesystem type.
"""
fs_type = subprocess.check_output(["findmnt", "-no", "FSTYPE", "-T", os.getcwd()], text=True).strip() # noqa: S603, S607
logging.info(f"Current filesystem type (findmnt): {fs_type}")
return fs_type in ("ext4", "xfs")


# These tests open/close the process-global driver inside their bodies, so
Expand Down
Loading