Comments (3)
您好,关于你提到的 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.
谢谢您的回复。
我看了主页上的文章,和给的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.
您说的,应该是常用的 AI推理引擎 的工作机制是么?
自动拆分算子(自动优化)的逻辑,色图里是没有的。
如果需要做对应优化的话,还需要在node中,自己实现对应算子优化逻辑。
后期色图会 考虑兼容python版本,方便通过python的通用库,来支持类似功能。
但不会直接开发,主要也是没那个能力,哈哈哈
from cgraph.
Related Issues (20)
- linux系统中使用cmake作为第三方库引用到自己项目 HOT 3
- 添加任务绑定线程执行的功能 HOT 1
- 使用MinGW编译器,编译失败的解决方案。 HOT 1
- red hat gcc-4.8.5无法通过编译 HOT 1
- 请问能否支持最大并发线程数的计算? HOT 3
- readme中,需要增加对 bubble 的感谢
- 引入新的机制,如果是 a->b->c 这种链路的话,就考虑直接单线程执行了 HOT 2
- 需要隐藏一下 GParam的 init和 destroy 方法
- 需要升级一下 notifier,使得aspect 中,也可以触达到 notifyer的内容
- 在MyTemplateNode里不能使用CGRAPH_CREATE_GPARAM创建变量吗? HOT 2
- 格式空格问题,静态函数问题
- 提供状态机的例子,来替代 hold的例子 HOT 2
- cgraph能否在gnode的run方法中获取父节点或子节点对象,并执行父子节点方法获取相关信息? HOT 7
- 已有项目集成CGraph如何保持原有返回状态码? HOT 1
- 关于条件嵌套执行的问题 HOT 1
- 这里有问题,判断条件写错了。改一下
- 需要兼容 cpp20
- 改错了,改回 run() 必须实现的版本
- 未禁止外部拷贝和赋值 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cgraph.