Giter VIP home page Giter VIP logo

Comments (2)

qili93 avatar qili93 commented on July 30, 2024

您好,请问310B是昇腾23年新出的芯片类型对吗?这个芯片类型Lite尚未适配,Lite会将此需求纳入需求池进行评审,感谢您的反馈!

from paddle-lite.

hong19860320 avatar hong19860320 commented on July 30, 2024

PartitionModel function => add another abstract partition interface to support user-specific features( such as partition model between same type device to enable parallelism )

for the following function ,maybe it's good to provide an abstract interface for user to make a specific device partition

int Compilation::PartitionModel(
    Context* context,
    Model* model,
    std::vector<std::pair<
        Context::DeviceContext*,
        std::tuple<core::Model*, bool, std::vector<int>, std::vector<int>>>>*
        models) {
...
    for (auto& operation : model->model_.operations) {
            if (_flags_[operation_index] && !flags[operation_index]) {                             <----- here may be provide another abstraction for user specificed partition and all way down into other revelant code (such as user specificed ModelPartitioner)
              flags[operation_index] = true;
              // Only the operations which are not supported by the previous devices
              // are added.
              supported_operations[i].second.insert(&operation);                                                  
            }
            operation_index++;
          }



// For example we have <model> as follows:
//        conv2d_0                       conv2d_1
//           |                                        |
//      batch_norm_0                batch_norm_1
//           |                                        |
//         relu_0                              relu_1
//              \                                  /
//                    \                        /
//                        leave out ops(such as operator)


// and two devices with support operators listed 
//   <device_id=0, [conv2d_0,batch_norm_0,relu_0, conv2d_1,batch_norm_1,relu_1]>
//   <device_id=1, [conv2d_0,batch_norm_0,relu_0, conv2d_1,batch_norm_1,relu_1]>

// we need to use a interface to partition the model into devices as follows
//   <device_id=0, {[conv2d_0,batch_norm_0,relu_0], false, [...], [...]}>>
//   <device_id=1, {[conv2d_1,batch_norm_1,relu_1], false, [...], [...]>>

It's good idea, we will consider your suggestion in the future.
Now we provide another solution, please check https://www.paddlepaddle.org.cn/lite/v2.12/develop_guides/nnadapter.html
image

from paddle-lite.

Related Issues (20)

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.