Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lmdeploy/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def calib_search_scale(parser):
)

@staticmethod
def device(parser, default: str = 'cuda', choices: List[str] = ['cuda', 'ascend', 'maca', 'camb', 'ppu']):
def device(parser, default: str = 'cuda', choices: List[str] = ['cuda', 'ascend', 'maca', 'camb']):
"""Add argument device to parser."""

return parser.add_argument('--device',
Expand Down
3 changes: 1 addition & 2 deletions lmdeploy/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,7 @@ def __post_init__(self):
'invalid max_prefill_token_num'
assert self.num_gpu_blocks >= 0, 'invalid num_gpu_blocks'
assert self.quant_policy in (0, 4, 8), 'invalid quant_policy'
assert self.device_type in ['cuda', 'ascend', 'maca', 'camb',
'ppu'], (f'invalid device_type: {self.device_type}')
assert self.device_type in ['cuda', 'ascend', 'maca', 'camb'], (f'invalid device_type: {self.device_type}')
assert self.block_size >= 16 and (self.block_size & (self.block_size - 1)) == 0, \
f'block_size must be >= 16 and a power of 2, but got {self.block_size}'
if self.quant_policy > 0 and self.device_type not in ['cuda', 'ascend']:
Expand Down
2 changes: 0 additions & 2 deletions lmdeploy/pytorch/backends/dlinfer/ppu/__init__.py

This file was deleted.

87 changes: 0 additions & 87 deletions lmdeploy/pytorch/backends/dlinfer/ppu/op_backend.py

This file was deleted.

3 changes: 0 additions & 3 deletions lmdeploy/pytorch/backends/selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ def _get_backend():
if device_type == 'camb':
from .dlinfer.camb import CambOpsBackend
return CambOpsBackend
if device_type == 'ppu':
from .dlinfer.ppu import PpuOpsBackend
return PpuOpsBackend
else:
raise RuntimeError(f'Unsupported device type: {device_type}')

Expand Down
9 changes: 1 addition & 8 deletions lmdeploy/pytorch/kernels/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,7 @@ def __init__(self, func_name: str):
self.func_name = func_name
self.dispatched_func = self.load_and_call
self.device_manager.register_context_callback(self.device_callback)
self.device_map = {
'cuda': 'cuda',
'ascend': 'dlinfer',
'npu': 'dlinfer',
'maca': 'dlinfer',
'camb': 'dlinfer',
'ppu': 'dlinfer'
}
self.device_map = {'cuda': 'cuda', 'ascend': 'dlinfer', 'npu': 'dlinfer', 'maca': 'dlinfer', 'camb': 'dlinfer'}

def device_callback(self, context: DeviceContext):
"""Device context callback."""
Expand Down
6 changes: 1 addition & 5 deletions lmdeploy/pytorch/models/module_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
ASCEND_MODULE_MAP = dict()
MACA_MODULE_MAP = dict()
CAMB_MODULE_MAP = dict()
PPU_MODULE_MAP = dict()

DEVICE_SPECIAL_MODULE_MAP = dict(ascend=ASCEND_MODULE_MAP,
maca=MACA_MODULE_MAP,
camb=CAMB_MODULE_MAP,
ppu=PPU_MODULE_MAP)
DEVICE_SPECIAL_MODULE_MAP = dict(ascend=ASCEND_MODULE_MAP, maca=MACA_MODULE_MAP, camb=CAMB_MODULE_MAP)

# llama
MODULE_MAP.update({
Expand Down
5 changes: 1 addition & 4 deletions lmdeploy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def get_max_batch_size(device_type: str):
Args:
device_type (str): the type of device
"""
assert device_type in ['cuda', 'ascend', 'maca', 'camb', 'ppu']
assert device_type in ['cuda', 'ascend', 'maca', 'camb']
if device_type == 'cuda':
max_batch_size_map = {'a100': 256, 'a800': 256, 'h100': 512, 'h800': 512}
import torch
Expand All @@ -352,8 +352,6 @@ def get_max_batch_size(device_type: str):
return 256
elif device_type == 'camb':
return 256
elif device_type == 'ppu':
return 256


def is_bf16_supported(device_type: str = 'cuda'):
Expand Down Expand Up @@ -401,7 +399,6 @@ def try_import_deeplink(device_type: str):
'npu',
'maca',
'camb',
'ppu',
]
if device_type in deeplink_device_type_list:
try:
Expand Down
21 changes: 0 additions & 21 deletions requirements/runtime_ppu.txt

This file was deleted.

4 changes: 0 additions & 4 deletions requirements_ppu.txt

This file was deleted.