Skip to content

Commit

Permalink
refine cudagraph code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinerzhou committed Jan 8, 2025
1 parent 3ff2962 commit 8493102
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 303 deletions.
300 changes: 0 additions & 300 deletions lmdeploy/pytorch/backends/dlinfer/maca/graph_runner.py

This file was deleted.

4 changes: 2 additions & 2 deletions lmdeploy/pytorch/backends/dlinfer/maca/op_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ def build_graph_runner(model: torch.nn.Module, model_config: ModelConfig,
backend_config: BackendConfig,
device: torch.device):
"""build graph runner."""
from .graph_runner import MACAGraphRunner
return MACAGraphRunner(model, model_config, cache_config,
from lmdeploy.pytorch.backends.cuda.graph_runner import CUDAGraphRunner
return CUDAGraphRunner(model, model_config, cache_config,
backend_config, device)
2 changes: 1 addition & 1 deletion lmdeploy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def get_max_batch_size(device_type: str):
elif device_type == 'ascend':
return 16
elif device_type == 'maca':
return 128
return 256


def is_bf16_supported(device_type: str = 'cuda'):
Expand Down

0 comments on commit 8493102

Please sign in to comment.