From cf9baeea618906a99eea28a7aa47963fa772fd21 Mon Sep 17 00:00:00 2001 From: nimlgen <138685161+nimlgen@users.noreply.github.com> Date: Thu, 16 Oct 2025 20:41:49 +0800 Subject: [PATCH] Revert "nv: check if jitlink is avail (#12731)" (#12735) This reverts commit a069a45d14f982a1ba9fad80eb37b5cf0d9979ac. --- tinygrad/runtime/support/compiler_cuda.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tinygrad/runtime/support/compiler_cuda.py b/tinygrad/runtime/support/compiler_cuda.py index 2fd7570751..8f83c34657 100644 --- a/tinygrad/runtime/support/compiler_cuda.py +++ b/tinygrad/runtime/support/compiler_cuda.py @@ -69,9 +69,7 @@ class PTXCompiler(Compiler): def disassemble(self, lib:bytes): cuda_disassemble(lib, self.arch) class NVPTXCompiler(PTXCompiler): - def __init__(self, arch:str): - nvrtc.nvJitLinkVersion(ctypes.byref(ctypes.c_int()), ctypes.byref(ctypes.c_int())) # try to get version to check if jitlink is available - super().__init__(arch, cache_key="nv_ptx") + def __init__(self, arch:str): super().__init__(arch, cache_key="nv_ptx") def compile(self, src:str) -> bytes: jitlink_check(nvrtc.nvJitLinkCreate(handle := nvrtc.nvJitLinkHandle(), 1, to_char_p_p([f'-arch={self.arch}'.encode()])), handle) jitlink_check(nvrtc.nvJitLinkAddData(handle, nvrtc.NVJITLINK_INPUT_PTX, ptxsrc:=super().compile(src), len(ptxsrc), "".encode()), handle)