| Files | Last commit | Last update |
|---|---|---|
style(all): Remove trailing whitespace and add missing EOF newlines | 4 months ago | |
feat(ir): Migrate pypto_pro Python IR layer part2 Co-authored-by: wuzhongxin<wuzhongxin1@huawei.com> # message auto-generated for no-merge-commit merge: !4581 merge ft2 into master feat(ir): Migrate pypto_pro Python IR layer part2 Created-by: wuzhongxin Commit-by: wuzhongxin Merged-by: cann-robot Description: PR 应该避免没有描述信息, 描述信息的最重要的作用是描述修改意图,应该清晰明了. 例如: 标题中包含了 fix 标签, 如果没有描述信息,就需要Review人员猜测PR具体修复了哪些内容,或者怀疑修改的必要性. 如果PR和特定的Issue相关,可以单独包含一行 Related Issue: 放到描述信息最后. 下面是一个典型的PR描述信息: The origin issue template brings too many noise, it's not suitable for git message. eg: comments are not removed, labels are redundant as the PR tile already contains the tag. The guide gives a clear suggestion on how to write the PR body. Related Issue: #1234,#5678 更多描述信息见:[Commit Message 规范](../docs/zh/contribute/pull-request.md#commit-message) See merge request: cann/pypto!4581 | 4 months ago | |
feat(pypto_pro): Add pypto language module Co-authored-by: gravel1997<shili19@huawei.com> # message auto-generated for no-merge-commit merge: !4725 merge pro_migration into master feat(pypto_pro): Add pypto language module Created-by: gravel1997 Commit-by: gravel1997 Merged-by: cann-robot Description: Introduce the pypto_pro.language module — a DSL parser subsystem that converts high-level Python DSL code into IR (Intermediate Representation) structures. It adds 17 new files under python/pypto_pro/language/: - _api.py: Declares all user-facing pl.xxx API functions (load/store, binary/unary ops, reductions, matmul, quantization, VF namespace, control flow, etc.) as non-executable stubs for IDE support and type checking. - parser/decorator.py: Entry-point decorators (@function, @inline, @program) that intercept DSL functions and parse their AST. - parser/_ast_parser.py: Core AST traversal, parameter binding, and function parsing. - parser/_call_parser.py: Translates pl.xxx() calls to IR op calls, handles return type inference and VF ops. - parser/_type_resolver.py: Resolves Python type annotations to IR types, including tensor shapes and memory spaces. - parser/_expression_parser.py: Parses Python expressions (binops, subscripts, constexpr, tuples) into IR. - parser/_assignment_parser.py, _control_flow_parser.py, _buffer_parser.py, _scope_manager.py, _struct_parser.py, _op_pipeline.py, _expr_evaluator.py, _span_tracker.py, _utils.py, text_parser.py: Supporting parsers for assignments, loops, tile groups, scoping, structs, expression evaluation, and span tracking. The module is consumed via import pypto_pro.language as pl and provides the decorator-based DSL parsing pipeline that turns annotated Python functions into IR builder programs. See merge request: cann/pypto!4725 | 4 months ago |