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

Long inference time while using flag_gems.use_gems() #354

Open
lirui635693142 opened this issue Dec 11, 2024 · 1 comment
Open

Long inference time while using flag_gems.use_gems() #354

lirui635693142 opened this issue Dec 11, 2024 · 1 comment

Comments

@lirui635693142
Copy link

Please describe your question

While testing model accuracy, I found that the inference time of flag_gems.use_gems() is extremely higher than that in torch.no_grad().

@iclementine
Copy link
Collaborator

iclementine commented Dec 12, 2024

The main reason for this is the the Autotuner, which tunes for the best config when it encounters inputs with new key(mainly shape).

We are working on solving this. Possible solutions are

  1. Use heuristics instead of Autotuner;
  2. use smaller config space;
  3. Use the int(log2(size)) instead of size as Autotuner keys;
  4. Use an Autotuner with persistent cache.

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

No branches or pull requests

2 participants