CINN icon indicating copy to clipboard operation
CINN copied to clipboard

Compiler Infrastructure for Neural Networks

Results 100 CINN issues
Sort by recently updated
recently updated
newest added

其中 cinn/ir/fuse_block_model_fp16_test.cc 是softmax 在fp16下的测试case, kernel耗时,86微秒, 接近phi kernel的 82 微秒, 但是落后torch的 77.47 微秒 原因是,部分for loop没有进行merge,需要进一步merge,手动merge后,实测性能为 75 微秒,能够追平torch的实现

用新的测试框架增强auto-unroll测例。 该PR添加了2种cases: 1 ApplyOnMatmulWithUnroll:unroll矩阵乘的reduce轴,并检查block中的`auto_unroll_max_step`属性。 2 PureSpatial: 如果计算图中的算子类型均是Elementwise或者injective的,则不能进入auto-unroll

Need to test the condition of having same axis in axis attr.

这个PR主要是对融合算子lowering到ast进行升级,增加扩展性和兼容性,能够适配更加复杂的融合算子生成。 将elemenwise/kinjective/kbroadcast/reduce的循环融合放在一起。 此外,删除了旧的调度原语上的循环融合。

在 transpose 等算子中,vector axis 被作为一个传入参数,而在一般情况下,axis应该是一个整数,只表示某一个维度。在Paddle等其他项目中这个参数通常会被命名为perm。 这个问题在使用时通常不会造成太大的问题,但是在开发pass中有可能遇到一些潜在的BUG,例如在我开发 公共子表达式消除的[PR](https://github.com/PaddlePaddle/CINN/pull/1116 )中,需要开发一个可扩展的接口,这个接口需要根据参数名进行一些预处理,例如需要将负数的axis处理成正数,但是transpose的axis参数混淆了这个过程,现阶段只能增加判断特定算子名的方式来解决这个问题。 参考文档 1. https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/transpose_cn.html#transpose

PFCC

fix_issue583_remove_nullpoint: https://github.com/PaddlePaddle/CINN/issues/583 del: [An extra null pointer check is not needed in functions](https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null) like the following. [Buffer::DeallocHost](https://github.com/PaddlePaddle/CINN/blob/85ab4981a38926dc5c1dbf672762cec335d2b857/cinn/runtime/buffer.h#L77) [Shape::Resize](https://github.com/PaddlePaddle/CINN/blob/85ab4981a38926dc5c1dbf672762cec335d2b857/cinn/runtime/buffer.cc#L29)

contributor