Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
a4db20b
add ltoir test support
abhilash1910 Nov 5, 2025
fb6cfb3
add options for multi-modules
abhilash1910 Nov 25, 2025
7aaed4e
add tests
abhilash1910 Nov 25, 2025
64c7f7d
add bitcode test
abhilash1910 Nov 25, 2025
42ba301
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Nov 25, 2025
7ca6899
fix format
abhilash1910 Nov 25, 2025
0674ea1
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Nov 25, 2025
03b1224
refresh
abhilash1910 Nov 26, 2025
033f11c
apply bitcode file from cupy_test helpers
abhilash1910 Dec 1, 2025
6e411ee
use 2 tuples
abhilash1910 Dec 1, 2025
b4c21db
Merge branch 'main' into nvvm_enhance
abhilash1910 Dec 2, 2025
aeb26aa
refresh
abhilash1910 Dec 3, 2025
b3d6d96
format
abhilash1910 Dec 3, 2025
edd6401
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Dec 3, 2025
d53e00b
Merge branch 'main' into nvvm_enhance
abhilash1910 Dec 7, 2025
8dbbafe
fix from upstream
abhilash1910 Dec 15, 2025
0174bb8
Merge branch 'main' into nvvm_enhance
abhilash1910 Dec 16, 2025
b78f0c3
refresh from upstream
abhilash1910 Dec 17, 2025
99a5593
fix tests
abhilash1910 Dec 17, 2025
783f6e5
take path_finder from PR 447
abhilash1910 Dec 17, 2025
5dbfb2d
add builder files
abhilash1910 Dec 17, 2025
0a9eea9
use python lists/tuples
abhilash1910 Dec 17, 2025
79138c0
libdevice integration
abhilash1910 Dec 18, 2025
25d336c
refresh
abhilash1910 Dec 19, 2025
32c1913
refresh
abhilash1910 Dec 19, 2025
01f03e5
refresh
abhilash1910 Dec 19, 2025
9a5d5fe
use cuda_pathfinder module for libdevice
abhilash1910 Dec 19, 2025
07c6199
rebase
abhilash1910 Feb 5, 2026
e1b19cc
rebase
abhilash1910 Feb 5, 2026
f89aac8
Merge branch 'main' into nvvm_enhance
abhilash1910 Feb 5, 2026
0ad13ae
Merge branch 'main' into nvvm_enhance
abhilash1910 Feb 10, 2026
dcdd100
tests
brandon-b-miller Feb 6, 2026
aca2e36
Address reviews
brandon-b-miller Feb 11, 2026
af6e70a
put libdevice stuff under _static_libs
brandon-b-miller Feb 11, 2026
b1d423f
refresh reviews
abhilash1910 Feb 11, 2026
4cedbb7
change program to cython per PR 1565
abhilash1910 Feb 11, 2026
d9aed9b
Merge branch 'main' into nvvm_enhance
abhilash1910 Feb 11, 2026
ca32d2b
fix import
abhilash1910 Feb 11, 2026
fac1907
fix tests
abhilash1910 Feb 12, 2026
4a01e06
fix ruff check
abhilash1910 Feb 12, 2026
2d5252f
ruff fix find_libdevice
abhilash1910 Feb 12, 2026
2976c24
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Feb 12, 2026
61c1e00
add spdx and copyright
abhilash1910 Feb 12, 2026
c6bea0c
rm redundant include and fix test
abhilash1910 Feb 12, 2026
b7866cf
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Feb 12, 2026
4283230
refresh tests
abhilash1910 Feb 12, 2026
78f4328
add correct libdevice for CTK> 13
abhilash1910 Feb 12, 2026
ddf4839
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Feb 12, 2026
cd3644e
revamp design of pathfinder as LocatedHeaderDir
abhilash1910 Feb 13, 2026
68b33a2
refresh
abhilash1910 Feb 13, 2026
631a113
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Feb 13, 2026
7a02aee
fix mypy errirs
abhilash1910 Feb 13, 2026
b8f2eb0
fix base var declaration
abhilash1910 Feb 13, 2026
434b3c9
format changes
abhilash1910 Feb 13, 2026
9f0a319
format changes
abhilash1910 Feb 13, 2026
f499487
rename to bitcodelib
abhilash1910 Feb 16, 2026
5ee41fe
refresh
abhilash1910 Feb 16, 2026
606652d
refresh
abhilash1910 Feb 16, 2026
88d5278
revert
abhilash1910 Feb 16, 2026
4cd7755
refresh test_nvvm to use cupy test helpers
abhilash1910 Feb 16, 2026
c562d28
refresh test_nvvm
abhilash1910 Feb 16, 2026
150fd26
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Feb 16, 2026
afe17b2
refresh with actual test
abhilash1910 Feb 16, 2026
0f1c393
rm try_common_paths
abhilash1910 Feb 16, 2026
9e7e75c
refresh 1
abhilash1910 Feb 16, 2026
56dc23f
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Feb 16, 2026
a19e9ee
refresh
abhilash1910 Feb 16, 2026
2748ce0
refresh
abhilash1910 Feb 16, 2026
8f44791
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Feb 16, 2026
6b1fc9f
refresh
abhilash1910 Feb 16, 2026
404963b
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Feb 16, 2026
dfe930e
Merge branch 'main' into abhilash1910→nvvm_enhance
rwgk Feb 17, 2026
bc27ed6
refresh pathfinder test after rebae
abhilash1910 Feb 17, 2026
9a7c5dc
Merge branch 'main' into abhilash1910→nvvm_enhance
rwgk Feb 17, 2026
82c65a1
Uniform handling of cuda_python_test_helpers dependency in cuda_bindi…
rwgk Feb 17, 2026
9bc68bb
pre-commit cleanup
rwgk Feb 17, 2026
38e87d2
Prefer installed cuda-python-test-helpers in test bootstrap.
rwgk Feb 17, 2026
4c2dc46
Remove cuda_core Pixi PYTHONPATH override for test helpers.
rwgk Feb 17, 2026
c93251a
Remove helper package install from coverage workflow.
rwgk Feb 17, 2026
57eb0b0
Use per-module pytest plugin registration for NVVM helper fixtures.
rwgk Feb 17, 2026
1357d34
Merge branch 'main' into abhilash1910→nvvm_enhance
rwgk Feb 17, 2026
c8484ee
Merge branch 'main' into abhilash1910→nvvm_enhance
rwgk Feb 17, 2026
f0eb1a7
Remove "Renamed" comments
rwgk Feb 17, 2026
7c6e2c9
Make bitcode locate/find consistently raise not-found errors.
rwgk Feb 17, 2026
b77f91b
Refocus bitcode-lib tests on real coverage and narrow mocks.
rwgk Feb 17, 2026
b250395
Merge branch 'main' into abhilash1910→nvvm_enhance
rwgk Feb 17, 2026
e98f32c
Undo accidental change in cuda_pathfinder/tests/test_find_nvidia_bina…
rwgk Feb 17, 2026
296aaf2
Use direct platform_aware.IS_WINDOWS import (rather than the detour t…
rwgk Feb 17, 2026
037b26a
Add found_via metadata for bitcode library discovery.
rwgk Feb 18, 2026
3f73de4
Export SUPPORTED_BITCODE_LIBS in cuda.pathfinder public API.
rwgk Feb 18, 2026
f7b9c4f
Merge branch 'main' into abhilash1910→nvvm_enhance
rwgk Feb 18, 2026
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
4 changes: 0 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@ jobs:
run: |
.venv/bin/pip install -v ./cuda_pathfinder

- name: Build cuda-python-test-helpers
run: |
.venv/bin/pip install -v ./cuda_python_test_helpers

- name: Build cuda-bindings
run: |
cd cuda_bindings
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-wheel-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ jobs:
env:
CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS: see_what_works
CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS: see_what_works
CUDA_PATHFINDER_TEST_FIND_NVIDIA_BITCODE_LIB_STRICTNESS: see_what_works
run: run-tests pathfinder

- name: Run cuda.bindings tests
Expand Down Expand Up @@ -296,4 +297,5 @@ jobs:
env:
CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS: all_must_work
CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS: all_must_work
CUDA_PATHFINDER_TEST_FIND_NVIDIA_BITCODE_LIB_STRICTNESS: all_must_work
run: run-tests pathfinder
2 changes: 2 additions & 0 deletions .github/workflows/test-wheel-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ jobs:
env:
CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS: see_what_works
CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS: see_what_works
CUDA_PATHFINDER_TEST_FIND_NVIDIA_BITCODE_LIB_STRICTNESS: see_what_works
shell: bash --noprofile --norc -xeuo pipefail {0}
run: run-tests pathfinder

Expand Down Expand Up @@ -273,5 +274,6 @@ jobs:
env:
CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS: all_must_work
CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS: all_must_work
CUDA_PATHFINDER_TEST_FIND_NVIDIA_BITCODE_LIB_STRICTNESS: all_must_work
shell: bash --noprofile --norc -xeuo pipefail {0}
run: run-tests pathfinder
5 changes: 3 additions & 2 deletions ci/tools/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ popd
if [[ "${test_module}" == "pathfinder" ]]; then
pushd ./cuda_pathfinder
echo "Running pathfinder tests with " \
"LD:${CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS} " \
"FH:${CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS}"
"LD:${CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS} " \
"FH:${CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS} " \
"BC:${CUDA_PATHFINDER_TEST_FIND_NVIDIA_BITCODE_LIB_STRICTNESS}"
pytest -ra -s -v --durations=0 tests/ |& tee /tmp/pathfinder_test_log.txt
# Report the number of "INFO test_" lines (including zero)
# to support quick validations based on GHA log archives.
Expand Down
19 changes: 19 additions & 0 deletions cuda_bindings/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE

import pathlib
import sys
from importlib.metadata import PackageNotFoundError, distribution

import cuda.bindings.driver as cuda
import pytest

# Import shared test helpers for tests across subprojects.
# PLEASE KEEP IN SYNC with copies in other conftest.py in this repo.
_test_helpers_root = pathlib.Path(__file__).resolve().parents[2] / "cuda_python_test_helpers"
try:
distribution("cuda-python-test-helpers")
except PackageNotFoundError as exc:
if not _test_helpers_root.is_dir():
raise RuntimeError(
f"cuda-python-test-helpers not installed; expected checkout path {_test_helpers_root}"
) from exc

test_helpers_root = str(_test_helpers_root)
if test_helpers_root not in sys.path:
sys.path.insert(0, test_helpers_root)


@pytest.fixture(scope="module")
def cuda_driver():
Expand Down
138 changes: 4 additions & 134 deletions cuda_bindings/tests/test_nvvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,143 +2,13 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE

import binascii
import re
from contextlib import contextmanager

import pytest
from cuda.bindings import nvvm

MINIMAL_NVVMIR_TXT_TEMPLATE = b"""\
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-i128:128:128-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64"

target triple = "nvptx64-nvidia-cuda"

define void @kernel() {
entry:
ret void
}

!nvvm.annotations = !{!0}
!0 = !{void ()* @kernel, !"kernel", i32 1}

!nvvmir.version = !{!1}
!1 = !{i32 %d, i32 0, i32 %d, i32 0}
""" # noqa: E501

MINIMAL_NVVMIR_BITCODE_STATIC = {
(1, 3): # (major, debug_major)
"4243c0de3514000005000000620c30244a59be669dfbb4bf0b51804c01000000210c00007f010000"
"0b02210002000000160000000781239141c80449061032399201840c250508191e048b62800c4502"
"42920b42641032143808184b0a3232884870c421234412878c1041920264c808b1142043468820c9"
"01323284182a282a90317cb05c9120c3c8000000892000000b0000003222c80820624600212b2498"
"0c212524980c19270c85a4906032645c20246382a01801300128030173046000132677b00778a007"
"7cb0033a680377b0877420877408873618877a208770d8e012e5d006f0a0077640077a600774a007"
"7640076d900e71a00778a00778d006e980077a80077a80076d900e7160077a100776a0077160076d"
"900e7320077a300772a0077320076d900e7640077a600774a0077640076d900e71200778a0077120"
"0778a00771200778d006e6300772a0077320077a300772d006e6600774a0077640077a600774d006"
"f6100776a0077160077a100776d006f6300772a0077320077a300772d006f6600774a0077640077a"
"600774d006f610077280077a10077280077a10077280076de00e7160077a300772a0077640071a21"
"4c0e11de9c2e4fbbcfbe211560040000000000000000000000000620b141a0e86000004016080000"
"06000000321e980c19114c908c092647c6044362098c009401000000b1180000ac0000003308801c"
"c4e11c6614013d88433884c38c4280077978077398710ce6000fed100ef4800e330c421ec2c11dce"
"a11c6630053d88433884831bcc033dc8433d8c033dcc788c7470077b08077948877070077a700376"
"788770208719cc110eec900ee1300f6e300fe3f00ef0500e3310c41dde211cd8211dc2611e663089"
"3bbc833bd04339b4033cbc833c84033bccf0147660077b6807376887726807378087709087706007"
"76280776f8057678877780875f08877118877298877998812ceef00eeee00ef5c00eec300362c8a1"
"1ce4a11ccca11ce4a11cdc611cca211cc4811dca6106d6904339c84339984339c84339b8c3389443"
"3888033b94c32fbc833cfc823bd4033bb0c30cc7698770588772708374680778608774188774a087"
"19ce530fee000ff2500ee4900ee3400fe1200eec500e3320281ddcc11ec2411ed2211cdc811edce0"
"1ce4e11dea011e66185138b0433a9c833bcc50247660077b68073760877778077898514cf4900ff0"
"500e331e6a1eca611ce8211ddec11d7e011ee4a11ccc211df0610654858338ccc33bb0433dd04339"
"fcc23ce4433b88c33bb0c38cc50a877998877718877408077a28077298815ce3100eecc00ee5500e"
"f33023c1d2411ee4e117d8e11dde011e6648193bb0833db4831b84c3388c4339ccc33cb8c139c8c3"
"3bd4033ccc48b471080776600771088771588719dbc60eec600fede006f0200fe5300fe5200ff650"
"0e6e100ee3300ee5300ff3e006e9e00ee4500ef83023e2ec611cc2811dd8e117ec211de6211dc421"
"1dd8211de8211f66209d3bbc433db80339948339cc58bc7070077778077a08077a488777708719cb"
"e70eef300fe1e00ee9400fe9a00fe530c3010373a8077718875f988770708774a08774d087729881"
"844139e0c338b0433d904339cc40c4a01dcaa11de0411edec11c662463300ee1c00eec300fe9400f"
"e5000000792000001d000000721e482043880c19097232482023818c9191d144a01028643c313242"
"8e9021a318100a00060000006b65726e656c0000230802308240042308843082400c330c4230cc40"
"0c4441c84860821272b3b36b730973737ba30ba34b7b739b1b2528d271b3b36b4b9373b12b939b4b"
"7b731b2530000000a9180000250000000b0a7228877780077a587098433db8c338b04339d0c382e6"
"1cc6a10de8411ec2c11de6211de8211ddec11d1634e3600ee7500fe1200fe4400fe1200fe7500ef4"
"b08081077928877060077678877108077a28077258709cc338b4013ba4833d94c3026b1cd8211cdc"
"e11cdc201ce4611cdc201ce8811ec2611cd0a11cc8611cc2811dd861c1010ff4200fe1500ff4800e"
"00000000d11000000600000007cc3ca4833b9c033b94033da0833c94433890c30100000061200000"
"06000000130481860301000002000000075010cd14610000000000007120000003000000320e1022"
"8400fb020000000000000000650c00001f000000120394f000000000030000000600000006000000"
"4c000000010000005800000000000000580000000100000070000000000000000c00000013000000"
"1f000000080000000600000000000000700000000000000000000000010000000000000000000000"
"060000000000000006000000ffffffff00240000000000005d0c00000d0000001203946700000000"
"6b65726e656c31352e302e376e7670747836342d6e76696469612d637564613c737472696e673e00"
"00000000",
(2, 3): # (major, debug_major)
"4243c0de3514000005000000620c30244a59be669dfbb4bf0b51804c01000000210c000080010000"
"0b02210002000000160000000781239141c80449061032399201840c250508191e048b62800c4502"
"42920b42641032143808184b0a3232884870c421234412878c1041920264c808b1142043468820c9"
"01323284182a282a90317cb05c9120c3c8000000892000000b0000003222c80820624600212b2498"
"0c212524980c19270c85a4906032645c20246382a01801300128030173046000132677b00778a007"
"7cb0033a680377b0877420877408873618877a208770d8e012e5d006f0a0077640077a600774a007"
"7640076d900e71a00778a00778d006e980077a80077a80076d900e7160077a100776a0077160076d"
"900e7320077a300772a0077320076d900e7640077a600774a0077640076d900e71200778a0077120"
"0778a00771200778d006e6300772a0077320077a300772d006e6600774a0077640077a600774d006"
"f6100776a0077160077a100776d006f6300772a0077320077a300772d006f6600774a0077640077a"
"600774d006f610077280077a10077280077a10077280076de00e7160077a300772a0077640071a21"
"4c0e11de9c2e4fbbcfbe211560040000000000000000000000000620b141a0286100004016080000"
"06000000321e980c19114c908c092647c60443620914c10840190000b1180000ac0000003308801c"
"c4e11c6614013d88433884c38c4280077978077398710ce6000fed100ef4800e330c421ec2c11dce"
"a11c6630053d88433884831bcc033dc8433d8c033dcc788c7470077b08077948877070077a700376"
"788770208719cc110eec900ee1300f6e300fe3f00ef0500e3310c41dde211cd8211dc2611e663089"
"3bbc833bd04339b4033cbc833c84033bccf0147660077b6807376887726807378087709087706007"
"76280776f8057678877780875f08877118877298877998812ceef00eeee00ef5c00eec300362c8a1"
"1ce4a11ccca11ce4a11cdc611cca211cc4811dca6106d6904339c84339984339c84339b8c3389443"
"3888033b94c32fbc833cfc823bd4033bb0c30cc7698770588772708374680778608774188774a087"
"19ce530fee000ff2500ee4900ee3400fe1200eec500e3320281ddcc11ec2411ed2211cdc811edce0"
"1ce4e11dea011e66185138b0433a9c833bcc50247660077b68073760877778077898514cf4900ff0"
"500e331e6a1eca611ce8211ddec11d7e011ee4a11ccc211df0610654858338ccc33bb0433dd04339"
"fcc23ce4433b88c33bb0c38cc50a877998877718877408077a28077298815ce3100eecc00ee5500e"
"f33023c1d2411ee4e117d8e11dde011e6648193bb0833db4831b84c3388c4339ccc33cb8c139c8c3"
"3bd4033ccc48b471080776600771088771588719dbc60eec600fede006f0200fe5300fe5200ff650"
"0e6e100ee3300ee5300ff3e006e9e00ee4500ef83023e2ec611cc2811dd8e117ec211de6211dc421"
"1dd8211de8211f66209d3bbc433db80339948339cc58bc7070077778077a08077a488777708719cb"
"e70eef300fe1e00ee9400fe9a00fe530c3010373a8077718875f988770708774a08774d087729881"
"844139e0c338b0433d904339cc40c4a01dcaa11de0411edec11c662463300ee1c00eec300fe9400f"
"e5000000792000001e000000721e482043880c19097232482023818c9191d144a01028643c313242"
"8e9021a318100a00060000006b65726e656c0000230802308240042308843082400c23080431c320"
"04c30c045118858c04262821373bbb36973037b737ba30bab437b7b95102231d373bbbb6343917bb"
"32b9b9b437b7518203000000a9180000250000000b0a7228877780077a587098433db8c338b04339"
"d0c382e61cc6a10de8411ec2c11de6211de8211ddec11d1634e3600ee7500fe1200fe4400fe1200f"
"e7500ef4b08081077928877060077678877108077a28077258709cc338b4013ba4833d94c3026b1c"
"d8211cdce11cdc201ce4611cdc201ce8811ec2611cd0a11cc8611cc2811dd861c1010ff4200fe150"
"0ff4800e00000000d11000000600000007cc3ca4833b9c033b94033da0833c94433890c301000000"
"6120000006000000130481860301000002000000075010cd14610000000000007120000003000000"
"320e10228400fc020000000000000000650c00001f000000120394f0000000000300000006000000"
"060000004c000000010000005800000000000000580000000100000070000000000000000c000000"
"130000001f0000000800000006000000000000007000000000000000000000000100000000000000"
"00000000060000000000000006000000ffffffff00240000000000005d0c00000d00000012039467"
"000000006b65726e656c31352e302e376e7670747836342d6e76696469612d637564613c73747269"
"6e673e0000000000",
}


@pytest.fixture(params=("txt", "bitcode_static"))
def minimal_nvvmir(request):
major, minor, debug_major, debug_minor = nvvm.ir_version()

if request.param == "txt":
return MINIMAL_NVVMIR_TXT_TEMPLATE % (major, debug_major)

bitcode_static_binascii = MINIMAL_NVVMIR_BITCODE_STATIC.get((major, debug_major))
if bitcode_static_binascii:
return binascii.unhexlify(bitcode_static_binascii)
raise RuntimeError(
"Static bitcode for NVVM IR version "
f"{major}.{debug_major} is not available in this test.\n"
"Maintainers: Please run the helper script to generate it and add the "
"output to the MINIMAL_NVVMIR_BITCODE_STATIC dict:\n"
" ../../toolshed/build_static_bitcode_input.py"
)
pytest_plugins = ("cuda_python_test_helpers.nvvm_bitcode",)


@pytest.fixture(params=[nvvm.compile_program, nvvm.verify_program])
Expand Down Expand Up @@ -221,7 +91,7 @@ def test_c_or_v_program_fail_invalid_ir(compile_or_verify):
assert get_program_log(prog) == "FileNameHere.ll (1, 0): parse expected top-level entity\x00"


def test_c_or_v_program_fail_bad_option(minimal_nvvmir, compile_or_verify):
def test_c_or_v_program_fail_bad_option(minimal_nvvmir, compile_or_verify): # noqa: F401, F811
with nvvm_program() as prog:
nvvm.add_module_to_program(prog, minimal_nvvmir, len(minimal_nvvmir), "FileNameHere.ll")
with pytest.raises(nvvm.nvvmError, match=match_exact("ERROR_INVALID_OPTION (7)")):
Expand All @@ -246,7 +116,7 @@ def test_get_buffer_empty(get_size, get_buffer):


@pytest.mark.parametrize("options", [[], ["-opt=0"], ["-opt=3", "-g"]])
def test_compile_program_with_minimal_nvvm_ir(minimal_nvvmir, options):
def test_compile_program_with_minimal_nvvm_ir(minimal_nvvmir, options): # noqa: F401, F811
with nvvm_program() as prog:
nvvm.add_module_to_program(prog, minimal_nvvmir, len(minimal_nvvmir), "FileNameHere.ll")
try:
Expand All @@ -266,7 +136,7 @@ def test_compile_program_with_minimal_nvvm_ir(minimal_nvvmir, options):


@pytest.mark.parametrize("options", [[], ["-opt=0"], ["-opt=3", "-g"]])
def test_verify_program_with_minimal_nvvm_ir(minimal_nvvmir, options):
def test_verify_program_with_minimal_nvvm_ir(minimal_nvvmir, options): # noqa: F401, F811
with nvvm_program() as prog:
nvvm.add_module_to_program(prog, minimal_nvvmir, len(minimal_nvvmir), "FileNameHere.ll")
nvvm.verify_program(prog, len(options), options)
2 changes: 2 additions & 0 deletions cuda_core/cuda/core/_program.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ cdef class Program:
object _linker # Linker
object _options # ProgramOptions
object __weakref__
bint _use_libdevice # Flag for libdevice loading
int _module_count
Loading
Loading