--- a/flashinfer/artifacts.py +++ b/flashinfer/artifacts.py @@ -203,9 +203,13 @@ with ThreadPoolExecutor(num_threads) as pool: futures = [] - for name, _ in cubin_files: - source = safe_urljoin(FLASHINFER_CUBINS_REPOSITORY, name) - local_path = FLASHINFER_CUBIN_DIR / name + for name, checksum in cubin_files: + local_path = FLASHINFER_CUBIN_DIR / name + if local_path.exists() and verify_cubin(str(local_path), checksum): + pbar.update(1) + continue + + source = safe_urljoin(FLASHINFER_CUBINS_REPOSITORY, name) # Ensure parent directory exists local_path.parent.mkdir(parents=True, exist_ok=True) fut = pool.submit(