sophgo / tpu-mlir

Machine learning compiler based on MLIR for Sophgo TPU.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

init_group_data_secs

qiuliang1993 opened this issue · comments

hi,大佬,我看了下最新版的code,在初始化N和H方向的tiling次数时,为什么input tensor和output tensor所占用的buffer size计算了两次呢?
image

commented

这里分别计算了3组local mem size,分别是input,output,buffer的local mem size。第二次计算input,output的local mem size,是为了作为getBufferSize输入,计算buffer的local mem size。这里也可以只计算一次,保存结果,给到第二次使用。

好的,非常感谢,我还有一个疑问:
执行了init_group_data_secs后,为什么在后面还会重新再次计算hsecs和nsecs

commented

这里主要是计算group中每个op所需要的local mem size。得到占用local mem size最大的op。然后对该op进行n维和h维的切割,得到hsecs和nsecs。

好的,明白前后处理关系了,非常感谢