Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: warmup for jit kernel tests #629

Merged
merged 1 commit into from
Nov 24, 2024
Merged

feat: warmup for jit kernel tests #629

merged 1 commit into from
Nov 24, 2024

Conversation

yzh119
Copy link
Collaborator

@yzh119 yzh119 commented Nov 24, 2024

Currently unittests are slow when using flashinfer jit because we only compile kernels the first time we run it, it's blocking and didn't compile multiple ops in parallel. This PR add a warmup pre-hook to kernel unittests, so that we compile all necessary kernels before running the unittests in JIT mode, which greatly accelerate the unittests.

This PR also fixes the several issues with #628 :

  1. using thread-safe make_dirs(..., exist_ok=True) instead of relying on os.path.exists
  2. change the signature of parallel_load_modules to lists of (jit_module_creation_func, args) instead of lambda function, because lambda function captures variable by ref instead of value, which may cause some unexpected errors.

@yzh119 yzh119 merged commit 8f5f349 into main Nov 24, 2024
yzh119 added a commit that referenced this pull request Nov 24, 2024
…630)

In #629 , page ops are missing in shared-prefix kernel unittest's warmup
function
@yzh119 yzh119 deleted the warmup-jit-tests branch November 24, 2024 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant