feat: add hardware platform and plugin support - #1565
Open
zhangts20 wants to merge 1 commit into
Open
Conversation
Collaborator
Author
简介把硬件抽象和第三方插件拆成两层,方便后续其他硬件以及 pip 的注册,当前提交不涉及现有推理路径。对外入口是 lightllm/platform/
├── __init__.py
├── backends
│ ├── __init__.py
│ └── cuda_like
│ ├── __init__.py
│ ├── graph.py
│ └── runtime.py
├── base
│ ├── __init__.py
│ ├── backend.py
│ ├── graph.py
│ ├── registry.py
│ └── runtime.py
└── plugin
├── __init__.py
├── att.py
├── common.py
└── ops.py
做法
入口只有 用法[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"
[project]
name = "lightllm-example-plugin"
version = "0.0.1"
description = "Example LightLLM ops and att plugins"
requires-python = ">=3.10"
[project.entry-points."lightllm.ops_plugin"]
example_ops = "lightllm_example_plugin.register:register_ops"
[project.entry-points."lightllm.att_plugin"]
example_att = "lightllm_example_plugin.register:register_att"
[tool.setuptools.packages.find]
where = ["."]
include = ["lightllm_example_plugin*"]同时注册
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.