Skip to content

Commit 06e3aa3

Browse files
authored
Accept zero BAR size for integrated GPUs in cuFile test (#3169)
1 parent dfad7e3 commit 06e3aa3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎cuda_bindings_13/tests/test_cufile.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,8 +1851,10 @@ def test_get_bar_size_in_kb():
18511851

18521852
# Verify BAR size is a reasonable value
18531853
assert isinstance(bar_size_kb, int), "BAR size should be an integer"
1854-
# Tegra devices may report 0 BAR size, which is acceptable
1855-
min_bar_size = 0 if get_tegra_kind() else 1
1854+
err, integrated = cuda.cuDeviceGetAttribute(cuda.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_INTEGRATED, 0)
1855+
assert err == cuda.CUresult.CUDA_SUCCESS
1856+
# Integrated GPUs (including GB10 and Tegra) need not expose PCIe BAR memory.
1857+
min_bar_size = 0 if integrated else 1
18561858
assert bar_size_kb >= min_bar_size, f"BAR size should be >= {min_bar_size}"
18571859

18581860
logging.info(f"GPU BAR size: {bar_size_kb} KB ({bar_size_kb / 1024 / 1024:.2f} GB)")

0 commit comments

Comments
 (0)