MCPcopy Create free account
hub / github.com/tile-ai/tilelang / _safe_write_executable

Method _safe_write_executable

tilelang/cache/kernel_cache.py:459–462  ·  view source on GitHub ↗
(cls, executable: Executable, path: str)

Source from the content-addressed store, hash-verified

457
458 @classmethod
459 def _safe_write_executable(cls, executable: Executable, path: str):
460 temp_path = os.path.join(env.TILELANG_TMP_DIR, f"{os.getpid()}_{uuid.uuid4()}.so")
461 executable.export_library(temp_path, **cls._get_compile_args())
462 os.replace(temp_path, path)
463
464 def _save_kernel_to_disk(self, key: str, kernel: JITKernel, func: Callable = None, verbose: bool = False):
465 """

Callers 1

Calls 3

export_libraryMethod · 0.80
_get_compile_argsMethod · 0.80
replaceMethod · 0.80

Tested by

no test coverage detected