NVIDIA / numbast

Numbast is a tool to build an automated pipeline that converts CUDA APIs into Numba bindings.
Apache License 2.0
15 stars 6 forks source link

Allow Numbast to link shim functions from memory #19

Closed isVoid closed 5 months ago

isVoid commented 5 months ago

This PR allow Numbast to link shim functions from memory. It depends on the new PR added in pynvjitlink 0.2.0.

This feature refactors Numbast's Shimwriter into two subclasses: FileShimWriter and MemoryShimWriter. FileShimWriter is in close anology to the original ShimWriter, except user do not determine the name of the shim file as it is now using a temporary file to store the shim functions.

MemoryShimWriter piggy backs on the new "link from memory" feature introduced in pynvjitlink and stores shim functions and ptxes in memory. This reduces file I/O.

Both shim writer are also tested in numbast test - they are also the first tests written for Numbast. Contribution to #9 .

Numba_extensions have all switched to use MemoryShimWrtier by default.

Also depends on #17