Skip to content

Commit 425ff30

Browse files
JayWizhsahuja0805
authored andcommitted
Signed-off-by: Marc Johannes Aslan <marcjohannes.aslan@ipm.fraunhofer.de>
Fix Windows Compatibility
1 parent b5ddb10 commit 425ff30

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

nsight/collection/ncu.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,14 @@ def try_init_injection() -> None:
142142
check_ncu_version(ncu_path)
143143

144144
inj_dir = get_injection_library_path(ncu_path)
145-
inj_lib_path = os.path.join(inj_dir, "libcuda-injection.so")
145+
146+
if os.name == "posix":
147+
inj_lib_path = os.path.join(inj_dir, "libcuda-injection.so")
148+
elif os.name == "nt":
149+
inj_lib_path = os.path.join(inj_dir, "cuda-injection.dll")
150+
else:
151+
raise exceptions.ProfilerException(f"Unsupported operating system: {os.name}")
152+
146153
if not os.path.isfile(inj_lib_path):
147154
raise exceptions.ProfilerException("Failed to find NCU injection library")
148155

0 commit comments

Comments
 (0)