PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
21.63k stars 5.44k forks source link

[CINN]Support 0D Tensor and Expr in AST IR #63909

Closed Aurelius84 closed 1 week ago

Aurelius84 commented 1 week ago

PR Category

CINN

PR Types

Bug fixes

Description

Pcard-67164

在CINN AST 层面支持了0D Tensor,具体包括:

  1. 在ir::Tensor的构造函数统一兼容适配0D shape场景,移除Lowering层的空shape判断
  2. 在ir::Tensor的其他构造函数里添加ENFORCE,不允许类似sym_shape为空场景
  3. 在ir::Store、ir::Load、Tensor::operator() 处适配0D shape的场景,兼容处理indices
  4. 在融合策略处的添加适配逻辑,并在CombindAxes加了调试日志,提升调试体验
  5. 将所有涉及CHECK之处升级为PADDL_ENFORCE_XX
paddle-bot[bot] commented 1 week ago

你的PR提交成功,感谢你对开源项目的贡献! 请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。 Your PR has been submitted. Thanks for your contribution! Please wait for the result of CI firstly. See Paddle CI Manual for details.