Skip to content

Commit 21c146f

Browse files
committed
Add Loaded from: {full_path} to nvjitlink_linux.pyx; pytest -s
1 parent 4d0b5a6 commit 21c146f

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/test-wheel-linux.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ jobs:
194194
195195
pushd ./cuda_bindings
196196
pip install -r requirements.txt
197-
pytest -rxXs -v tests/
197+
pytest -ra -s -v tests/
198198
199199
# It is a bit convoluted to run the Cython tests against CTK wheels,
200200
# so let's just skip them.
@@ -205,7 +205,7 @@ jobs:
205205
# TODO: enable this once win-64 runners are up
206206
exit 1
207207
fi
208-
pytest -rxXs -v tests/cython
208+
pytest -ra -s -v tests/cython
209209
fi
210210
popd
211211
@@ -229,7 +229,7 @@ jobs:
229229
230230
pushd ./cuda_core
231231
pip install -r "tests/requirements-cu${TEST_CUDA_MAJOR}.txt"
232-
pytest -rxXs -v tests/
232+
pytest -ra -s -v tests/
233233
234234
# It is a bit convoluted to run the Cython tests against CTK wheels,
235235
# so let's just skip them. Also, currently our CI always installs the
@@ -243,7 +243,7 @@ jobs:
243243
# TODO: enable this once win-64 runners are up
244244
exit 1
245245
fi
246-
pytest -rxXs -v tests/cython
246+
pytest -ra -s -v tests/cython
247247
fi
248248
popd
249249

.github/workflows/test-wheel-windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ jobs:
186186
187187
Push-Location ./cuda_bindings
188188
pip install -r requirements.txt
189-
pytest -rxXs -v tests/
189+
pytest -ra -s -v tests/
190190
# skip Cython tests for now (NVIDIA/cuda-python#466)
191191
Pop-Location
192192
@@ -210,7 +210,7 @@ jobs:
210210
211211
Push-Location ./cuda_core
212212
pip install -r "tests/requirements-cu${TEST_CUDA_MAJOR}.txt"
213-
pytest -rxXs -v tests/
213+
pytest -ra -s -v tests/
214214
Pop-Location
215215
216216
- name: Ensure cuda-python installable

cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ cdef void* load_library(const int driver_ver) except* with gil:
5858
so_name = "libnvJitLink.so" + (f".{suffix}" if suffix else suffix)
5959
handle = dlopen(so_name.encode(), RTLD_NOW | RTLD_GLOBAL)
6060
if handle != NULL:
61+
# Scan /proc/self/maps to find the loaded library
62+
num_print = 0
63+
with open("/proc/self/maps", "r") as f:
64+
for line in f:
65+
if so_name in line:
66+
full_path = line.strip().split()[-1]
67+
num_print += 1
68+
print(f"\nLOOOK {num_print} Loaded from: {full_path}")
6169
break
6270
else:
6371
err_msg = dlerror()

0 commit comments

Comments
 (0)