Coder Social home page Coder Social logo

Comments (3)

ChunelFeng avatar ChunelFeng commented on June 6, 2024

您好,关于你提到的 B中创建子任务,可以将B 设置为一个 group,然后往其中添加node。

例子可以参考:https://github.com/ChunelFeng/CGraph/blob/main/tutorial/T03-Region.cpp
介绍视频可以参考:https://www.bilibili.com/video/BV1Mo4y1h74y/?vd_source=2c7baed805c6cb33d630d5d4546cf0be

应该可以match 到你的想法。
欢迎随时交流

from cgraph.

Frandy avatar Frandy commented on June 6, 2024

谢谢您的回复。
我看了主页上的文章,和给的demo、视频。
我的疑问在于,是否能在任务执行过程中添加任务或拆分任务?
比如写一个矩阵运算的程序,矩阵的维数根据输入决定。在某种输入情况下,B的大小是1e4, C的大小是100.
只使用2个线程,B与C并行,C会比B先计算完。然后D就得等着B计算。
我的想法是,在B的实现里,根据矩阵大小,比如按1000的大小,拆分成100个方块,先并行对这100个方块执行计算,然后做后处理完成B的计算。
这里B拆分任务,是需要新建一个pipeline, 往里面放任务,调用pipeline的run/process? 我好像有看到说pipeline之间是共用thread pool的。

from cgraph.

ChunelFeng avatar ChunelFeng commented on June 6, 2024

您说的,应该是常用的 AI推理引擎 的工作机制是么?
自动拆分算子(自动优化)的逻辑,色图里是没有的。
如果需要做对应优化的话,还需要在node中,自己实现对应算子优化逻辑。

后期色图会 考虑兼容python版本,方便通过python的通用库,来支持类似功能。
但不会直接开发,主要也是没那个能力,哈哈哈

from cgraph.

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.