Commit Graph

248 Commits

Author SHA1 Message Date
kilinchange 206fbedbef -add external tag 2023-09-27 13:56:34 +08:00
YdrMaster 9e17481119 build: 更新 RefactorGraph
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-27 13:13:11 +08:00
YdrMaster 0fad4e16d8 refactor: 不下降后端不需要的张量
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-26 15:32:19 +08:00
YdrMaster 445442813d refactor: 更新 RefactorGraph,调整子项目顺序
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-26 11:36:38 +08:00
YdrMaster 66ef2a9c61 fix: 支持更多 numpy 类型
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-25 13:34:33 +08:00
YdrMaster 8ae83caa7c build: 更新 RefactorGraph 追上 dev,移除 par
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-25 10:00:21 +08:00
YdrMaster 024fc359e7 optimize: 优化调整
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-25 09:03:15 +08:00
YdrMaster 73356102b5 feat: 使用 slice 和 range 替换 vector 传序号
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-22 18:37:27 +08:00
YdrMaster 60c5c9fd56 feat: 使用移动语义等方法优化性能
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-22 18:17:07 +08:00
YdrMaster f4f80c6f3b fix: 先设置性质后 malloc
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-22 17:41:53 +08:00
YdrMaster b7775b852a fix: 为所有张量打标记
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-22 17:08:35 +08:00
YdrMaster 1e05a159e1 build: 更新 RefactorGraph
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-22 16:33:50 +08:00
zhangyunze 69df615c70 feat: support less kernel 2023-09-22 15:59:27 +08:00
zhangyunze cbdb982006 feat: support less/expand/unsqueeze op convert 2023-09-22 15:24:14 +08:00
YdrMaster 0512bfca63 build: 更新 RefactorGraph
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-22 12:58:38 +08:00
YdrMaster 3efb0a9963 style: 调整用法
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-22 09:00:26 +08:00
YdrMaster b0d3edecac refactor: 修改 RefactorGraph 命名空间
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-21 17:39:33 +08:00
YdrMaster d18b26c5f6 fix: inputs 忘了初始化了
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-21 11:36:48 +08:00
YdrMaster 3e2904b18d refactor: 适配类内无名枚举 DataType
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-21 08:49:31 +08:00
YdrMaster c2b11b999f feat: 为所有边推导依赖变量
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-21 05:59:35 +08:00
YdrMaster e8f820f47b refactor: 简化编译器的 setInput
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-21 03:40:49 +08:00
YdrMaster 7edf1983dd feat: 支持执行器设置输入
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-20 17:18:35 +08:00
YdrMaster b80881f596 feat: 前端拆分编译器和执行器
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-20 17:07:20 +08:00
YdrMaster 0174ab73bc fix: 改正 run 的名字,并重新导出
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-20 15:52:09 +08:00
YdrMaster cb8dee1a20 feat: 修改 run 的定义,支持先构造 runtime 再传递给 run
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-20 15:46:10 +08:00
YdrMaster d0e57dbcb1 Merge commit '8f2597a508a22456569b38e0a540cf9833492fb7' into dev-dynamic-graph 2023-09-20 13:45:28 +08:00
YdrMaster 8a02847b62 feat: 支持导出模型带数据
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-20 13:35:40 +08:00
YdrMaster 86e6dc7fd9 feat: 导出张量时使用 numpy 结构以兼容任何数据类型
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-20 13:14:58 +08:00
YdrMaster 054e8b4990 feat: 支持 runCpu
fix: 正确实现获取折叠的输出
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-20 11:02:04 +08:00
YdrMaster 166e0c0a08 feat: 支持从前端取得折叠的输出
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-20 09:49:17 +08:00
YdrMaster 8086f3d34b fix: 必须保存 GlobalOutputs 以维护顺序访问
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-20 09:10:54 +08:00
YdrMaster 6cd08abad9 feat: 直接支持改边
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-19 17:46:35 +08:00
YdrMaster 7bdaea97ba fix: 改正导出中的笔误
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-19 17:10:16 +08:00
zhangyunze 216b4e0356 feat: support communication op 2023-09-19 14:41:03 +08:00
YdrMaster 742e876a96 fix: 改正一些算子的导出
fix: 前端需要保存一份后端以维持硬件上空间存在
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-19 14:17:55 +08:00
zhangyunze fca88cc6ba feat: support some ops 2023-09-19 14:12:32 +08:00
Haojie Wang 8f2597a508
fix bang runtime bug after merging distributed branch (#137) 2023-09-19 14:10:39 +08:00
YdrMaster 4fdcf97e32 fix: 正确应对匿名或重名的节点
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-19 10:54:01 +08:00
YdrMaster ca149065d4 feat: 支持用 numpy.ndarray 构造张量
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-18 18:22:15 +08:00
YdrMaster 8e4e392a49 feat: 导出数据
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-18 16:57:41 +08:00
YdrMaster 04c2725312 feat: 正确传入数据并保存输出
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-18 16:50:00 +08:00
YdrMaster 3f297b9757 Merge commit '48ec730579c7e5f5da203f4a77991cee5ccf8b82' into dev-dynamic-graph
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-18 16:29:27 +08:00
YdrMaster 030fdc0bd5 fmt
feat: 添加拷贝数据的必要代码
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-18 16:25:42 +08:00
zhangyunze a8f8d504f4 feat: support new graph to old runtime 2023-09-18 16:05:48 +08:00
kilinchange 48ec730579
Support kvcache (#134)
* add cmake bits about NCCL

* move example to examples/NNmodel

* impl NCCL communicator

* add comm related function to Runtime

* export runtime interface

* add launch.py

* use unique name to distingush the the NCCL ID file

* add timeout to communicator init

* expose communicator obj from runtime obj, add unit test for nccl communicator

* reformat files

* Add allReduce operator and cuda nccl allReduce kernel

* impl model parallel for resnet

* add allGather nccl kernel and operator

* Add allreduce allgather operator tests, change allgather kernel to output list of tensor, fix shape infer, handle nullptr output

* fix format of onnx.py

* use concat following AllGather

* get tensor parallel for resnet

* fix format of graph_handler.cc

* change BUILD_DIST default to OFF

* polish code of communicator

* update .gitignore

* export min/max to python

* fix MatMul

* modify launch.py to run opt

* hack to treat ReduceSum as AllReduceSum

* throw exception in cuda error

* fix parallel_opt.py

* improve the error prompt and cuda error check

* fix GatherObj::GatherObj member init

* fix size calculation for scalar (rank = 0) tensor

* MatMul supports bias

* fix add bias for row parallel gemm

* add --gen_std to launch.py

* fix AllReduceNCCL

* update launch.py

* less log

* update parallel_opt

* update launch.py

* add __eq__ for Placement sub-classes

* less benchmark run

* fix placement infer for matmul

* fix vacabuary size

* fix Exception

* Add shard tensor with group to support gpt2

* Add find successor function to find split op at different depth

* recover CommunicatorObj

* improve error mesasge

* optimize parallel_opt.py

* optimize launch.py

* recover docs for all_reduce and all_gather

* - support concat for kvcache

* - modify allocator

* - add tensorType
- modify allocator to support memory allocation based on tensorType

* - fix allocator init

* - support kvcache by running 2 stub distributively

* - fix name

* - remove unused flag

* - fix wrong pb name

* - fix as constroy suggessed

* - fix launch.py format

---------

Co-authored-by: constroy <constroy.li@gmail.com>
Co-authored-by: panzezhong <panzezhong@qiyuanlab.com>
2023-09-18 14:17:02 +08:00
YdrMaster e637f9e7dd feat: 支持导入和推导通信算子
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-18 13:27:28 +08:00
YdrMaster 97439bd860 build: 删除无效代码
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-16 17:14:18 +08:00
YdrMaster 24db46f01e feat: 支持导出所有张量的信息,只差数据了
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-16 16:42:17 +08:00
YdrMaster d5a7713c7d refactor: 非 onnx 算子也能导出为自定义算子
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-16 14:24:29 +08:00
YdrMaster a795364612 feat: 初步支持模型导出,不能导出属性张量,也不能导出张量的数据
Signed-off-by: YdrMaster <ydrml@hotmail.com>
2023-09-16 14:20:08 +08:00