Giter Site home page Giter Site logo

deeplinkext's Introduction

DeepLinkExt

基本**仿照 cpp extension,不过会先在 python 层判断该融合算子的 diopi 实现没有(具体判断方法为,在 cpp 层进行 pybind 时,如果没有 diopi 实现,则不进行 pybind)。如果没有实现,则会在 python 层替换为 torch 的几个分离算子。

融合算子的 diopi 定义及实现放在 DIOPI 库里,本拓展库仅引用。

支持自动 patch InternLM 和 LightLLM 中用到的融合算子,将它们替换为 DIOPI 实现。

Install

首先安装 DIPU,确保可以 import torch_dipu。然后在本目录下执行

pip install -e .

Usage

InternLM

import deeplink_ext.patch_internlm
import internlm

LightLLM

import deeplink_ext.patch_lightllm
import lightllm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.