Unverified Commit ed29d6ee authored by Nicolas Patry's avatar Nicolas Patry Committed by GitHub
Browse files

Remove unecessary cuda graph. (#1664)

# What does this PR do?

<!--
Congratulations! You've made it this far! You're not quite done yet
though.

Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.

Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.

Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->

<!-- Remove if not applicable -->

Fixes # (issue)


## Before submitting
- [ ] This PR fixes a typo or...
parent de6cb15f
...@@ -802,7 +802,7 @@ class FlashCausalLM(Model): ...@@ -802,7 +802,7 @@ class FlashCausalLM(Model):
try: try:
logger.info("Experimental support for Cuda Graphs is enabled") logger.info("Experimental support for Cuda Graphs is enabled")
# Warmup cuda graphs # Warmup cuda graphs
for bs in [1, 2, 4] + [8 * i for i in range(8)]: for bs in [1, 2, 4] + [8 * i for i in range(1, 9)]:
if self.speculate is None or self.speculate + 1 <= bs: if self.speculate is None or self.speculate + 1 <= bs:
self.cuda_graph_warmup(bs, max_s, max_bt) self.cuda_graph_warmup(bs, max_s, max_bt)
except Exception: except Exception:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment