Skip to content

Conversation

@yao-fengchen
Copy link
Collaborator

No description provided.

AscendOpsBackend.enable_graph = ascend_graph_runner.enable_graph
return ascend_graph_runner
from lmdeploy.pytorch.backends.cuda.graph_runner import CUDAGraphRunner
return CUDAGraphRunner(model, model_config, cache_config, backend_config, device)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make a new aclgraphrunner instead

@jinminxi104 jinminxi104 requested a review from Copilot December 4, 2025 08:03
Copilot finished reviewing on behalf of jinminxi104 December 4, 2025 08:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the Ascend backend code by removing Ascend310P-specific support and simplifying the codebase to focus solely on Ascend910 devices. The refactoring also restructures the update_step_context method for better code organization.

Key changes:

  • Removed all Ascend310P-specific logic including NZ format weight transformations, block shape calculations, and attention mask handling
  • Simplified SocVersion class by replacing the cached device_name() method with a class attribute
  • Refactored update_step_context method to use helper functions for better code organization and readability

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
lmdeploy/pytorch/backends/dlinfer/linear.py Removed Ascend310P-specific weight transformation logic for NZ format
lmdeploy/pytorch/backends/dlinfer/ascend/op_backend.py Removed Ascend310P support from block shape methods, simplified SocVersion class, refactored update_step_context with helper functions, removed enable_aclgraph method, updated build_graph_runner to use only CUDAGraphRunner, removed Ascend310P compile mode settings
lmdeploy/pytorch/backends/dlinfer/ascend/graph_runner.py Removed Ascend310P-specific get_logits compilation logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants