From 251f27b805027135472d95fa5cf1cbc554af6d37 Mon Sep 17 00:00:00 2001 From: Graham Markall <535640+gmarkall@users.noreply.github.com> Date: Thu, 15 Feb 2024 02:23:50 +0000 Subject: [PATCH] Use add_library to link archives in Numba patch (#54) The required functionality has been available in the underlying API, and just not called by the patch. This enables linking of archives by the patched linker, and therefore fixes the issues with cooperative groups in Numba. Fixes #53 --- pynvjitlink/patch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pynvjitlink/patch.py b/pynvjitlink/patch.py index c8f9de58..2b31d036 100644 --- a/pynvjitlink/patch.py +++ b/pynvjitlink/patch.py @@ -104,7 +104,7 @@ def add_file(self, path, kind): elif kind == FILE_EXTENSION_MAP["fatbin"]: fn = self._linker.add_fatbin elif kind == FILE_EXTENSION_MAP["a"]: - raise LinkerError("Don't know how to link archives") + fn = self._linker.add_library elif kind == FILE_EXTENSION_MAP["ptx"]: return self.add_ptx(data, name) elif kind == FILE_EXTENSION_MAP["o"]: