Calling CUDA from Go without cgo

I started gocudrv with one constraint: I wanted Go code to call CUDA without making every build depend on CUDA headers, a C compiler, or cgo. That means loading the NVIDIA driver at runtime instead of linking against CUDA at build time. Why avoid cgo? cgo is the normal way to call C from Go, and often the right tool. But it also makes builds heavier. A package that uses cgo needs: a C compiler platform-specific toolchains cross-compilers for cross-platform builds For this project, that was exactly the setup

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论