Closed
[Requirement|需求建议]: runtime配置简化 #983
LordOfMysteriesAdd on  Mar 28Closed at  Apr 24
LordOfMysteries
LordOfMysteriesCollaborators
Mar 28 Create

Welcome to submit task tracking issues and collaborate with team members.

任务描述

    "runtime": {
        "device_sched_mode": 0,
        "stitch_function_inner_memory": 10,
        "stitch_function_outcast_memory": 50,
        "stitch_function_num_initial": 128,
        "stitch_function_max_num": 0,
        "stitch_function_num_step": 0,
        "stitch_cfgcache_size": 0,
        "stitch_function_size": 20000,
        "triple_stream_sched": true,
        "run_mode": 0,
        "valid_shape_optimize": 0,
        "ready_on_host_tensors": []
    }

当前上面某些配置没有全下掉,需要从前端去掉,最终只保留:

        "device_sched_mode": 0,
        "run_mode": 0,
        "stitch_function_max_num": 128,
        "valid_shape_optimize": 0,
        "ready_on_host_tensors": []

任务目标

(1)stitch相关的配置都下掉,都只用stitch_function_max_num代替:

        "stitch_function_inner_memory": 10,
        "stitch_function_outcast_memory": 50,
        "stitch_function_num_initial": 128,
        "stitch_function_num_step": 0
       
  代码中相关内存估算的系数统一到stitch_function_max_num,同时有后续几种优化方向:
       (1):stitch提交阈值检查先去掉stitch_function_max_num的检查,根据内存上限判断。
       (2):考虑变成内存大小的配置,按照内存大小做stitch,界面输出stitch内存占用大小,冗余了多少,可以供给用户按需调整。
	   (3):ctrl  cpu做stitch时 跟sche cpu增加通讯,根据sche cpu的状态决定stitch是否下发,消除sche空等时间。

(2)triple_stream_sched

     	三级流水配置彻底下掉
    	二级流水源码全部删除
 

(3)stitch_cfgcache_size

		此配置目前不影响实际申请的device大小,仅相当于一个使能开关,用于开启是否做hostcache,实际申请的device内存大小是内部计算出来的。
        配置去掉相当于所有场景默认都开启,换句话说,后续只有遇到值依赖后的部分在device做,其余stitch都在host侧完成。
        性能方面考虑到我们大都是devicebound场景,默认开启影响不大。

(4)"stitch_function_size"

		原本默认值20000,上限65535。
    	改成内部常量且设为20000。做此调整后,对应的几个taskqueue的内存相当于改成了定值,不适合再放在general元数据内存中估算最大值,会造成内存浪费。因此同步将其转移到stitchpool的内存中计算。测试中发现极限场景2mb的DUPPED_STITCH空间不够,会把READY_QUE的空间挤占光,导致一个devTask都下发不了。后续DUPPED_STITCH的空间要考虑下改成根据stitch_function_size的值评估,不能写死2mb。
likedislike
LordOfMysteriesLordOfMysteriesCollaborators
Mar 28 Assign LordOfMysteries as responsible person
LordOfMysteriesLordOfMysteriesCollaborators
Mar 28 Associated pull request
Jie Yin
Jie YinCollaborators
Mar 29 Comments:

已关联PR

likedislike
Jie YinJie YinCollaborators
Mar 29 Added label: Machine
LordOfMysteriesLordOfMysteriesCollaborators
Apr 7 Change title to "[Requirement|需求建议]: runtime配置简化", originally titled "[Task|任务跟踪]: runtime配置简化".
LordOfMysteries
LordOfMysteriesCollaborators
Apr 7 Comments:

第一部分已合入

likedislike
LordOfMysteriesLordOfMysteriesCollaborators
Apr 9 Associated pull request
5 event messages are collapsed here。 See more
LordOfMysteriesLordOfMysteriesCollaborators
Apr 14 Modify description of issue
LordOfMysteries
LordOfMysteriesCollaborators
Apr 14 Comments:

pangu: 65535 --> 4mb:盘古使用最新的配置性能更好,先不改成最大值

likedislike
LordOfMysteriesLordOfMysteriesCollaborators
Apr 14 Associated pull request
6 event messages are collapsed here。 See more
wan_jianfenwan_jianfenCollaborators
Apr 23 Reopen issue
LordOfMysteries
LordOfMysteriesCollaborators
Apr 24 Comments:

已完成

likedislike
LordOfMysteriesLordOfMysteriesCollaborators
Apr 24 changed custom state from 进行中 to 已完成
LordOfMysteriesLordOfMysteriesCollaborators
Apr 24 Close issue