Skip to content

refactor(ir): Rename block to tile across entire codebase#386

Merged
Hzfengsy merged 5 commits intohw-native-sys:mainfrom
Hzfengsy:issue-377-rename-block-to-tile
Mar 6, 2026
Merged

refactor(ir): Rename block to tile across entire codebase#386
Hzfengsy merged 5 commits intohw-native-sys:mainfrom
Hzfengsy:issue-377-rename-block-to-tile

Conversation

@Hzfengsy
Copy link
Copy Markdown
Member

@Hzfengsy Hzfengsy commented Mar 6, 2026

Summary

Resolves #377. Renames block to tile across the entire codebase to align the IR op names, DSL namespace, and internal identifiers with the TileType/TileExpr type system.

BREAKING CHANGE: All block.* IR op names are now tile.*. The pl.block DSL namespace is removed — use pl.tile.* instead.

Changes

  • IR op names: All REGISTER_OP("block.*") / REGISTER_BACKEND_OP("block.*")"tile.*" (~90 registrations)
  • C++ identifiers: DeduceBlock*DeduceTile*, MakeBlock*MakeTile*, BlockOpTileOp, IncoreBlockOpsIncoreTileOps, ConvertTensorToBlockOpsConvertTensorToTileOps
  • Python create_op_call: All "block.*""tile.*" in tile_ops.py
  • File/dir renames: block_ops.pytile_ops.py, src/ir/op/block_ops/tile_ops/, convert_tensor_to_block_ops_pass.cppconvert_tensor_to_tile_ops_pass.cpp
  • Pass names: ConvertTensorToBlockOpsConvertTensorToTileOps (C++ header, binding, type stub, pass manager)
  • DSL namespace: pl.block removed; pl.tile is the only namespace
  • Printer: Removed now-unnecessary block.tile. translation
  • Tests: All test function names, assertions, and docstrings updated
  • Docs: All English and Chinese documentation updated
  • get_block_idx: Intentionally kept (domain term for hardware block index)

Testing

  • All 1810 unit tests pass
  • Code review completed
  • Clang-tidy clean
  • All pre-commit hooks pass (clang-format, cpplint, ruff, pyright, markdownlint)
  • Documentation updated (en + zh-cn)

Related Issues

Closes #377

…sys#377)

BREAKING CHANGE: All `block.*` IR op names are now `tile.*`. The
`pl.block` DSL namespace is removed. Use `pl.tile.*` instead.

- Rename all REGISTER_OP/REGISTER_BACKEND_OP from "block.*" to "tile.*"
- Rename C++ identifiers: DeduceBlock* -> DeduceTile*, MakeBlock* -> MakeTile*,
  BlockOp -> TileOp, IncoreBlockOps -> IncoreTileOps,
  ConvertTensorToBlockOps -> ConvertTensorToTileOps
- Rename Python files: block_ops.py -> tile_ops.py
- Rename C++ files/dirs: block_ops/ -> tile_ops/,
  convert_tensor_to_block_ops_pass -> convert_tensor_to_tile_ops_pass
- Update Python create_op_call strings, pass names, type stubs, bindings
- Remove deprecated pl.block alias (breaking change)
- Remove printer block->tile translation (no longer needed)
- Update all tests, docs (en + zh-cn), and examples
Copilot AI review requested due to automatic review settings March 6, 2026 07:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Renames the IR/operator namespace from block.* to tile.* across C++ IR, Python DSL, passes, codegen, tests, and docs to align naming with TileType/TileExpr, and removes the pl.block DSL namespace in favor of pl.tile.

Changes:

  • Replaces block.* op registrations/usages with tile.* and updates related pass/property names (ConvertTensorToTileOps, IncoreTileOps).
  • Updates Python DSL surface area (pl.tile.*, unified dispatch, parser routing) and Python bindings/type stubs.
  • Updates tests and documentation (en + zh-cn) to the new naming.

Reviewed changes

Copilot reviewed 107 out of 107 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/ut/language/parser/test_type_resolver.py Update DSL parsing/type-resolver tests to use pl.tile.*.
tests/ut/language/parser/test_printer_integration.py Update printer/parser round-trip expectations from pl.block to pl.tile.
tests/ut/language/parser/test_decorator.py Rename test referencing tile ops; still contains a block_* helper name (see comments).
tests/ut/language/parser/test_closure_var_resolution.py Update closure variable resolution tests to pl.tile.load/store.
tests/ut/ir/transforms/test_pass_manager.py Update pass manager expected pass name to ConvertTensorToTileOps.
tests/ut/ir/transforms/test_outline_incore_scopes.py Update scope outlining tests and docstrings for tile.*.
tests/ut/ir/transforms/test_init_memref.py Update InitMemRef tests to detect tile.alloc and tile.* ops.
tests/ut/ir/transforms/test_flatten_call_expr_pass.py Update flattening tests to use pl.tile.get_block_idx/load/store.
tests/ut/ir/transforms/test_convert_tensor_to_tile_ops.py Rename and update conversion pass tests to tile ops and new pass entrypoint.
tests/ut/ir/transforms/test_basic_memory_reuse.py Update memory reuse tests to tile.alloc and tile.* ops terminology.
tests/ut/ir/transforms/test_allocate_memory_addr_pass.py Update address allocation tests to count tile.alloc.
tests/ut/ir/printing/test_python_printer.py Update printer tests for tile.load/store (one stale “block” label remains; see comments).
tests/ut/ir/operators/test_operation_span_capture.py Update op span capture tests from block module to tile module.
tests/ut/ir/memory/test_memref.py Update MemRef parsing/printing tests to pl.tile.load.
tests/ut/codegen/test_pto_codegen_paged_attn.py Update codegen tests to lower tile.matmul instead of block.matmul.
tests/ut/codegen/test_pto_codegen.py Update PTO codegen tests and imports from block to tile.
tests/ut/codegen/test_cce_codegen.py Update CCE codegen tests and IRBuilder usage from block to tile.
tests/st/harness/core/harness.py Update system test harness kernels to use pl.tile.*.
tests/st/fuzz/src/kernel_generator.py Update fuzz kernel generator to strip tile. and detect tile.matmul.
tests/st/fuzz/src/golden_generator.py Update golden reference mapping keys from block.* to tile.*.
tests/st/fuzz/README.md Update fuzz docs from block-level to tile-level terminology.
tests/st/examples/01_beginner/basic/test_basic_ops.py Update system example docs to reference pl.tile.
tests/st/README.md Update system test README code snippets to pl.tile.*.
src/ir/verifier/property_verifier_registry.cpp Rename verifier property registration to IncoreTileOps.
src/ir/transforms/python_printer.cpp Update printer comments and special-casing from block.alloc to tile.alloc.
src/ir/transforms/outline_incore_scopes_pass.cpp Update outlining logic to detect tile.store instead of block.store.
src/ir/transforms/op_conversion_registry.cpp Update default tensor→tile op conversion mappings.
src/ir/transforms/ir_property.cpp Rename property stringification to IncoreTileOps.
src/ir/transforms/insert_sync_pass.cpp Update store special-case to tile.store.
src/ir/transforms/init_memref.cpp Rename memory rules table and alloc insertion to tile.*; update op prefix checks.
src/ir/transforms/convert_tensor_to_tile_ops_pass.cpp Rename conversion pass and property verifier to tile nomenclature and ops.
src/ir/transforms/basic_memory_reuse_pass.cpp Update cast/no-reuse and alloc cleanup to tile.cast / tile.alloc.
src/ir/transforms/allocate_memory_addr_pass.cpp Update alloc-address rewriting to match tile.alloc.
src/ir/op/tile_ops/unary.cpp Register unary ops under tile.* and update type deduction helpers/messages.
src/ir/op/tile_ops/transform.cpp Register transform ops under tile.* and update op category to TileOp.
src/ir/op/tile_ops/reduction.cpp Register reduction ops under tile.* and rename deduction helpers.
src/ir/op/tile_ops/memory.cpp Register memory ops under tile.* and update deduction helper names/messages.
src/ir/op/tile_ops/matmul.cpp Register matmul-family ops under tile.* and rename deduction helpers.
src/ir/op/tile_ops/broadcast.cpp Register broadcast/expand ops under tile.* and rename deduction helpers.
src/ir/op/tile_ops/batch_matmul.cpp Register batch matmul under tile.* and rename deduction helpers.
src/ir/op/README.md Update operator module docs from block_ops to tile_ops (contains outdated get_block_idx details; see comments).
src/codegen/orchestration/orchestration_codegen.cpp Treat tile.* as built-in ops for orchestration codegen dispatch.
src/codegen/cce/cce_codegen.cpp Update tensor access shape collector logic to tile.load/store.
reference/README.md Rename reference examples directory from block-level to tile-level.
python/pypto/pypto_core/passes.pyi Update pass/property enums and exported pass factory to tile naming.
python/pypto/pypto_core/ir.pyi Update op conversion docstrings from tensor→block to tensor→tile.
python/pypto/language/typing/tile.py Update Tile typing docs to “tile-level programming” terminology.
python/pypto/language/typing/init.py Update typing module docs to tile-level terminology.
python/pypto/language/parser/ast_parser.py Route pl.tile.* and unified ops dispatch to tile ops; remove pl.block.* path.
python/pypto/language/op/unified_ops.py Update unified dispatch to call tile ops rather than block ops.
python/pypto/language/op/tile_ops.py Rename DSL wrapper module from block ops to tile ops and adjust docs/imports (see comments on get_block_idx).
python/pypto/language/op/init.py Expose pl.tile namespace; promote tile-only ops from tile_ops.
python/pypto/language/init.py Expose pl.tile and promoted tile ops; remove pl.block exposure.
python/pypto/ir/pass_manager.py Update default pass pipeline to include ConvertTensorToTileOps.
python/pypto/ir/op_conversion.py Rename conversion utilities/docs from tensor→block to tensor→tile; update examples.
python/pypto/ir/op/init.py Expose IR tile ops module instead of block.
python/bindings/modules/passes.cpp Bind renamed pass/property names and update InitMemRef docstring references.
python/bindings/modules/ir.cpp Update binding docstring for op conversion registry to tensor→tile.
include/pypto/ir/verifier/verifier.h Rename verifier factory to CreateIncoreTileOpsPropertyVerifier.
include/pypto/ir/transforms/passes.h Rename pass API to ConvertTensorToTileOps and update docs accordingly.
include/pypto/ir/transforms/pass_properties.h Update pass property dependencies/outputs from IncoreBlockOps to IncoreTileOps.
include/pypto/ir/transforms/op_conversion_registry.h Update registry docs and examples from tensor→block to tensor→tile.
include/pypto/ir/transforms/ir_property.h Rename property enum value to IncoreTileOps.
include/pypto/ir/op_registry.h Update op category docs/examples to reference TileOp / tile.*.
include/pypto/codegen/codegen_base.h Update documentation examples to tile.* op names.
include/pypto/codegen/cce/code_context.h Update comment references to tile load/store.
include/pypto/codegen/cce/cce_codegen.h Update comments from block ops to tile ops terminology.
examples/ir_parser/paged_attention_with_incore.py Update example kernels to use pl.tile.full etc.
examples/ir_parser/paged_attention_example.py Update example kernels to use pl.tile.full etc.
docs/zh-cn/user/02-operation_reference.md Update op reference to pl.tile.* (see comments on get_block_idx wording).
docs/zh-cn/user/01-language_guide.md Update language guide from pl.block to pl.tile.
docs/zh-cn/dev/passes/07-allocate_memory_addr.md Update pass docs to tile.alloc terminology and examples.
docs/zh-cn/dev/passes/05-basic_memory_reuse.md Update pass docs to tile.alloc terminology and examples.
docs/zh-cn/dev/passes/04-init_memref.md Update pass docs to tile.* memory rules and examples.
docs/zh-cn/dev/passes/01-verifier.md Rename verifier property doc to IncoreTileOps.
docs/zh-cn/dev/passes/00-pass_manager.md Update pass manager docs to new pass/property names.
docs/zh-cn/dev/language/00-python_syntax.md Update syntax docs and examples to pl.tile.*.
docs/zh-cn/dev/ir/05-operators.md Update operator system docs to TileOp / tile_ops (see comments on get_block_idx).
docs/zh-cn/dev/ir/02-types.md Update type docs example to pl.tile.load.
docs/zh-cn/dev/codegen/01-cce_codegen.md Update codegen docs to show tile.* ops.
docs/zh-cn/dev/codegen/00-pto_codegen.md Update PTO codegen docs to show tile.* ops.
docs/en/user/02-operation_reference.md Update op reference to pl.tile.* (see comments on get_block_idx wording).
docs/en/user/01-language_guide.md Update language guide from pl.block to pl.tile.
docs/en/dev/passes/07-allocate_memory_addr.md Update pass docs to tile.alloc terminology and examples.
docs/en/dev/passes/05-basic_memory_reuse.md Update pass docs to tile.alloc terminology and examples.
docs/en/dev/passes/04-init_memref.md Update pass docs to tile.* memory rules and examples.
docs/en/dev/passes/01-verifier.md Rename verifier property doc to IncoreTileOps.
docs/en/dev/passes/00-pass_manager.md Update pass manager docs to new pass/property names.
docs/en/dev/language/00-python_syntax.md Update syntax docs and examples to pl.tile.*.
docs/en/dev/ir/05-operators.md Update operator system docs to TileOp / tile_ops (see comments on get_block_idx).
docs/en/dev/ir/02-types.md Update type docs example to pl.tile.load.
docs/en/dev/codegen/01-cce_codegen.md Update codegen docs to show tile.* ops.
docs/en/dev/codegen/00-pto_codegen.md Update PTO codegen docs to show tile.* ops.
README.zh-CN.md Update top-level README to reference tile ops example script name.
README.md Update top-level README to reference tile ops example script name.
CMakeLists.txt Update build sources from block_ops/* to tile_ops/* and pass filename rename.
.claude/rules/testing-and-examples.md Update examples directory naming from block-level to tile-level.
Comments suppressed due to low confidence (1)

python/pypto/language/op/tile_ops.py:257

  • The get_block_idx docstring now says it returns the index of the current "compute tile", but the op name is intentionally kept as a hardware block index term. To avoid ambiguity for users, consider describing it as the current hardware block index (and keep examples consistent with that terminology).

Comment thread docs/zh-cn/user/02-operation_reference.md Outdated
Comment thread docs/en/dev/ir/05-operators.md Outdated
Comment thread docs/zh-cn/dev/ir/05-operators.md Outdated
Comment thread tests/ut/language/parser/test_decorator.py Outdated
Comment thread tests/ut/ir/printing/test_python_printer.py Outdated
Comment thread src/ir/op/README.md
Comment thread docs/en/user/02-operation_reference.md Outdated
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the codebase by systematically renaming all instances of 'block' to 'tile' within the Intermediate Representation (IR) operations, DSL namespace, and internal identifiers. This change ensures consistency with the TileType/TileExpr type system, improving clarity and alignment across the project. It introduces a breaking change where block.* IR op names are now tile.*, and the pl.block DSL namespace is replaced by pl.tile.*.

Highlights

  • IR Op Name Renaming: All REGISTER_OP("block.*") and REGISTER_BACKEND_OP("block.*") instances have been renamed to "tile.*" across approximately 90 registrations.
  • C++ Identifier Updates: C++ identifiers such as DeduceBlock*, MakeBlock*, BlockOp, IncoreBlockOps, and ConvertTensorToBlockOps have been consistently renamed to their Tile* equivalents.
  • Python API and File Structure Changes: The Python create_op_call in tile_ops.py now uses "tile.*". File and directory renames include block_ops.py to tile_ops.py, src/ir/op/block_ops/ to tile_ops/, and convert_tensor_to_block_ops_pass.cpp to convert_tensor_to_tile_ops_pass.cpp.
  • Pass Name Updates: IR pass names like ConvertTensorToBlockOps have been updated to ConvertTensorToTileOps in C++ headers, bindings, type stubs, and the pass manager.
  • DSL Namespace Change: The pl.block DSL namespace has been removed, with pl.tile now being the sole namespace for tile-level operations.
  • Documentation and Tests Alignment: All English and Chinese documentation, as well as test function names, assertions, and docstrings, have been updated to reflect the tile terminology.
Changelog
  • .claude/rules/testing-and-examples.md
    • Updated example directory reference from block-level to tile-level.
  • CMakeLists.txt
    • Updated source file paths for IR operators from block_ops to tile_ops.
    • Updated source file path for convert_tensor_to_block_ops_pass.cpp to convert_tensor_to_tile_ops_pass.cpp.
  • README.md
    • Updated 'Block Operations Example' section title to 'Tile Operations Example'.
    • Updated example Python script path from block_ops_example.py to tile_ops_example.py.
  • README.zh-CN.md
    • Updated 'Block 操作示例' section title to 'Tile 操作示例'.
    • Updated example Python script path from block_ops_example.py to tile_ops_example.py.
  • docs/en/dev/codegen/00-pto_codegen.md
    • Updated block.load/block.store references to tile.load/tile.store in implicit lowering description.
    • Renamed 'Block Operations → PTO Instructions' section to 'Tile Operations → PTO Instructions'.
    • Updated all block.* operation examples to tile.* in the operator mappings table.
    • Updated block.load arguments reference to tile.load arguments.
    • Updated block.mul example to tile.mul.
  • docs/en/dev/codegen/01-cce_codegen.md
    • Updated IR operation table entries from block.* to tile.*.
    • Updated block.load/block.store reference to tile.load/tile.store in access shape collection description.
    • Updated Python code examples from block.load/block.add/block.store to tile.load/tile.add/tile.store.
    • Updated example Python code for tile_z = block.add(tile_x, tile_y) to tile_z = tile.add(tile_x, tile_y).
  • docs/en/dev/ir/02-types.md
    • Updated pl.block.load to pl.tile.load in code example.
  • docs/en/dev/ir/05-operators.md
    • Updated operator system description from 'BlockOp' to 'TileOp'.
    • Renamed 'BlockOp' category to 'TileOp' and updated its description and file location.
    • Renamed 'BlockOp: Hardware-Optimized Block Operations' section to 'TileOp: Hardware-Optimized Tile Operations'.
    • Updated 'Purpose', 'Location', 'Python API', and 'Design' descriptions to use 'tile' terminology.
    • Updated all operation names in the 'Operations' table from block.* to tile.*.
    • Updated 'Data Flow' description from block.{ops} to tile.{ops}.
    • Updated example Python code from from pypto.ir.op import block to from pypto.ir.op import tile and all block.* calls to tile.*.
    • Updated file path references from block_ops/ to tile_ops/.
  • docs/en/dev/language/00-python_syntax.md
    • Updated pl.block.load to pl.tile.load in code example.
    • Updated pl.block.load to pl.tile.load in explicit namespace example.
    • Updated unified dispatch comments from block.muls/block.exp to tile.muls/tile.exp.
    • Updated 'Block Operations (Tile-based computation)' section title to 'Tile Operations (Tile-based computation)'.
  • docs/en/dev/passes/00-pass_manager.md
    • Updated IncoreBlockOps property to IncoreTileOps.
    • Updated ConvertTensorToBlockOps pass to ConvertTensorToTileOps and its produced property to IncoreTileOps.
    • Updated required properties for InitMemRef, BasicMemoryReuse, InsertSync, and AllocateMemoryAddr to IncoreTileOps.
  • docs/en/dev/passes/01-verifier.md
    • Updated IncoreBlockOps property to IncoreTileOps.
  • docs/en/dev/passes/04-init_memref.md
    • Updated block.alloc operations to tile.alloc operations in overview.
    • Updated memory space assignment rules from block.load/block.move/block.store/block.matmul to tile.load/tile.move/tile.store/tile.matmul.
    • Updated required properties to IncoreTileOps.
    • Updated block.alloc statements to tile.alloc statements in algorithm steps.
    • Updated Python code examples from block.load/block.add/block.store to tile.load/tile.add/tile.store.
    • Updated Python code examples for mem_vec_2: MemRefType = block.alloc(...) to mem_vec_2: MemRefType = tile.alloc(...).
    • Updated key observations from block.alloc and block.store to tile.alloc and tile.store.
    • Updated test descriptions from block.alloc and block.store to tile.alloc and tile.store.
  • docs/en/dev/passes/05-basic_memory_reuse.md
    • Updated block.alloc statements to tile.alloc statements in overview.
    • Updated block.alloc statements to tile.alloc statements in algorithm steps.
    • Updated block.alloc AssignStmt to tile.alloc AssignStmt in alloc cleanup description.
    • Updated Python code examples from block.alloc/block.load/block.add to tile.alloc/tile.load/tile.add.
    • Updated block.alloc statements to tile.alloc statements in implementation details.
  • docs/en/dev/passes/07-allocate_memory_addr.md
    • Updated block.alloc statements to tile.alloc statements in overview.
    • Updated block.alloc AssignStmts to tile.alloc AssignStmts in algorithm steps.
    • Updated Python code examples from block.alloc/block.load/block.add to tile.alloc/tile.load/tile.add.
    • Updated block.alloc statement arguments to tile.alloc statement arguments in implementation details.
  • docs/en/user/01-language_guide.md
    • Updated operation level table from pl.block.* to pl.tile.*.
    • Updated Python code examples from block.add/block.mul_scalar/block.load/block.adds to tile.add/tile.mul_scalar/tile.load/tile.adds.
    • Updated usage guidance from pl.block.* to pl.tile.*.
  • docs/en/user/02-operation_reference.md
    • Updated pl.block.create/pl.block.create_tile to pl.tile.create/pl.tile.create_tile in unified operations table.
    • Renamed 'Data Movement (pl.block.*)' section to 'Data Movement (pl.tile.*)'.
    • Updated block.get_block_idx to tile.get_block_idx in data movement table.
    • Renamed 'Tile Arithmetic (pl.block.*)' section to 'Tile Arithmetic (pl.tile.*)'.
    • Renamed 'Tile Math (pl.block.*)' section to 'Tile Math (pl.tile.*)'.
    • Renamed 'Tile Reductions (pl.block.*)' section to 'Tile Reductions (pl.tile.*)'.
    • Renamed 'Linear Algebra (pl.block.*)' section to 'Linear Algebra (pl.tile.*)'.
    • Renamed 'Broadcast / Expand (pl.block.*)' section to 'Broadcast / Expand (pl.tile.*)'.
    • Renamed 'Comparison / Selection (pl.block.*)' section to 'Comparison / Selection (pl.tile.*)'.
    • Renamed 'Bitwise (pl.block.*)' section to 'Bitwise (pl.tile.*)'.
    • Renamed 'Activations (pl.block.*)' section to 'Activations (pl.tile.*)'.
    • Renamed 'Shape Operations (pl.block.*)' section to 'Shape Operations (pl.tile.*)'.
  • docs/zh-cn/dev/codegen/00-pto_codegen.md
    • Updated block.load/block.store references to tile.load/tile.store in implicit lowering description.
    • Renamed '块操作到 PTO 指令' section to 'Tile 操作到 PTO 指令'.
    • Updated all block.* operation examples to tile.* in the operator mappings table.
    • Updated block.load arguments reference to tile.load arguments.
    • Updated block.mul example to tile.mul.
    • Updated '块操作详情' to 'Tile 操作详情' in related links.
  • docs/zh-cn/dev/codegen/01-cce_codegen.md
    • Updated IR operation table entries from block.* to tile.*.
    • Updated block.load/block.store reference to tile.load/tile.store in access shape collection description.
    • Updated Python code examples from block.load/block.add/block.store to tile.load/tile.add/tile.store.
    • Updated example Python code for tile_z = block.add(tile_x, tile_y) to tile_z = tile.add(tile_x, tile_y).
  • docs/zh-cn/dev/ir/02-types.md
    • Updated pl.block.load to pl.tile.load in code example.
  • docs/zh-cn/dev/ir/05-operators.md
    • Updated operator system description from 'BlockOp' to 'TileOp'.
    • Renamed 'BlockOp' category to 'TileOp' and updated its description and file location.
    • Renamed 'BlockOp:硬件优化块操作' section to 'TileOp:硬件优化 Tile 操作'.
    • Updated '用途', '位置', 'Python API', and '设计' descriptions to use 'tile' terminology.
    • Updated all operation names in the '操作列表' table from block.* to tile.*.
    • Updated '数据流' description from block.{ops} to tile.{ops}.
    • Updated example Python code from from pypto.ir.op import block to from pypto.ir.op import tile and all block.* calls to tile.*.
    • Updated file path references from block_ops/ to tile_ops/.
  • docs/zh-cn/dev/language/00-python_syntax.md
    • Updated pl.block.load to pl.tile.load in code example.
    • Updated pl.block.load to pl.tile.load in explicit namespace example.
    • Updated unified dispatch comments from block.muls/block.exp to tile.muls/tile.exp.
    • Updated '块操作 (基于 Tile 的计算)' section title to 'Tile 操作 (基于 Tile 的计算)'.
  • docs/zh-cn/dev/passes/00-pass_manager.md
    • Updated IncoreBlockOps property to IncoreTileOps.
    • Updated ConvertTensorToBlockOps pass to ConvertTensorToTileOps and its produced property to IncoreTileOps.
    • Updated required properties for InitMemRef, BasicMemoryReuse, InsertSync, and AllocateMemoryAddr to IncoreTileOps.
  • docs/zh-cn/dev/passes/01-verifier.md
    • Updated IncoreBlockOps property to IncoreTileOps.
  • docs/zh-cn/dev/passes/04-init_memref.md
    • Updated block.alloc operations to tile.alloc operations in overview.
    • Updated memory space assignment rules from block.load/block.move/block.store/block.matmul to tile.load/tile.move/tile.store/tile.matmul.
    • Updated required properties to IncoreTileOps.
    • Updated block.alloc statements to tile.alloc statements in algorithm steps.
    • Updated Python code examples from block.load/block.add/block.store to tile.load/tile.add/tile.store.
    • Updated Python code examples for mem_vec_2: MemRefType = block.alloc(...) to mem_vec_2: MemRefType = tile.alloc(...).
    • Updated key observations from block.alloc and block.store to tile.alloc and tile.store.
    • Updated test descriptions from block.alloc and block.store to tile.alloc and tile.store.
  • docs/zh-cn/dev/passes/05-basic_memory_reuse.md
    • Updated block.alloc statements to tile.alloc statements in overview.
    • Updated block.alloc statements to tile.alloc statements in algorithm steps.
    • Updated block.alloc AssignStmt to tile.alloc AssignStmt in alloc cleanup description.
    • Updated Python code examples from block.alloc/block.load/block.add to tile.alloc/tile.load/tile.add.
    • Updated block.alloc statements to tile.alloc statements in implementation details.
  • docs/zh-cn/dev/passes/07-allocate_memory_addr.md
    • Updated block.alloc statements to tile.alloc statements in overview.
    • Updated block.alloc AssignStmts to tile.alloc AssignStmts in algorithm steps.
    • Updated Python code examples from block.alloc/block.load/block.add to tile.alloc/tile.load/tile.add.
    • Updated block.alloc statement arguments to tile.alloc statement arguments in implementation details.
  • docs/zh-cn/user/01-language_guide.md
    • Updated operation level table from pl.block.* to pl.tile.*.
    • Updated Python code examples from block.add/block.mul_scalar/block.load/block.adds to tile.add/tile.mul_scalar/tile.load/tile.adds.
    • Updated usage guidance from pl.block.* to pl.tile.*.
  • docs/zh-cn/user/02-operation_reference.md
    • Updated pl.block.create/pl.block.create_tile to pl.tile.create/pl.tile.create_tile in unified operations table.
    • Renamed '数据搬运(pl.block.*)' section to '数据搬运(pl.tile.*)'.
    • Updated block.get_block_idx to tile.get_block_idx in data movement table.
    • Renamed 'Tile 算术(pl.block.*)' section to 'Tile 算术(pl.tile.*)'.
    • Renamed 'Tile 数学(pl.block.*)' section to 'Tile 数学(pl.tile.*)'.
    • Renamed 'Tile 归约(pl.block.*)' section to 'Tile 归约(pl.tile.*)'.
    • Renamed '线性代数(pl.block.*)' section to '线性代数(pl.tile.*)'.
    • Renamed '广播/扩展(pl.block.*)' section to '广播/扩展(pl.tile.*)'.
    • Renamed '比较/选择(pl.block.*)' section to '比较/选择(pl.tile.*)'.
    • Renamed '位运算(pl.block.*)' section to '位运算(pl.tile.*)'.
    • Renamed '激活函数(pl.block.*)' section to '激活函数(pl.tile.*)'.
    • Renamed '形状操作(pl.block.*)' section to '形状操作(pl.tile.*)'.
  • examples/ir_builder/block_ops_example.py
    • Renamed to examples/ir_builder/tile_ops_example.py.
    • Updated docstrings and comments from 'block operations' to 'tile operations'.
    • Updated import from pypto.ir.op import block to pypto.ir.op import tile.
    • Updated all block.* calls to tile.*.
  • examples/ir_parser/paged_attention_example.py
    • Updated pl.block.full to pl.tile.full.
  • examples/ir_parser/paged_attention_with_incore.py
    • Updated pl.block.full to pl.tile.full.
  • include/pypto/codegen/cce/cce_codegen.h
    • Updated comment from 'block operations' to 'tile operations'.
    • Updated function brief from block.store to tile.store.
  • include/pypto/codegen/cce/code_context.h
    • Updated comment from block.load/store to tile.load/store.
  • include/pypto/codegen/codegen_base.h
    • Updated comment example from block.load to tile.load.
  • include/pypto/ir/op_registry.h
    • Updated comment examples from BlockOp to TileOp.
    • Updated comment examples from block.mul to tile.mul.
  • include/pypto/ir/transforms/ir_property.h
    • Renamed IncoreBlockOps enum value to IncoreTileOps.
  • include/pypto/ir/transforms/op_conversion_registry.h
    • Updated comment from block op to tile op.
    • Updated comment examples from block.add to tile.add.
  • include/pypto/ir/transforms/pass_properties.h
    • Renamed kConvertTensorToBlockOpsProperties to kConvertTensorToTileOpsProperties.
    • Updated kConvertTensorToBlockOpsProperties to produce IRProperty::IncoreTileOps.
    • Updated required properties for kInitMemRefProperties, kBasicMemoryReuseProperties, kInsertSyncProperties, and kAllocateMemoryAddrProperties to IRProperty::IncoreTileOps.
  • include/pypto/ir/transforms/passes.h
    • Updated comment from block.load/block.store to tile.load/tile.store.
    • Updated function brief from block ops to tile ops.
    • Renamed ConvertTensorToBlockOps() to ConvertTensorToTileOps().
  • include/pypto/ir/verifier/verifier.h
    • Renamed CreateIncoreBlockOpsPropertyVerifier() to CreateIncoreTileOpsPropertyVerifier().
  • python/bindings/modules/ir.cpp
    • Updated comment from tensor-to-block to tensor-to-tile.
    • Updated comment example from block.add to tile.add.
  • python/bindings/modules/passes.cpp
    • Updated IRProperty::IncoreBlockOps to IRProperty::IncoreTileOps.
    • Updated comment from block.load/block.store to tile.load/tile.store.
    • Updated convert_tensor_to_block_ops to convert_tensor_to_tile_ops.
  • python/pypto/ir/op/init.py
    • Updated module docstring from 'block' to 'tile'.
    • Removed block_ops import and added tile_ops import.
    • Updated __all__ to export tile instead of block.
  • python/pypto/ir/op/block_ops.py
    • Renamed to python/pypto/ir/op/tile_ops.py.
    • Updated module docstring from 'Block operations' to 'Tile operations'.
    • Updated create_op_call arguments from block.* to tile.*.
  • python/pypto/ir/op_conversion.py
    • Updated module docstring from tensor-to-block to tensor-to-tile.
    • Updated function docstring from tensor-to-block to tensor-to-tile.
    • Updated function docstring examples from block_ops.move/block_ops.matmul to tile_ops.move/tile_ops.matmul.
  • python/pypto/ir/pass_manager.py
    • Updated pass name from ConvertTensorToBlockOps to ConvertTensorToTileOps.
  • python/pypto/language/init.py
    • Updated module docstring from block to tile.
    • Removed block_ops import and added tile_ops import.
    • Removed block_ops from __all__ and added tile.
  • python/pypto/language/op/init.py
    • Updated module docstring from block to tile.
    • Removed block_ops import and added tile_ops import.
    • Removed block_ops from __all__ and added tile.
  • python/pypto/language/op/block_ops.py
    • Renamed to python/pypto/language/op/tile_ops.py.
    • Updated module docstring from 'Block operations' to 'Tile operations'.
    • Updated import from pypto.ir.op import block_ops to pypto.ir.op import tile_ops.
    • Updated docstring for get_block_idx from 'compute block' to 'compute tile'.
    • Updated example for get_block_idx from pl.block.get_block_idx() to pl.tile.get_block_idx().
  • python/pypto/language/op/unified_ops.py
    • Updated module docstring from block to tile.
    • Removed block_ops import and added tile_ops import.
    • Updated all _block.* calls to _tile.*.
  • python/pypto/language/parser/ast_parser.py
    • Updated comment from pl.block.* to pl.tile.*.
    • Updated parsing logic from pl.block to pl.tile and _parse_block_op to _parse_tile_op.
    • Updated hint message from pl.block.* to pl.tile.*.
    • Updated comment from block to tile.
    • Renamed _BLOCK_SCALAR_OPS to _TILE_SCALAR_OPS.
    • Renamed _BLOCK_OP_NAME_MAP to _TILE_OP_NAME_MAP.
    • Renamed _BLOCK_ONLY_OPS to _TILE_ONLY_OPS.
    • Updated dispatch logic from _BLOCK_ONLY_OPS to _TILE_ONLY_OPS and _parse_block_op to _parse_tile_op.
    • Updated dispatch logic from _BLOCK_SCALAR_OPS to _TILE_SCALAR_OPS and _parse_block_op to _parse_tile_op.
    • Updated hint message from pl.block.* to pl.tile.*.
  • python/pypto/language/typing/init.py
    • Updated docstring from 'Memory blocks in unified buffer memory for block-level programming' to 'Memory tiles in unified buffer memory for tile-level programming'.
  • python/pypto/language/typing/tile.py
    • Updated docstring from 'block' to 'tile'.
    • Updated class docstring from 'block' to 'tile'.
  • python/pypto/pypto_core/ir.pyi
    • Updated docstring from tensor-to-block to tensor-to-tile.
    • Updated docstring examples from block.add to tile.add.
  • python/pypto/pypto_core/passes.pyi
    • Updated IRProperty.IncoreBlockOps to IRProperty.IncoreTileOps.
    • Updated convert_tensor_to_block_ops to convert_tensor_to_tile_ops.
  • reference/README.md
    • Updated directory structure from block-level/ to tile-level/.
  • src/backend/910B_CCE/backend_910b_cce_ops.cpp
    • Updated comment from 'block operations' to 'tile operations'.
    • Renamed MakeBlockCastCodegenCCE to MakeTileCastCodegenCCE and updated its CHECK message.
    • Renamed MakeBlockCmpCodegenCCE to MakeTileCmpCodegenCCE and updated its CHECK message.
    • Renamed MakeBlockExpandsCodegenCCE to MakeTileExpandsCodegenCCE and updated its CHECK message.
    • Renamed MakeBlockLoadCodegenCCE to MakeTileLoadCodegenCCE and updated its CHECK messages.
    • Renamed MakeBlockStoreCodegenCCE to MakeTileStoreCodegenCCE and updated its CHECK messages.
    • Renamed MakeBlockMoveCodegenCCE to MakeTileMoveCodegenCCE and updated its CHECK message.
    • Renamed MakeBlockAllocCodegenCCE to MakeTileAllocCodegenCCE.
    • Renamed MakeBlockGetBlockIdxCodegenCCE to MakeTileGetBlockIdxCodegenCCE and updated its CHECK message.
    • Renamed MakeBlockCreateTileCodegenCCE to MakeTileCreateTileCodegenCCE.
    • Renamed MakeBlockFullCodegenCCE to MakeTileFullCodegenCCE.
    • Updated all REGISTER_BACKEND_OP(Backend910B_CCE, "block.*") to REGISTER_BACKEND_OP(Backend910B_CCE, "tile.*") and their corresponding CHECK messages and codegen function calls.
    • Renamed MakeBlockRowReductionCodegenCCE to MakeTileRowReductionCodegenCCE.
    • Renamed MakeBlockColReductionCodegenCCE to MakeTileColReductionCodegenCCE.
    • Renamed MakeBlockReductionCodegenCCE to MakeTileReductionCodegenCCE.
    • Renamed MakeBlockTransformCodegenCCE to MakeTileTransformCodegenCCE.
  • src/backend/910B_PTO/backend_910b_pto_ops.cpp
    • Renamed MakeBlockLoadCodegenPTO to MakeTileLoadCodegenPTO and updated its INTERNAL_CHECK messages.
    • Renamed MakeBlockStoreCodegenPTO to MakeTileStoreCodegenPTO and updated its INTERNAL_CHECK messages.
    • Renamed MakeBlockAllocCodegenPTO to MakeTileAllocCodegenPTO.
    • Updated kSimpleOps array entries from block.* to tile.*.
    • Updated all REGISTER_BACKEND_OP(Backend910B_PTO, "block.*") to REGISTER_BACKEND_OP(Backend910B_PTO, "tile.*") and their corresponding codegen function calls.
    • Updated block.reshape CHECK message to tile.reshape.
  • src/codegen/cce/cce_codegen.cpp
    • Updated comment from block.load/store to tile.load/store.
    • Updated comment from block.load/block.store to tile.load/tile.store.
  • src/codegen/orchestration/orchestration_codegen.cpp
    • Updated comment from block-level ops (block.*) to tile-level ops (tile.*).
    • Updated IsBuiltinOp to check for tile. instead of block..
  • src/ir/op/README.md
    • Updated directory name from block_ops/ to tile_ops/.
    • Updated 'Block-level operations' to 'Tile-level operations'.
    • Updated memory.cpp description from block_ops only to tile_ops only.
    • Updated 'Choose or create a category file' section from block_ops/ to tile_ops/.
    • Updated 'Block Operations' section title to 'Tile Operations'.
    • Updated all block.* operation names and file paths to tile.*.
  • src/ir/op/block_ops/batch_matmul.cpp
    • Renamed to src/ir/op/tile_ops/batch_matmul.cpp.
    • Updated file brief from 'block-level programming' to 'tile-level programming'.
    • Renamed DeduceBlockBatchMatMulType to DeduceTileBatchMatMulType and updated its CHECK message.
    • Updated REGISTER_OP("block.batch_matmul") to REGISTER_OP("tile.batch_matmul") and its category to TileOp.
  • src/ir/op/block_ops/broadcast.cpp
    • Renamed to src/ir/op/tile_ops/broadcast.cpp.
    • Updated file brief from 'block operations' to 'tile operations'.
    • Renamed DeduceBlockRowExpandType to DeduceTileRowExpandType and updated its CHECK message.
    • Renamed DeduceBlockColExpandType to DeduceTileColExpandType and updated its CHECK message.
    • Renamed DeduceBlockExpandScalarType to DeduceTileExpandScalarType and updated its CHECK message.
    • Updated all REGISTER_OP("block.*") to REGISTER_OP("tile.*") and their categories to TileOp.
  • src/ir/op/block_ops/elementwise.cpp
    • Renamed to src/ir/op/tile_ops/elementwise.cpp.
    • Updated file brief from 'block operations' to 'tile operations'.
    • Renamed DeduceBlockOpElementwiseBinaryType to DeduceTileOpElementwiseBinaryType and updated its CHECK message.
    • Renamed DeduceBlockOpShiftBinaryType to DeduceTileOpShiftBinaryType and updated its CHECK message.
    • Renamed DeduceBlockOpScalarBinaryType to DeduceTileOpScalarBinaryType and updated its CHECK message.
    • Renamed DeduceBlockOpIntScalarBinaryType to DeduceTileOpIntScalarBinaryType and updated its CHECK message.
    • Renamed DeduceBlockOpTernaryType to DeduceTileOpTernaryType and updated its CHECK message.
    • Renamed DeduceBlockOpTriTileType to DeduceTileOpTriTileType and updated its CHECK message.
    • Renamed DeduceBlockOpTileScalarTileType to DeduceTileOpTileScalarTileType and updated its CHECK message.
    • Renamed DeduceBlockOpXorScalarType to DeduceTileOpXorScalarType and updated its CHECK message.
    • Renamed DeduceBlockSelType to DeduceTileSelType and updated its CHECK message.
    • Renamed DeduceBlockSelScalarType to DeduceTileSelScalarType and updated its CHECK message.
    • Updated all REGISTER_OP("block.*") to REGISTER_OP("tile.*") and their categories to TileOp.
  • src/ir/op/block_ops/matmul.cpp
    • Renamed to src/ir/op/tile_ops/matmul.cpp.
    • Updated file brief from 'block operations' to 'tile operations'.
    • Renamed DeduceBlockMatMulType to DeduceTileMatMulType and updated its CHECK message.
    • Updated comment from 'block matmul' to 'tile matmul'.
    • Renamed DeduceBlockMatMulAccType to DeduceTileMatMulAccType and updated its CHECK message.
    • Updated comment from 'block matmul_acc' to 'tile matmul_acc'.
    • Renamed DeduceBlockMatMulBiasType to DeduceTileMatMulBiasType and updated its CHECK message.
    • Updated all REGISTER_OP("block.*") to REGISTER_OP("tile.*") and their categories to TileOp.
  • src/ir/op/block_ops/memory.cpp
    • Renamed to src/ir/op/tile_ops/memory.cpp.
    • Updated file brief from 'Memory block operations' to 'Memory tile operations'.
    • Renamed DeduceBlockGetBlockIdxType to DeduceTileGetBlockIdxType and updated its CHECK message.
    • Renamed DeduceBlockLoadType to DeduceTileLoadType and updated its CHECK message.
    • Renamed DeduceBlockStoreType to DeduceTileStoreType and updated its CHECK message.
    • Renamed DeduceBlockMoveType to DeduceTileMoveType and updated its CHECK message.
    • Renamed DeduceBlockAllocType to DeduceTileAllocType and updated its CHECK message.
    • Renamed DeduceBlockCreateTileType to DeduceTileCreateTileType and updated its CHECK message.
    • Renamed DeduceBlockFullType to DeduceTileFullType and updated its CHECK message.
    • Updated all REGISTER_OP("block.*") to REGISTER_OP("tile.*") and their categories to TileOp.
  • src/ir/op/block_ops/reduction.cpp
    • Renamed to src/ir/op/tile_ops/reduction.cpp.
    • Updated file brief from 'Reduction block operations' to 'Reduction tile operations'.
    • Renamed DeduceBlockReductionType to DeduceTileReductionType and updated its CHECK message.
    • Renamed DeduceBlockRowReductionType to DeduceTileRowReductionType and updated its CHECK message.
    • Updated all REGISTER_OP("block.*") to REGISTER_OP("tile.*") and their categories to TileOp.
  • src/ir/op/block_ops/transform.cpp
    • Renamed to src/ir/op/tile_ops/transform.cpp.
    • Updated file brief from 'Shape transformation block operations' to 'Shape transformation tile operations'.
    • Updated all REGISTER_OP("block.*") to REGISTER_OP("tile.*") and their categories to TileOp.
  • src/ir/op/block_ops/unary.cpp
    • Renamed to src/ir/op/tile_ops/unary.cpp.
    • Updated file brief from 'Unary block operations' to 'Unary tile operations'.
    • Renamed DeduceBlockUnaryType to DeduceTileUnaryType and updated its CHECK message.
    • Renamed DeduceBlockCastType to DeduceTileCastType and updated its CHECK message.
    • Updated block.cast CHECK message to tile.cast.
    • Updated all REGISTER_OP("block.*") to REGISTER_OP("tile.*") and their categories to TileOp.
  • src/ir/transforms/allocate_memory_addr_pass.cpp
    • Updated block.alloc to tile.alloc in MemRefUpdateMutator.
  • src/ir/transforms/basic_memory_reuse_pass.cpp
    • Updated block.cast to tile.cast in ComputeLifetimesFromDependencies.
    • Updated comment from block.cast to tile.cast in IdentifyReuseOpportunities.
    • Updated block.alloc to tile.alloc in IsUnusedAllocStmt.
  • src/ir/transforms/convert_tensor_to_block_ops_pass.cpp
    • Renamed to src/ir/transforms/convert_tensor_to_tile_ops_pass.cpp.
    • Updated comments from block.* to tile.*.
    • Updated comments from block.load/block.move to tile.load/tile.move.
    • Updated comments from tensor-to-block to tensor-to-tile.
    • Updated block.load to tile.load in TransformIncoreFunction.
    • Updated block.store to tile.store in TransformIncoreFunction.
    • Renamed ConvertTensorToBlockOps() to ConvertTensorToTileOps().
    • Renamed IncoreBlockOpsVerifier to IncoreTileOpsVerifier and updated its diagnostic message.
    • Renamed IncoreBlockOpsPropertyVerifierImpl to IncoreTileOpsPropertyVerifierImpl.
    • Renamed CreateIncoreBlockOpsPropertyVerifier() to CreateIncoreTileOpsPropertyVerifier().
  • src/ir/transforms/init_memref.cpp
    • Updated kBlockOpMemoryRules to kTileOpMemoryRules and its keys from block.* to tile.*.
    • Updated IsViewOperation to check for tile.reshape instead of block.reshape.
    • Updated MemRefUsageVisitor to check for tile. operations instead of block..
    • Updated block.store to tile.store in InitMemRefMutator.
    • Updated CreateAllocStatement to use tile.alloc.
    • Updated comments from block.alloc to tile.alloc.
    • Updated comments from block.load/block.move/block.store/block.matmul to tile.load/tile.move/tile.store/tile.matmul.
  • src/ir/transforms/insert_sync_pass.cpp
    • Updated block.store to tile.store in GetLeafMemRefs.
  • src/ir/transforms/ir_property.cpp
    • Updated IRProperty::IncoreBlockOps to IRProperty::IncoreTileOps.
  • src/ir/transforms/op_conversion_registry.cpp
    • Updated comments from block op to tile op.
    • Updated RegisterSimple calls from block.* to tile.*.
  • src/ir/transforms/outline_incore_scopes_pass.cpp
    • Updated comment from block.store to tile.store in StoreTargetCollector.
    • Updated block.store to tile.store in StoreEvalToAssignMutator.
    • Updated comment from block.store to tile.store in IncoreScopeOutliner.
  • src/ir/transforms/python_printer.cpp
    • Updated comment from block.matmul to tile.matmul.
    • Updated block.alloc to tile.alloc in special handling for arguments.
  • src/ir/verifier/property_verifier_registry.cpp
    • Updated IRProperty::IncoreBlockOps to IRProperty::IncoreTileOps.
  • tests/st/README.md
    • Updated pl.block to pl.tile in code example.
  • tests/st/examples/01_beginner/basic/test_basic_ops.py
    • Updated comment from pl.block to pl.tile.
  • tests/st/fuzz/README.md
    • Updated comment from block-level to tile-level.
  • tests/st/fuzz/src/fuzzer.py
    • Updated comment example from block.add to tile.add.
    • Updated comment from block.adds to tile.adds.
    • Updated _compute_unary_range op map from block.* to tile.*.
    • Updated _compute_binary_range op names from block.* to tile.*.
    • Updated compute_output_range op names from block.* to tile.*.
    • Renamed BLOCK_BINARY_OPS to TILE_BINARY_OPS and updated op names.
    • Renamed BLOCK_UNARY_OPS to TILE_UNARY_OPS and updated op names.
    • Renamed BLOCK_ROW_EXPAND_OPS to TILE_ROW_EXPAND_OPS and updated op names.
    • Renamed BLOCK_REDUCTION_OPS to TILE_REDUCTION_OPS and updated op names.
    • Renamed BLOCK_COL_REDUCTION_OPS to TILE_COL_REDUCTION_OPS and updated op names.
    • Renamed BLOCK_COL_EXPAND_OPS to TILE_COL_EXPAND_OPS and updated op names.
    • Renamed BLOCK_MATRIX_OPS to TILE_MATRIX_OPS and updated op names.
    • Updated self.basic_vector_ops to use TILE_BINARY_OPS and TILE_UNARY_OPS.
    • Updated self.advanced_vector_ops to use TILE_REDUCTION_OPS, TILE_ROW_EXPAND_OPS, and TILE_COL_EXPAND_OPS.
    • Updated self.matrix_ops to use TILE_MATRIX_OPS.
    • Updated abs_op search from BLOCK_UNARY_OPS and block.abs to TILE_UNARY_OPS and tile.abs.
    • Updated merge_op search from BLOCK_BINARY_OPS and block.add to TILE_BINARY_OPS and tile.add.
  • tests/st/fuzz/src/golden_generator.py
    • Updated TORCH_OP_MAP keys from block.* to tile.*.
    • Updated get_torch_operation docstring example from block.add to tile.add.
  • tests/st/fuzz/src/kernel_generator.py
    • Updated op.name.replace("block.", "") to op.name.replace("tile.", "").
    • Updated last_op.name == "block.matmul" to last_op.name == "tile.matmul".
    • Updated op_dict["op"].name == "block.matmul" to op_dict["op"].name == "tile.matmul".
  • tests/st/harness/core/harness.py
    • Updated pl.block.load/pl.block.add/pl.block.store to pl.tile.load/pl.tile.add/pl.tile.store.
  • tests/ut/codegen/test_cce_codegen.py
    • Updated import from pypto.ir.op import block to pypto.ir.op import tile.
    • Updated block.load/block.adds/block.store to tile.load/tile.adds/tile.store in code examples.
  • tests/ut/codegen/test_pto_codegen.py
    • Updated comment from block.load/store/mul/adds to tile.load/store/mul/adds.
    • Updated import from pypto.ir.op import block to pypto.ir.op import tile.
    • Updated block.load/block.store to tile.load/tile.store in code examples.
    • Renamed test_pto_codegen_block_load_lowering to test_pto_codegen_tile_load_lowering and updated its docstring.
    • Renamed test_pto_codegen_block_store_lowering to test_pto_codegen_tile_store_lowering and updated its docstring.
    • Renamed test_pto_codegen_block_mul to test_pto_codegen_tile_mul and updated its docstring.
    • Renamed test_pto_codegen_block_adds to test_pto_codegen_tile_adds and updated its docstring.
  • tests/ut/codegen/test_pto_codegen_ops.py
    • Updated docstring from Block-level Operations to Tile-level Operations.
    • Updated class docstring from block-level operations to tile-level operations.
    • Updated pl.block.add to pl.tile.add in kernel_add.
    • Updated pl.block.sub to pl.tile.sub in kernel_sub.
    • Updated pl.block.mul to pl.tile.mul in kernel_mul.
    • Updated pl.block.div to pl.tile.div in kernel_div.
    • Updated pl.block.adds to pl.tile.adds in kernel_adds.
    • Updated pl.block.subs to pl.tile.subs in kernel_subs.
    • Updated pl.block.muls to pl.tile.muls in kernel_muls.
    • Updated pl.block.divs to pl.tile.divs in kernel_divs.
    • Updated pl.block.neg to pl.tile.neg in kernel_neg.
    • Updated pl.block.exp to pl.tile.exp in kernel_exp.
    • Updated pl.block.sqrt to pl.tile.sqrt in kernel_sqrt.
    • Updated pl.block.rsqrt to pl.tile.rsqrt in kernel_rsqrt.
    • Updated pl.block.recip to pl.tile.recip in kernel_recip.
    • Updated pl.block.log to pl.tile.log in kernel_log.
    • Updated pl.block.abs to pl.tile.abs in kernel_abs.
    • Updated pl.block.relu to pl.tile.relu in kernel_relu.
    • Updated pl.block.maximum to pl.tile.maximum in kernel_maximum.
    • Updated pl.block.minimum to pl.tile.minimum in kernel_minimum.
    • Updated pl.block.cmp to pl.tile.cmp in kernel_cmp.
    • Updated pl.block.matmul to pl.tile.matmul in kernel_matmul.
    • Updated pl.block.matmul_acc to pl.tile.matmul_acc in kernel_matmul_acc.
    • Renamed build_block_ops_test_program to build_tile_ops_test_program and updated its docstring.
    • Updated class docstring from block-level operations to tile-level operations.
    • Renamed test_block_ops_codegen to test_tile_ops_codegen and updated its docstring.
    • Updated build_block_ops_test_program call to build_tile_ops_test_program.
  • tests/ut/codegen/test_pto_codegen_paged_attn.py
    • Updated pl.block.matmul to pl.tile.matmul in qk_matmul and pv_matmul.
    • Updated pl.block.sub/pl.block.fillpad/pl.block.muls/pl.block.row_max/pl.block.row_expand_sub/pl.block.exp/pl.block.cast/pl.block.row_sum to pl.tile.sub/pl.tile.fillpad/pl.tile.muls/pl.tile.row_max/pl.tile.row_expand_sub/pl.tile.exp/pl.tile.cast/pl.tile.row_sum in softmax_prepare.
    • Updated pl.block.maximum/pl.block.sub/pl.block.exp/pl.block.mul/pl.block.add/pl.block.row_expand_mul/pl.block.row_expand_div to pl.tile.maximum/pl.tile.sub/pl.tile.exp/pl.tile.mul/pl.tile.add/pl.tile.row_expand_mul/pl.tile.row_expand_div in online_update.
    • Renamed test_block_ops_codegen to test_tile_ops_codegen.
  • tests/ut/ir/memory/test_memref.py
    • Updated pl.block.load to pl.tile.load in code examples.
  • tests/ut/ir/operators/test_block_ops.py
    • Renamed to tests/ut/ir/operators/test_tile_ops.py.
    • Updated module docstring from 'block operations' to 'tile operations'.
    • Updated class docstring from block-level to tile-level.
    • Renamed test_block_add to test_tile_add and updated block.add to tile.add.
    • Renamed test_block_sub to test_tile_sub and updated block.sub to tile.sub.
    • Renamed test_block_mul to test_tile_mul and updated block.mul to tile.mul.
    • Renamed test_block_div to test_tile_div and updated block.div to tile.div.
    • Renamed test_block_muls to test_tile_muls and updated block.muls to tile.muls.
    • Renamed test_block_cmp to test_tile_cmp and updated block.cmp to tile.cmp.
    • Renamed test_block_cmps to test_tile_cmps and updated block.cmps to tile.cmps.
    • Updated class docstring from block-level to tile-level.
    • Renamed test_block_log to test_tile_log and updated block.log to tile.log.
    • Renamed test_block_abs to test_tile_abs and updated block.abs to tile.abs.
    • Renamed test_block_relu to test_tile_relu and updated block.relu to tile.relu.
    • Renamed test_block_exp to test_tile_exp and updated block.exp to tile.exp.
    • Renamed test_block_sqrt to test_tile_sqrt and updated block.sqrt to tile.sqrt.
    • Renamed test_block_neg to test_tile_neg and updated block.neg to tile.neg.
    • Updated class docstring from block-level to tile-level.
    • Renamed test_block_sum_axis0 to test_tile_sum_axis0 and updated block.sum to tile.sum.
    • Renamed test_block_sum_axis1 to test_tile_sum_axis1 and updated block.sum to tile.sum.
    • Renamed test_block_max_axis0 to test_tile_max_axis0 and updated block.max to tile.max.
    • Renamed test_block_max_axis1 to test_tile_max_axis1 and updated block.max to tile.max.
    • Renamed test_block_row_max to test_tile_row_max and updated block.create to tile.create and block.row_max to tile.row_max.
    • Renamed test_block_row_sum to test_tile_row_sum and updated block.create to tile.create and block.row_sum to tile.row_sum.
    • Renamed test_block_row_min to test_tile_row_min and updated block.create to tile.create and block.row_min to tile.row_min.
    • Renamed test_block_min_axis0 to test_tile_min_axis0 and updated block.min to tile.min.
    • Renamed test_block_min_axis1 to test_tile_min_axis1 and updated block.min to tile.min.
    • Updated class docstring from block-level to tile-level.
    • Renamed test_block_col_expand to test_tile_col_expand and updated block.col_expand to tile.col_expand.
    • Renamed test_block_col_expand_mul to test_tile_col_expand_mul and updated block.col_expand_mul to tile.col_expand_mul.
    • Renamed test_block_col_expand_div to test_tile_col_expand_div and updated block.col_expand_div to tile.col_expand_div.
    • Renamed test_block_col_expand_sub to test_tile_col_expand_sub and updated block.col_expand_sub to tile.col_expand_sub.
    • Renamed test_block_row_expand_add to test_tile_row_expand_add and updated block.row_expand_add to tile.row_expand_add.
    • Renamed test_block_row_expand_sub to test_tile_row_expand_sub and updated block.row_expand_sub to tile.row_expand_sub.
    • Renamed test_block_row_expand_div to test_tile_row_expand_div and updated block.row_expand_div to tile.row_expand_div.
    • Renamed test_block_row_expand_mul to test_tile_row_expand_mul and updated block.row_expand_mul to tile.row_expand_mul.
    • Renamed test_block_row_expand to test_tile_row_expand and updated block.row_expand to tile.row_expand.
    • Renamed test_block_expands to test_tile_expands and updated block.expands to tile.expands.
    • Updated class docstring from block-level to tile-level.
    • Renamed test_block_matmul to test_tile_matmul and updated block.matmul to tile.matmul.
    • Renamed test_block_matmul_acc to test_tile_matmul_acc and updated block.matmul_acc to tile.matmul_acc.
    • Renamed test_block_matmul_bias to test_tile_matmul_bias and updated block.matmul_bias to tile.matmul_bias.
    • Renamed test_block_gemv to test_tile_gemv and updated block.gemv to tile.gemv.
    • Renamed test_block_gemv_acc to test_tile_gemv_acc and updated block.gemv_acc to tile.gemv_acc.
    • Renamed test_block_gemv_bias to test_tile_gemv_bias and updated block.gemv_bias to tile.gemv_bias.
    • Updated class docstring from block-level to tile-level.
    • Renamed test_block_transpose to test_tile_transpose and updated block.transpose to tile.transpose.
    • Updated block.view to tile.view.
    • Updated block.reshape to tile.reshape.
    • Updated block.transpose to tile.transpose.
    • Updated ir.is_op_registered calls from block.* to tile.*.
    • Updated class docstring from block batch to tile batch.
    • Renamed test_batch_matmul_2d to test_tile_batch_matmul_2d and updated block.batch_matmul to tile.batch_matmul.
    • Renamed test_batch_matmul_3d to test_tile_batch_matmul_3d and updated block.batch_matmul to tile.batch_matmul.
    • Renamed test_batch_matmul_4d to test_tile_batch_matmul_4d and updated block.batch_matmul to tile.batch_matmul.
    • Renamed test_batch_matmul_broadcast to test_tile_batch_matmul_broadcast and updated block.batch_matmul to tile.batch_matmul.
    • Updated block.transpose to tile.transpose.
    • Updated block.row_max to tile.row_max.
    • Updated class docstring from block-level to tile-level.
    • Renamed test_block_rem to test_tile_rem and updated block.rem to tile.rem.
    • Renamed test_block_rems to test_tile_rems and updated block.rems to tile.rems.
    • Renamed test_block_and to test_tile_and and updated block.and to tile.and.
    • Renamed test_block_ands to test_tile_ands and updated block.ands to tile.ands.
    • Renamed test_block_or to test_tile_or and updated block.or to tile.or.
    • Renamed test_block_ors to test_tile_ors and updated block.ors to tile.ors.
    • Renamed test_block_xor to test_tile_xor and updated block.create to tile.create and block.xor to tile.xor.
    • Renamed test_block_xors to test_tile_xors and updated block.create to tile.create and block.xors to tile.xors.
    • Renamed test_block_shl to test_tile_shl and updated block.shl to tile.shl.
    • Renamed test_block_shls to test_tile_shls and updated block.shls to tile.shls.
    • Renamed test_block_maxs to test_tile_maxs and updated block.maxs to tile.maxs.
    • Renamed test_block_mins to test_tile_mins and updated block.mins to tile.mins.
    • Renamed test_block_shr to test_tile_shr and updated block.shr to tile.shr.
    • Renamed test_block_shrs to test_tile_shrs and updated block.shrs to tile.shrs.
    • Renamed test_block_shl_preserves_lhs_dtype to test_tile_shl_preserves_lhs_dtype and updated block.shl to tile.shl.
    • Renamed test_block_shr_preserves_lhs_dtype to test_tile_shr_preserves_lhs_dtype and updated block.shr to tile.shr.
    • Renamed test_block_prelu to test_tile_prelu and updated block.create to tile.create and block.prelu to tile.prelu.
    • Renamed test_block_not to test_tile_not and updated block.not to tile.not.
    • Renamed test_block_addc to test_tile_addc and updated block.addc to tile.addc.
    • Renamed test_block_subc to test_tile_subc and updated block.subc to tile.subc.
    • Renamed test_block_addsc to test_tile_addsc and updated block.addsc to tile.addsc.
    • Renamed test_block_subsc to test_tile_subsc and updated block.subsc to tile.subsc.
    • Renamed test_block_lrelu to test_tile_lrelu and updated block.lrelu to tile.lrelu.
    • Renamed test_block_sels to test_tile_sels and updated block.sels to tile.sels.
    • Renamed test_block_sel to test_tile_sel and updated block.sel to tile.sel.
    • Updated class docstring from block.load to tile.load.
    • Updated block.load to tile.load.
  • tests/ut/ir/operators/test_operation_span_capture.py
    • Updated import from pypto.ir.op import block as block_ops to pypto.ir.op import tile as tile_ops.
    • Updated class docstring from block operations to tile operations.
    • Renamed test_block_matmul_captures_span to test_tile_matmul_captures_span and updated block_ops.matmul to tile_ops.matmul.
    • Renamed test_block_add_captures_span to test_tile_add_captures_span and updated block_ops.add to tile_ops.add.
    • Renamed test_block_load_captures_span to test_tile_load_captures_span and updated block_ops.load to tile_ops.load.
    • Renamed test_block_exp_captures_span to test_tile_exp_captures_span and updated block_ops.exp to tile_ops.exp.
    • Renamed test_block_row_max_captures_span to test_tile_row_max_captures_span and updated block_ops.row_max to tile_ops.row_max.
    • Renamed test_block_explicit_span_override to test_tile_explicit_span_override and updated block_ops.add to tile_ops.add and span filename from block_ops.py to tile_ops.py.
  • tests/ut/ir/printing/test_python_printer.py
    • Renamed test_python_print_block_load_store to test_python_print_tile_load_store and updated its docstring.
    • Updated block.load to tile.load in test code and assertions.
    • Updated block.store to tile.store in test code and assertions.
    • Updated block.load to tile.load in kwargs test.
  • tests/ut/ir/transforms/test_allocate_memory_addr_pass.py
    • Updated count_alloc_operations docstring from block.alloc to tile.alloc and its implementation.
    • Updated get_alloc_addresses docstring from block.alloc to tile.alloc and its implementation.
    • Updated get_memref_addresses_from_tiles to skip tile.alloc.
    • Updated block.alloc to tile.alloc in test_alloc_statements_precede_non_allocs.
  • tests/ut/ir/transforms/test_basic_memory_reuse.py
    • Updated _count_alloc_stmts docstring from block.alloc to tile.alloc and its implementation.
    • Updated _get_alloc_memref_ids docstring from block.alloc to tile.alloc and its implementation.
    • Updated _build_program_with_allocs docstring from block.alloc to tile.alloc and block.store to tile.store.
    • Updated _build_program_with_allocs to use tile.alloc, tile.store, and tile.load.
    • Updated class docstring from block.alloc to tile.alloc.
    • Updated op_specs from block.load/block.add/block.store to tile.load/tile.add/tile.store.
    • Updated class docstring from block.cast to tile.cast.
  • tests/ut/ir/transforms/test_convert_tensor_to_block_ops.py
    • Renamed to tests/ut/ir/transforms/test_convert_tensor_to_tile_ops.py.
    • Updated module docstring from ConvertTensorToBlockOps to ConvertTensorToTileOps.
    • Updated class docstring from ConvertTensorToBlockOps to ConvertTensorToTileOps.
    • Updated test_simple_elementwise_add docstring from block.load/block.add/block.store to tile.load/tile.add/tile.store.
    • Updated pl.block.add to pl.tile.add in main_incore_0.
    • Updated passes.convert_tensor_to_block_ops() to passes.convert_tensor_to_tile_ops().
    • Updated test_two_tensor_inputs docstring from block.load to tile.load.
    • Updated pl.block.add to pl.tile.add in main_incore_0.
    • Updated passes.convert_tensor_to_block_ops() to passes.convert_tensor_to_tile_ops().
    • Updated pl.block.add/pl.block.mul to pl.tile.add/pl.tile.mul in main_incore_0.
    • Updated passes.convert_tensor_to_block_ops() to passes.convert_tensor_to_tile_ops().
    • Updated passes.convert_tensor_to_block_ops() to passes.convert_tensor_to_tile_ops().
    • Updated test_scalar_op_conversion docstring from block.adds to tile.adds.
    • Updated pl.block.adds to pl.tile.adds in main_incore_0.
    • Updated passes.convert_tensor_to_block_ops() to passes.convert_tensor_to_tile_ops().
    • Updated test_exp_conversion docstring from block.exp to tile.exp.
    • Updated pl.block.exp to pl.tile.exp in main_incore_0.
    • Updated passes.convert_tensor_to_block_ops() to passes.convert_tensor_to_tile_ops().
    • Updated test_no_spurious_loads_for_explicit_block_ops docstring from block ops to tile ops and block.move/block.matmul/block.store to tile.move/tile.matmul/tile.store.
    • Updated passes.convert_tensor_to_block_ops() to passes.convert_tensor_to_tile_ops().
    • Updated class docstring from ConvertTensorToBlockOps to ConvertTensorToTileOps.
    • Updated test_incore_with_if_branch docstring from block ops to tile ops.
    • Updated pl.block.add/pl.block.mul to pl.tile.add/pl.tile.mul in main_incore_0.
    • Updated passes.convert_tensor_to_block_ops() to passes.convert_tensor_to_tile_ops().
    • Updated pl.block.add to pl.tile.add in main_incore_0.
    • Updated passes.convert_tensor_to_block_ops() to passes.convert_tensor_to_tile_ops().
    • Updated pl.block.add/pl.block.mul to pl.tile.add/pl.tile.mul in main_incore_0.
    • Updated passes.convert_tensor_to_block_ops() to passes.convert_tensor_to_tile_ops().
  • tests/ut/ir/transforms/test_flatten_call_expr_pass.py
    • Updated pl.block.get_block_idx/pl.block.load/pl.block.store to pl.tile.get_block_idx/pl.tile.load/pl.tile.store in code examples.
  • tests/ut/ir/transforms/test_init_memref.py
    • Updated _get_alloc_stmts docstring from block.alloc to tile.alloc and its implementation.
    • Updated comments from block.load/block.add/block.store to tile.load/tile.add/tile.store.
    • Updated comment from block.alloc to tile.alloc.
    • Updated comments from block.load/block.move/block.matmul/block.store to tile.load/tile.move/tile.matmul/tile.store.
    • Updated comment from block.alloc to tile.alloc.
  • tests/ut/ir/transforms/test_insert_sync.py
    • Updated block.load/block.add/block.store to tile.load/tile.add/tile.store in code examples.
  • tests/ut/ir/transforms/test_outline_incore_scopes.py
    • Updated comment from block.store to tile.store.
    • Updated pl.block.full to pl.tile.full.
  • tests/ut/ir/transforms/test_pass_manager.py
    • Updated ConvertTensorToBlockOps to ConvertTensorToTileOps in pass names assertion.
  • tests/ut/language/parser/test_closure_var_resolution.py
    • Updated pl.block.load/pl.block.store to pl.tile.load/pl.tile.store in code examples.
  • tests/ut/language/parser/test_decorator.py
    • Updated comment from block operations to tile operations.
  • tests/ut/language/parser/test_printer_integration.py
    • Updated test_block_create_round_trip to test_tile_create_round_trip and updated pl.block.create to pl.tile.create in code and assertions.
  • tests/ut/language/parser/test_type_resolver.py
    • Updated pl.block.load/pl.block.store to pl.tile.load/pl.tile.store in code examples.
  • tests/ut/language/test_unified_ops.py
    • Updated module docstring from pl.block.X to pl.tile.X.
    • Updated class docstring from pl.block.X to pl.tile.X.
    • Updated pl.block.load/pl.block.add/pl.block.store to pl.tile.load/pl.tile.add/pl.tile.store in test_add.
    • Updated pl.block.load/pl.block.sub/pl.block.store to pl.tile.load/pl.tile.sub/pl.tile.store in test_sub.
    • Updated pl.block.load/pl.block.exp/pl.block.store to pl.tile.load/pl.tile.exp/pl.tile.store in test_exp.
    • Updated pl.block.load/pl.block.matmul/pl.block.store to pl.tile.load/pl.tile.matmul/pl.tile.store in test_matmul.
    • Updated pl.block.load/pl.block.create/pl.block.row_sum/pl.block.store to pl.tile.load/pl.tile.create/pl.tile.row_sum/pl.tile.store in test_row_sum.
    • Updated class docstring from pl.block.adds to pl.tile.adds.
    • Updated pl.block.load/pl.block.adds/pl.block.store to pl.tile.load/pl.tile.adds/pl.tile.store in test_add_tile_scalar.
    • Updated pl.block.load/pl.block.muls/pl.block.store to pl.tile.load/pl.tile.muls/pl.tile.store in test_mul_tile_scalar.
    • Updated pl.block.load/pl.block.subs/pl.block.store to pl.tile.load/pl.tile.subs/pl.tile.store in test_sub_tile_scalar.
    • Updated pl.block.load/pl.block.divs/pl.block.store to pl.tile.load/pl.tile.divs/pl.tile.store in test_div_tile_scalar.
    • Updated pl.block.load/pl.block.store to pl.tile.load/pl.tile.store in test_load_promoted.
Activity
  • All 1810 unit tests passed, ensuring the changes did not introduce regressions.
  • The code underwent a thorough review process.
  • Clang-tidy checks were clean, indicating adherence to coding standards.
  • All pre-commit hooks (clang-format, cpplint, ruff, pyright, markdownlint) passed.
  • Both English and Chinese documentation were updated to reflect the new terminology.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This is a comprehensive and well-executed refactoring to rename block to tile throughout the codebase. The changes are consistent across C++, Python, and documentation. I've identified a few minor areas, primarily in examples and test files, where the old block naming convention persists. Addressing these will ensure complete consistency.

Note: Security Review did not run due to the size of the PR.

Comment thread examples/ir_builder/tile_ops_example.py Outdated
Comment thread examples/ir_builder/tile_ops_example.py Outdated
Comment thread tests/ut/ir/operators/test_operation_span_capture.py Outdated
Comment thread tests/ut/ir/operators/test_tile_ops.py Outdated
- Fix get_block_idx descriptions to use "hardware block index" terminology
- Fix get_block_idx return type from INT32 to UINT64 in src/ir/op/README.md
- Rename build_block_* functions to build_tile_* in tile_ops_example.py
- Update print labels from "Block" to "Tile" in examples and tests
- Rename TestBlock* test classes to TestTile* in test_tile_ops.py
- Rename TestBlockOperationSpanCapture to TestTileOperationSpanCapture
- Rename block_add_scalar to tile_add_scalar in test_decorator.py
- Update debug print from "block.load" to "tile.load" in test_python_printer.py
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 6, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR systematically renames the "block" abstraction to "tile" across the codebase: IR ops and registrations, Python API exports, language parser and DSL, passes/properties/verifiers, codegen backends, transforms, examples, tests, and docs — updating registrations, pass names, enums, and related docstrings/signatures where applicable.

Changes

Cohort / File(s) Summary
Docs (all locales)
docs/en/..., docs/zh-cn/..., README.md, README.zh-CN.md, reference/README.md, .claude/rules/*
Replaced "Block" → "Tile" in headings, examples, mapping tables, and narrative; updated example filenames and directory refs from block_opstile_ops.
Build
CMakeLists.txt
Switched IR operator source paths from block_ops/*tile_ops/*; updated transform pass filename to convert_tensor_to_tile_ops_pass.cpp.
IR ops (C++)
src/ir/op/tile_ops/*, src/ir/op/README.md
Renamed operator registrations and type-deduction helpers (e.g., block.*/DeduceBlock*Typetile.*/DeduceTile*Type); op_category → TileOp.
IR transforms & passes (C++)
src/ir/transforms/*, include/pypto/ir/transforms/*
Renamed pass/property identifiers and verifiers (e.g., ConvertTensorToBlockOpsConvertTensorToTileOps, IncoreBlockOpsIncoreTileOps); updated string checks from block.*tile.*.
Codegen backends & orchestration
src/backend/910B_CCE/*, src/backend/910B_PTO/*, src/codegen/*, include/pypto/codegen/*
Renamed codegen helpers (MakeBlock*Codegen*MakeTile*Codegen*), updated backend registrations to tile.*, and switched tensor-access collection/checks to tile.load/tile.store.
IR runtime & registries
include/pypto/ir/op_registry.h, include/pypto/ir/verifier/*, include/pypto/ir/transforms/*
Updated enum/member names, docstrings, and registry entries to Tile variants; adjusted pass factory and verifier factory names.
Python bindings & public API
python/bindings/modules/*, python/pypto/*, python/pypto/pypto_core/*.pyi
Exposed IncoreTileOps in bindings, renamed binding factory convert_tensor_to_tile_ops, replaced public exports blocktile, and updated stubs/docstrings.
Language & parser (Python)
python/pypto/language/*, python/pypto/language/parser/ast_parser.py
Replaced block dispatch with tile dispatch (_parse_block_op_parse_tile_op, maps renamed), routed TileType calls to tile implementations, updated unified dispatch and error messages.
IR Python ops & conversion
python/pypto/ir/op/*, python/pypto/ir/op_conversion.py, python/pypto/ir/pass_manager.py
Removed block exports, added tile exports, updated op creation/conversion examples and pass manager entries to ConvertTensorToTileOps.
Examples
examples/ir_builder/tile_ops_example.py, examples/ir_parser/*
Renamed example functions/files from block_*tile_*, switched imports from pypto.ir.op.blockpypto.ir.op.tile, and replaced pl.block.*pl.tile.*.
Tests (unit, st, fuzz, harness)
tests/**, tests/st/**
Updated tests, harness, and fuzz mappings to tile.*; renamed test classes/methods and adjusted expected IR strings and helper maps accordingly.
Misc headers & tooling
python/pypto/language/*, include/pypto/codegen/*, src/ir/transforms/*, src/codegen/orchestration/*
Minor doc/comment updates and runtime op name checks switched to tile names (e.g., python_printer, op_conversion registry, orchestration built-ins).

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped through code and doc with style,
Swapped every "block" for a shining "tile".
From passes, ops, to tests so wild,
pl.tile now dances — tidy and agile.
A little rabbit's refactor smile.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 11

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (8)
docs/zh-cn/dev/language/00-python_syntax.md (1)

323-341: ⚠️ Potential issue | 🟡 Minor

Rename example identifier to avoid mixed terminology.

Line 323 switches the section to Tile terminology, but Line 329 still uses BlockExample. Please rename it (for example, TileExample) to avoid migration confusion in docs.

✏️ Suggested doc fix
-@pl.program
-class BlockExample:
+@pl.program
+class TileExample:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/zh-cn/dev/language/00-python_syntax.md` around lines 323 - 341, The
class name BlockExample should be renamed to TileExample to match the Tile
terminology used in this section; update the program class identifier in the
snippet (change BlockExample to TileExample) and ensure any internal references
to that class (e.g., decorators or external mentions) and the function tile_add
remain consistent so the example uses TileExample throughout.
docs/en/dev/language/00-python_syntax.md (2)

328-342: ⚠️ Potential issue | 🟡 Minor

Inconsistent class name BlockExample should be TileExample.

The class name BlockExample is inconsistent with the tile-based terminology used elsewhere. Since this is documentation demonstrating tile operations, consider renaming the class to TileExample to maintain consistency with the PR's objective.

📝 Suggested fix
 `@pl.program`
-class BlockExample:
+class TileExample:
     `@pl.function`
     def tile_add(
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/en/dev/language/00-python_syntax.md` around lines 328 - 342, Rename the
documentation class BlockExample to TileExample to match tile-based terminology:
locate the class declaration "class BlockExample" and change it to "class
TileExample" (retain the `@pl.program` decorator and the tile_add method and its
signature/contents unchanged) so all references and examples use TileExample
consistently.

149-151: ⚠️ Potential issue | 🟡 Minor

Stale comment references "block" instead of "tile".

The comment # Promoted from block should be updated to reflect the new terminology.

📝 Suggested fix
-pl.load(t, [0, 0], [64, 64])            # Promoted from block
+pl.load(t, [0, 0], [64, 64])            # Promoted from tile
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/en/dev/language/00-python_syntax.md` around lines 149 - 151, Update the
stale inline comment for the promoted op example: change the comment next to
pl.load(...) from “# Promoted from block” to “# Promoted from tile” (keep
pl.load and pl.create_tensor lines unchanged); ensure any other occurrences in
the same snippet that mention "block" are similarly updated to "tile" for
consistent terminology.
src/backend/910B_CCE/backend_910b_cce_ops.cpp (1)

257-262: ⚠️ Potential issue | 🟡 Minor

Add arity validation in MakeTileFullCodegenCCE.

This helper dereferences op->args_[1] without a size check, unlike surrounding helpers.

🔧 Proposed fix
 static std::string MakeTileFullCodegenCCE(const ir::CallPtr& op, codegen::CodegenBase& codegen_base) {
   auto& codegen = dynamic_cast<codegen::CCECodegen&>(codegen_base);
+  CHECK(op->args_.size() == 2) << "tile.full requires 2 arguments: target, scalar";
   std::string dst = codegen.GetCurrentResultTarget();
   std::string scalar = codegen.GetExprAsCode(op->args_[1]);
   codegen.Emit("TEXPANDS(" + dst + ", " + scalar + ");");
   return "";
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/backend/910B_CCE/backend_910b_cce_ops.cpp` around lines 257 - 262,
MakeTileFullCodegenCCE currently dereferences op->args_[1] without verifying the
argument count; add an arity check at the start of MakeTileFullCodegenCCE to
ensure op->args_.size() > 1 and handle the error path (e.g., emit a diagnostic
via codegen_base or codegen.GetLogger()/throw a clear std::runtime_error) before
accessing op->args_[1], then proceed to compute scalar and emit TEXPANDS as
before; reference the function MakeTileFullCodegenCCE and the op->args_ usage to
locate where to add the check.
src/ir/op/tile_ops/broadcast.cpp (1)

94-117: ⚠️ Potential issue | 🟠 Major

Enforce the tile.col_expand* shape contract during type deduction.

DeduceTileColExpandType currently skips shape validation for col_tile ([1, cols]) and target-column compatibility, so invalid inputs can type-check and leak downstream.

🔧 Proposed fix
 TypePtr DeduceTileColExpandType(const std::vector<ExprPtr>& args,
                                 const std::vector<std::pair<std::string, std::any>>& kwargs,
                                 const std::string& op_name) {
   CHECK(args.size() == 2) << "The operator " << op_name << " requires exactly 2 arguments, but got "
                           << args.size();

   // First argument is the target tile (shape to expand to)
   auto target_type = As<TileType>(args[0]->GetType());
   CHECK(target_type) << "The operator " << op_name << " requires first argument to be a TileType, but got "
                      << args[0]->GetType()->TypeName();

   // Second argument is the column tile to expand (shape [1, cols])
   auto col_type = As<TileType>(args[1]->GetType());
   CHECK(col_type) << "The operator " << op_name << " requires second argument to be a TileType, but got "
                   << args[1]->GetType()->TypeName();
+
+  const auto& target_shape = target_type->shape_;
+  const auto& col_shape = col_type->shape_;
+  CHECK(target_shape.size() >= 2) << "The operator " << op_name
+                                  << " requires target to have at least 2 dimensions, but got "
+                                  << target_shape.size() << " dimensions";
+  CHECK(col_shape.size() >= 2) << "The operator " << op_name
+                               << " requires col_tile to have at least 2 dimensions, but got "
+                               << col_shape.size() << " dimensions";
+
+  auto col_rows_const = As<ConstInt>(col_shape[col_shape.size() - 2]);
+  CHECK(col_rows_const && col_rows_const->value_ == 1)
+      << "The operator " << op_name << " requires col_tile rows to be 1, but got "
+      << (col_rows_const ? std::to_string(col_rows_const->value_) : "?");
+
+  auto target_cols_const = As<ConstInt>(target_shape[target_shape.size() - 1]);
+  auto col_cols_const = As<ConstInt>(col_shape[col_shape.size() - 1]);
+  if (target_cols_const && col_cols_const) {
+    CHECK(target_cols_const->value_ == col_cols_const->value_)
+        << "The operator " << op_name << " requires matching column dimensions, but got target cols="
+        << target_cols_const->value_ << " and col_tile cols=" << col_cols_const->value_;
+  }

   // Result has same shape as target, with promoted dtype
   auto result_dtype = PromoteDataTypes(target_type->dtype_, col_type->dtype_);
   CHECK(result_dtype) << "The operator " << op_name << " requires compatible data types";

   TileView tile_view;
-  tile_view.valid_shape = target_type->shape_;
-  return std::make_shared<TileType>(target_type->shape_, *result_dtype, std::nullopt, tile_view);
+  tile_view.valid_shape = target_shape;
+  return std::make_shared<TileType>(target_shape, *result_dtype, std::nullopt, tile_view);
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/ir/op/tile_ops/broadcast.cpp` around lines 94 - 117,
DeduceTileColExpandType must validate shapes: check target_type and col_type are
2-D (shape_.size() == 2), ensure col_type->shape_[0] == 1, and ensure
col_type->shape_[1] matches target_type->shape_[1] (same number of columns); if
any check fails, CHECK with a clear message including op_name and the offending
shapes; after these checks continue to promote dtypes and return the TileType
with tile_view.valid_shape set to target_type->shape_. Reference symbols:
DeduceTileColExpandType, target_type, col_type, result_dtype, and tile_view.
src/ir/op/tile_ops/elementwise.cpp (1)

47-85: ⚠️ Potential issue | 🟠 Major

Broadcasted outputs should derive valid_shape from both operands.

DeduceTileOpElementwiseBinaryType broadcasts shape_ but copies valid_shape from lhs only. In real broadcast cases this can mark large valid regions as invalid. The same pattern appears in other broadcasted deducers in this file.

🔧 Proposed fix (pattern to reuse in other deducers)
   auto broadcast_result = BroadcastShapes(tile_type1->shape_, tile_type2->shape_);
   CHECK(broadcast_result.success) << "The operator " << op_name << " requires compatible shapes, but got "
                                   << FormatShape(tile_type1->shape_) << " and "
                                   << FormatShape(tile_type2->shape_);
 
-  // TODO(YunjiQin): assumes both src tiles have the same valid_shape; may need refinement
-  // for cases where lhs and rhs have different valid_shapes (e.g. after broadcasting).
+  auto lhs_valid_shape = GetValidShape(tile_type1);
+  auto rhs_valid_shape = GetValidShape(tile_type2);
+  auto valid_shape_result = BroadcastShapes(lhs_valid_shape, rhs_valid_shape);
+  CHECK(valid_shape_result.success) << "The operator " << op_name
+                                    << " requires compatible valid_shapes, but got "
+                                    << FormatShape(lhs_valid_shape) << " and "
+                                    << FormatShape(rhs_valid_shape);
+
   TileView tile_view;
-  tile_view.valid_shape = GetValidShape(tile_type1);
+  tile_view.valid_shape = valid_shape_result.shape;
   return std::make_shared<TileType>(broadcast_result.shape, *result_dtype, std::nullopt, tile_view);
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/ir/op/tile_ops/elementwise.cpp` around lines 47 - 85,
DeduceTileOpElementwiseBinaryType currently copies valid_shape only from the
LHS, which is wrong for broadcasts; fix by computing valid shapes for both
operands (call GetValidShape on tile_type1 and tile_type2), broadcast/align
those two valid_shape vectors to the broadcast_result.shape (e.g. align trailing
dimensions and take the elementwise minimum/combined valid extents
per-dimension), and set tile_view.valid_shape to that broadcasted valid shape
before constructing the resulting TileType; apply the same pattern to other
elementwise/broadcast deducers in this file (use symbols
DeduceTileOpElementwiseBinaryType, GetValidShape, TileView, BroadcastShapes,
TileType to locate and update the code).
docs/en/dev/passes/04-init_memref.md (1)

22-29: ⚠️ Potential issue | 🟡 Minor

Align remaining “block-op conversion” wording with tile naming.

Line 28 still says “block-op conversion”, which conflicts with the rest of this page (tile.*, IncoreTileOps).

Proposed doc fix
-**When to use**: Run after SSA conversion, outlining, and block-op conversion. Required before BasicMemoryReuse, InsertSync, and AllocateMemoryAddr.
+**When to use**: Run after SSA conversion, outlining, and tile-op conversion. Required before BasicMemoryReuse, InsertSync, and AllocateMemoryAddr.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/en/dev/passes/04-init_memref.md` around lines 22 - 29, Update the
wording that currently reads "block-op conversion" to use tile-based terminology
to match the rest of the page (e.g., use "tile-op conversion" or "tile
conversion") so it aligns with tile.* naming and the IncoreTileOps pass; ensure
the sentence in the requirements/when-to-use section references the tile
conversion pass consistently with TypeChecked, SSAForm, SplitIncoreOrch, and
IncoreTileOps.
docs/zh-cn/dev/passes/04-init_memref.md (1)

22-29: ⚠️ Potential issue | 🟡 Minor

“使用时机”段落仍使用旧命名。

Line 28 的“块操作转换之后运行”建议改为“tile 操作转换之后运行”,避免与 IncoreTileOps 命名冲突。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/zh-cn/dev/passes/04-init_memref.md` around lines 22 - 29,
“使用时机”段落仍使用旧命名:把“在静态单赋值 (SSA) 转换、提取和块操作转换之后运行”中的“块操作转换”替换为“tile 操作转换”,并明确指向现用符号
IncoreTileOps(例如改为“在静态单赋值 (SSA) 转换、提取和 IncoreTileOps(tile 操作转换)之后运行”),保持与
SSAForm、BasicMemoryReuse、InsertSync 和 AllocateMemoryAddr 的先后关系不变。
🧹 Nitpick comments (9)
docs/zh-cn/dev/ir/05-operators.md (1)

257-257: Update example function name for consistency.

The example function name "block_computation" should be updated to "tile_computation" to align with the block→tile rename throughout this PR. While this is a string literal (not an IR operation reference), maintaining consistent terminology in documentation examples helps avoid confusion for readers learning the tile API.

📝 Suggested update
-with ib.function("block_computation") as f:
+with ib.function("tile_computation") as f:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/zh-cn/dev/ir/05-operators.md` at line 257, Update the example function
name string literal from "block_computation" to "tile_computation" so the docs
match the block→tile rename; specifically change the call
ib.function("block_computation") (and any other occurrences of that exact string
literal in this document) to ib.function("tile_computation") to keep terminology
consistent in the examples.
python/pypto/language/parser/ast_parser.py (1)

1474-1482: Add an explicit migration error for pl.block.*.

Line 1474 currently sends legacy pl.block.* calls into unified dispatch, which can produce a confusing “unknown operation: block” error. A dedicated branch would provide a clearer upgrade path.

Suggested patch
         # pl.{operation} (2-segment, unified dispatch or promoted ops)
+        if len(attrs) >= 3 and attrs[0] == "pl" and attrs[1] == "block":
+            raise UnsupportedFeatureError(
+                f"'pl.block.*' is no longer supported: {ast.unparse(call)}",
+                span=self.span_tracker.get_span(call),
+                hint="Use 'pl.tile.*' instead",
+            )
         if len(attrs) >= 2 and attrs[0] == "pl" and attrs[1] not in ("tensor", "tile", "system"):
             op_name = attrs[1]
             return self._parse_unified_op(op_name, call)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@python/pypto/language/parser/ast_parser.py` around lines 1474 - 1482, The
current dispatch sends legacy pl.block.* calls into _parse_unified_op causing an
unclear "unknown operation: block" error; add an explicit branch before calling
_parse_unified_op to detect when attrs[0] == "pl" and attrs[1] == "block" and
raise UnsupportedFeatureError with span=self.span_tracker.get_span(call), a
clear message using ast.unparse(call), and a hint directing users to the
migration path for pl.block.* (i.e., tell them pl.block.* is legacy and how to
migrate); keep the existing branch for other pl.* ops and still call
_parse_unified_op(op_name, call) for non-block cases.
tests/ut/codegen/test_pto_codegen_paged_attn.py (1)

183-184: Add verbose flag to pytest invocation for consistency.

Per repository conventions, pytest should be invoked with the verbose flag for consistent test output.

📝 Suggested fix
 if __name__ == "__main__":
-    pytest.main([__file__])
+    pytest.main([__file__, "-v"])

Based on learnings: "In Python test files, prefer invoking pytest programmatically via pytest.main([file, "-v"]) inside the if name == "main" guard."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/ut/codegen/test_pto_codegen_paged_attn.py` around lines 183 - 184, The
pytest invocation in the __main__ guard (the pytest.main call) is missing the
verbose flag; update the pytest.main([__file__]) call in
test_pto_codegen_paged_attn.py inside the if __name__ == "__main__": block to
include the "-v" option (e.g., pytest.main([__file__, "-v"])) so tests run with
verbose output per repository convention.
src/backend/910B_PTO/backend_910b_pto_ops.cpp (1)

235-236: Keep the load-codegen comment aligned with emitted IR.

The comment says pto.subview, but this function emits pto.partition_view.

📝 Suggested doc fix
-// tile.load: emit pto.subview + pto.tload (same format as original IR layer codegen)
+// tile.load: emit pto.partition_view + pto.tload (same format as original IR layer codegen)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/backend/910B_PTO/backend_910b_pto_ops.cpp` around lines 235 - 236, The
comment above MakeTileLoadCodegenPTO is inaccurate: it says "pto.subview" but
the function emits "pto.partition_view"; update the comment to match emitted IR
(e.g., mention pto.partition_view and pto.tload) so the doc aligns with the
generated code and avoid confusion when reading MakeTileLoadCodegenPTO.
tests/ut/language/test_unified_ops.py (1)

174-175: Rename the test class to match tile terminology.

TestUnifiedBlockDispatch still uses the old domain term while its docstring and body now test Tile dispatch.

♻️ Suggested rename
-class TestUnifiedBlockDispatch:
+class TestUnifiedTileDispatch:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/ut/language/test_unified_ops.py` around lines 174 - 175, The test class
name TestUnifiedBlockDispatch uses outdated "Unified" terminology but the
docstring and tests target Tile dispatch; rename the class to
TestTileBlockDispatch (or another Tile-prefixed name) to match the docstring and
test intent, update the class declaration in
tests/ut/language/test_unified_ops.py from class TestUnifiedBlockDispatch: to
class TestTileBlockDispatch: and adjust any references/usages in the test module
or other tests that import or parametrize this class so test discovery and
references remain correct.
tests/st/fuzz/src/fuzzer.py (1)

310-324: Convert mutable class-level operator pool lists to immutable tuples.

These TILE_*_OPS definitions are mutable class-level lists that should be immutable to follow best practices and prevent accidental mutations. While the current code concatenates these lists at instance initialization (creating instance copies and maintaining test isolation), converting them to tuples with ClassVar type hints provides stronger guarantees against future mutations.

♻️ Suggested pattern (apply to all `TILE_*_OPS` constants)
-from typing import Any
+from typing import Any, ClassVar
...
-    TILE_BINARY_OPS = [
+    TILE_BINARY_OPS: ClassVar[tuple[OpSpec, ...]] = (
         ...
-    ]
+    )

Also applies to: 327 (TILE_UNARY_OPS), 349 (TILE_ROW_EXPAND_OPS), 380 (TILE_REDUCTION_OPS), 411 (TILE_COL_REDUCTION_OPS), 447 (TILE_COL_EXPAND_OPS), 477 (TILE_MATRIX_OPS)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/st/fuzz/src/fuzzer.py` around lines 310 - 324, Convert the mutable
class-level operator pool lists (e.g., TILE_BINARY_OPS, TILE_UNARY_OPS,
TILE_ROW_EXPAND_OPS, TILE_REDUCTION_OPS, TILE_COL_REDUCTION_OPS,
TILE_COL_EXPAND_OPS, TILE_MATRIX_OPS) to immutable tuples and add ClassVar type
hints so they are not accidentally mutated; locate each OpSpec list definition
(such as the TILE_BINARY_OPS definition shown) and replace the surrounding list
literal [] with a tuple literal () and annotate the names with
typing.ClassVar[Tuple[OpSpec, ...]] (or the existing type alias) so the
constants are immutable at the class level while keeping instance concatenation
logic unchanged.
include/pypto/ir/verifier/verifier.h (1)

123-127: Consider a deprecated alias for the old factory name.

This header keeps compatibility aliases for other verifier factories; adding one for CreateIncoreBlockOpsPropertyVerifier would make C++ migration smoother.

♻️ Suggested compatibility shim
 PropertyVerifierPtr CreateIncoreTileOpsPropertyVerifier();
+
+[[deprecated("Use CreateIncoreTileOpsPropertyVerifier()")]]
+inline VerifyRulePtr CreateIncoreBlockOpsPropertyVerifier() {
+  return CreateIncoreTileOpsPropertyVerifier();
+}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@include/pypto/ir/verifier/verifier.h` around lines 123 - 127, Add a
deprecated compatibility alias for the old factory name so callers of
CreateIncoreBlockOpsPropertyVerifier still compile: declare an inline function
or forwarder named CreateIncoreBlockOpsPropertyVerifier() that simply calls and
returns CreateIncoreTileOpsPropertyVerifier(), mark it deprecated (e.g.,
[[deprecated]] or a macro used elsewhere) and place it alongside the existing
CreateIncoreTileOpsPropertyVerifier() declaration in the header so migration is
smooth for C++ users.
tests/ut/codegen/test_pto_codegen_ops.py (1)

12-13: Complete the naming migration by removing remaining Block identifiers.

The runtime behavior is fine, but test/program identifiers still mix old terminology (BlockOperationsTest, Test910BBlockOpsCodegen) with tile semantics, which makes the rename feel partial.

♻️ Suggested consistency rename
-@pl.program
-class BlockOperationsTest:
+@pl.program
+class TileOperationsTest:
@@
-def build_tile_ops_test_program(dtype: DataType = DataType.FP32):
+def build_tile_ops_test_program(dtype: DataType = DataType.FP32):
@@
-    return BlockOperationsTest
+    return TileOperationsTest
@@
-class Test910BBlockOpsCodegen:
+class Test910BTileOpsCodegen:

Also applies to: 181-181, 475-476, 486-490

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/ut/codegen/test_pto_codegen_ops.py` around lines 12 - 13, Rename
remaining test identifiers that use "Block" to use "Tile" to complete the
migration: update the class name BlockOperationsTest to TileOperationsTest and
Test910BBlockOpsCodegen to Test910BTileOpsCodegen (and any other occurrences of
"Block" in test names, variables, or identifiers within this file and the noted
locations) so all test/program identifiers consistently use "Tile"; ensure
references (imports, test discovery names, and any assertions referencing these
identifiers) are updated accordingly to avoid breaking tests.
examples/ir_builder/tile_ops_example.py (1)

148-149: Rename the generated IR function name to match tile terminology.

build_complex_tile_computation() still emits "complex_block_computation" as the function name, which is inconsistent with the rest of the migration.

♻️ Suggested rename
-    with ib.function("complex_block_computation") as f:
+    with ib.function("complex_tile_computation") as f:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/ir_builder/tile_ops_example.py` around lines 148 - 149, The emitted
IR function name inside build_complex_tile_computation() is still
"complex_block_computation" and should be renamed to use tile terminology (e.g.,
"complex_tile_computation"); update the code that constructs or returns the IR
function name within build_complex_tile_computation to use the new tile-based
name so it matches the rest of the migration and any references to the generated
function.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/en/dev/ir/05-operators.md`:
- Line 380: Update the mislabeled section title that currently reads "Block
operator implementations" to accurately say "Tile operator implementations"
wherever it references the directory `src/ir/op/tile_ops/` in this document;
find the heading or reference string "Block operator implementations" and
replace it with "Tile operator implementations" so the title matches the
`src/ir/op/tile_ops/` path and migration changes.

In `@docs/en/user/02-operation_reference.md`:
- Line 26: The signatures for create/create_tile and their pl.tile.* equivalents
are inconsistent: update the signature shown at `create` / `create_tile` so the
target_memory parameter shows the same default as documented later
(MemorySpace.Vec), or alternately remove the default at Line 61 — pick one
approach and apply it consistently across both `create` / `create_tile` and
`pl.tile.create` / `pl.tile.create_tile` entries so `target_memory` either
always has `= MemorySpace.Vec` or never does; edit the symbol signatures
(target_memory, MemorySpace.Vec, create/create_tile,
pl.tile.create/pl.tile.create_tile) to match the chosen consistent form.

In `@docs/zh-cn/dev/passes/00-pass_manager.md`:
- Line 38: 表格中 IncoreTileOps 的描述与名称不一致:将当前“使用块操作”的说明改为“使用 tile 操作”,即在文档中找到包含符号
IncoreTileOps(当前表格行)并把右侧描述替换为“使用 tile 操作”以保持名称与说明一致。

In `@docs/zh-cn/dev/passes/01-verifier.md`:
- Line 88: The rule description uses inconsistent terminology: the property is
named IncoreTileOps but the text says “块操作”; update the description to use “tile
操作” (or “tile-level 操作”) throughout so it matches the property name
IncoreTileOps and maintain consistency in the docs.

In `@docs/zh-cn/dev/passes/04-init_memref.md`:
- Around line 16-20: 将文档中不统一的术语修正为“tile” 前缀格式:把原文中的“其他块操作 -> Vec”更改为“其他 tile 操作
-> Vec”,以与同一段落中其它条目(tile.load/tile.move、tile.store、tile.matmul/tile.matmul_acc
以及其它 tile.* 描述)保持一致,并确保全文中所有类似表述均使用“tile .*”格式统一术语。

In `@docs/zh-cn/user/02-operation_reference.md`:
- Line 26: The docs show inconsistent signatures for create/create_tile: update
the first signature (the one listing | `create` / `create_tile` ...
`target_memory: MemorySpace` |) to indicate the default
`target_memory=MemorySpace.Vec` (or conversely remove the default on the later
signature) so both descriptions match; specifically ensure the parameter
`target_memory` in the `create` / `create_tile` signature explicitly documents
the default `MemorySpace.Vec` (or delete that default mention at the later
signature), referencing the `create`/`create_tile` symbols and the
`target_memory` and `MemorySpace.Vec` names so both lines read consistently.

In `@src/ir/op/tile_ops/reduction.cpp`:
- Around line 160-170: The registration for REGISTER_OP("tile.sum") declares two
positional arguments ("tile" and "tmp_tile") but DeduceTileReductionType expects
exactly one positional arg; fix by aligning them: either remove the extra
.add_argument("tmp_tile", ...) from the REGISTER_OP("tile.sum") registration so
only "tile" is declared, or update DeduceTileReductionType (and its callers) to
accept and handle a second positional argument (args[1]) and adjust its contract
accordingly; look for the symbols REGISTER_OP("tile.sum"),
.add_argument("tmp_tile"), and DeduceTileReductionType to make the change.

In `@src/ir/transforms/init_memref.cpp`:
- Around line 252-253: Update the stale comment for the tile.store handling in
init_memref.cpp to match the implementation: change the phrase "4th argument
(output_tensor)" to "3rd argument (args_[2], output_tensor)" (or otherwise
reference args_[2]) so the comment aligns with the code path in the tile.store
branch that reads args_[2].

In `@src/ir/transforms/outline_incore_scopes_pass.cpp`:
- Around line 142-147: The StoreTargetCollector currently reads the tile.store
target from args_[2], but StoreEvalToAssignMutator and the comment expect the
target as the 4th argument (args_[3]), causing a mismatch; update
StoreTargetCollector::VisitExpr_(const CallPtr& op) to check args_.size() >= 4
and use As<Var>(op->args_[3]) when extracting the target, and also update the
related check(s) at lines referenced (the other occurrence around 178-180) so
both collector and mutator treat the same argument index for the tile.store
target.

In `@tests/st/README.md`:
- Line 338: The example call to pl.tile.store is passing an unsupported shapes
parameter which will raise a TypeError; update the example to call pl.tile.store
with only the supported arguments (tile, offsets, output_tensor) by removing
shapes=[64, 64] so the example becomes pl.tile.store(tile_c, offsets=[0, 0],
output_tensor=c), keeping the same variables (tile_c, offsets, output_tensor)
used in the snippet.

In `@tests/ut/ir/transforms/test_flatten_call_expr_pass.py`:
- Around line 382-384: The test contains duplicated type-ignore directives and
an unused loop variable `i`; in the loop that iterates `for i in
pl.range(pl.tile.get_block_idx()):  # type: ignore[attr-defined,arg-type]  #
type: ignore[attr-defined,arg-type]` and the matching loop later, remove the
redundant duplicate `# type: ignore[attr-defined,arg-type]` and rename the loop
variable `i` to `_i` in both the `pl.range(pl.tile.get_block_idx())` loop and
its matching counterpart so the `Before`/`Expected` cases stay aligned and Ruff
B007 is resolved; keep all other code (e.g., `tile: pl.Tile[[32, 32], pl.FP32] =
pl.tile.load(...)` and `pl.tile.store(...)`) unchanged.

---

Outside diff comments:
In `@docs/en/dev/language/00-python_syntax.md`:
- Around line 328-342: Rename the documentation class BlockExample to
TileExample to match tile-based terminology: locate the class declaration "class
BlockExample" and change it to "class TileExample" (retain the `@pl.program`
decorator and the tile_add method and its signature/contents unchanged) so all
references and examples use TileExample consistently.
- Around line 149-151: Update the stale inline comment for the promoted op
example: change the comment next to pl.load(...) from “# Promoted from block” to
“# Promoted from tile” (keep pl.load and pl.create_tensor lines unchanged);
ensure any other occurrences in the same snippet that mention "block" are
similarly updated to "tile" for consistent terminology.

In `@docs/en/dev/passes/04-init_memref.md`:
- Around line 22-29: Update the wording that currently reads "block-op
conversion" to use tile-based terminology to match the rest of the page (e.g.,
use "tile-op conversion" or "tile conversion") so it aligns with tile.* naming
and the IncoreTileOps pass; ensure the sentence in the requirements/when-to-use
section references the tile conversion pass consistently with TypeChecked,
SSAForm, SplitIncoreOrch, and IncoreTileOps.

In `@docs/zh-cn/dev/language/00-python_syntax.md`:
- Around line 323-341: The class name BlockExample should be renamed to
TileExample to match the Tile terminology used in this section; update the
program class identifier in the snippet (change BlockExample to TileExample) and
ensure any internal references to that class (e.g., decorators or external
mentions) and the function tile_add remain consistent so the example uses
TileExample throughout.

In `@docs/zh-cn/dev/passes/04-init_memref.md`:
- Around line 22-29: “使用时机”段落仍使用旧命名:把“在静态单赋值 (SSA)
转换、提取和块操作转换之后运行”中的“块操作转换”替换为“tile 操作转换”,并明确指向现用符号 IncoreTileOps(例如改为“在静态单赋值
(SSA) 转换、提取和 IncoreTileOps(tile 操作转换)之后运行”),保持与
SSAForm、BasicMemoryReuse、InsertSync 和 AllocateMemoryAddr 的先后关系不变。

In `@src/backend/910B_CCE/backend_910b_cce_ops.cpp`:
- Around line 257-262: MakeTileFullCodegenCCE currently dereferences
op->args_[1] without verifying the argument count; add an arity check at the
start of MakeTileFullCodegenCCE to ensure op->args_.size() > 1 and handle the
error path (e.g., emit a diagnostic via codegen_base or
codegen.GetLogger()/throw a clear std::runtime_error) before accessing
op->args_[1], then proceed to compute scalar and emit TEXPANDS as before;
reference the function MakeTileFullCodegenCCE and the op->args_ usage to locate
where to add the check.

In `@src/ir/op/tile_ops/broadcast.cpp`:
- Around line 94-117: DeduceTileColExpandType must validate shapes: check
target_type and col_type are 2-D (shape_.size() == 2), ensure
col_type->shape_[0] == 1, and ensure col_type->shape_[1] matches
target_type->shape_[1] (same number of columns); if any check fails, CHECK with
a clear message including op_name and the offending shapes; after these checks
continue to promote dtypes and return the TileType with tile_view.valid_shape
set to target_type->shape_. Reference symbols: DeduceTileColExpandType,
target_type, col_type, result_dtype, and tile_view.

In `@src/ir/op/tile_ops/elementwise.cpp`:
- Around line 47-85: DeduceTileOpElementwiseBinaryType currently copies
valid_shape only from the LHS, which is wrong for broadcasts; fix by computing
valid shapes for both operands (call GetValidShape on tile_type1 and
tile_type2), broadcast/align those two valid_shape vectors to the
broadcast_result.shape (e.g. align trailing dimensions and take the elementwise
minimum/combined valid extents per-dimension), and set tile_view.valid_shape to
that broadcasted valid shape before constructing the resulting TileType; apply
the same pattern to other elementwise/broadcast deducers in this file (use
symbols DeduceTileOpElementwiseBinaryType, GetValidShape, TileView,
BroadcastShapes, TileType to locate and update the code).

---

Nitpick comments:
In `@docs/zh-cn/dev/ir/05-operators.md`:
- Line 257: Update the example function name string literal from
"block_computation" to "tile_computation" so the docs match the block→tile
rename; specifically change the call ib.function("block_computation") (and any
other occurrences of that exact string literal in this document) to
ib.function("tile_computation") to keep terminology consistent in the examples.

In `@examples/ir_builder/tile_ops_example.py`:
- Around line 148-149: The emitted IR function name inside
build_complex_tile_computation() is still "complex_block_computation" and should
be renamed to use tile terminology (e.g., "complex_tile_computation"); update
the code that constructs or returns the IR function name within
build_complex_tile_computation to use the new tile-based name so it matches the
rest of the migration and any references to the generated function.

In `@include/pypto/ir/verifier/verifier.h`:
- Around line 123-127: Add a deprecated compatibility alias for the old factory
name so callers of CreateIncoreBlockOpsPropertyVerifier still compile: declare
an inline function or forwarder named CreateIncoreBlockOpsPropertyVerifier()
that simply calls and returns CreateIncoreTileOpsPropertyVerifier(), mark it
deprecated (e.g., [[deprecated]] or a macro used elsewhere) and place it
alongside the existing CreateIncoreTileOpsPropertyVerifier() declaration in the
header so migration is smooth for C++ users.

In `@python/pypto/language/parser/ast_parser.py`:
- Around line 1474-1482: The current dispatch sends legacy pl.block.* calls into
_parse_unified_op causing an unclear "unknown operation: block" error; add an
explicit branch before calling _parse_unified_op to detect when attrs[0] == "pl"
and attrs[1] == "block" and raise UnsupportedFeatureError with
span=self.span_tracker.get_span(call), a clear message using ast.unparse(call),
and a hint directing users to the migration path for pl.block.* (i.e., tell them
pl.block.* is legacy and how to migrate); keep the existing branch for other
pl.* ops and still call _parse_unified_op(op_name, call) for non-block cases.

In `@src/backend/910B_PTO/backend_910b_pto_ops.cpp`:
- Around line 235-236: The comment above MakeTileLoadCodegenPTO is inaccurate:
it says "pto.subview" but the function emits "pto.partition_view"; update the
comment to match emitted IR (e.g., mention pto.partition_view and pto.tload) so
the doc aligns with the generated code and avoid confusion when reading
MakeTileLoadCodegenPTO.

In `@tests/st/fuzz/src/fuzzer.py`:
- Around line 310-324: Convert the mutable class-level operator pool lists
(e.g., TILE_BINARY_OPS, TILE_UNARY_OPS, TILE_ROW_EXPAND_OPS, TILE_REDUCTION_OPS,
TILE_COL_REDUCTION_OPS, TILE_COL_EXPAND_OPS, TILE_MATRIX_OPS) to immutable
tuples and add ClassVar type hints so they are not accidentally mutated; locate
each OpSpec list definition (such as the TILE_BINARY_OPS definition shown) and
replace the surrounding list literal [] with a tuple literal () and annotate the
names with typing.ClassVar[Tuple[OpSpec, ...]] (or the existing type alias) so
the constants are immutable at the class level while keeping instance
concatenation logic unchanged.

In `@tests/ut/codegen/test_pto_codegen_ops.py`:
- Around line 12-13: Rename remaining test identifiers that use "Block" to use
"Tile" to complete the migration: update the class name BlockOperationsTest to
TileOperationsTest and Test910BBlockOpsCodegen to Test910BTileOpsCodegen (and
any other occurrences of "Block" in test names, variables, or identifiers within
this file and the noted locations) so all test/program identifiers consistently
use "Tile"; ensure references (imports, test discovery names, and any assertions
referencing these identifiers) are updated accordingly to avoid breaking tests.

In `@tests/ut/codegen/test_pto_codegen_paged_attn.py`:
- Around line 183-184: The pytest invocation in the __main__ guard (the
pytest.main call) is missing the verbose flag; update the
pytest.main([__file__]) call in test_pto_codegen_paged_attn.py inside the if
__name__ == "__main__": block to include the "-v" option (e.g.,
pytest.main([__file__, "-v"])) so tests run with verbose output per repository
convention.

In `@tests/ut/language/test_unified_ops.py`:
- Around line 174-175: The test class name TestUnifiedBlockDispatch uses
outdated "Unified" terminology but the docstring and tests target Tile dispatch;
rename the class to TestTileBlockDispatch (or another Tile-prefixed name) to
match the docstring and test intent, update the class declaration in
tests/ut/language/test_unified_ops.py from class TestUnifiedBlockDispatch: to
class TestTileBlockDispatch: and adjust any references/usages in the test module
or other tests that import or parametrize this class so test discovery and
references remain correct.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: baaa39ea-dad4-42d4-9c0a-b9bf78807b3a

📥 Commits

Reviewing files that changed from the base of the PR and between f1f4628 and 134fc54.

📒 Files selected for processing (107)
  • .claude/rules/testing-and-examples.md
  • CMakeLists.txt
  • README.md
  • README.zh-CN.md
  • docs/en/dev/codegen/00-pto_codegen.md
  • docs/en/dev/codegen/01-cce_codegen.md
  • docs/en/dev/ir/02-types.md
  • docs/en/dev/ir/05-operators.md
  • docs/en/dev/language/00-python_syntax.md
  • docs/en/dev/passes/00-pass_manager.md
  • docs/en/dev/passes/01-verifier.md
  • docs/en/dev/passes/04-init_memref.md
  • docs/en/dev/passes/05-basic_memory_reuse.md
  • docs/en/dev/passes/07-allocate_memory_addr.md
  • docs/en/user/01-language_guide.md
  • docs/en/user/02-operation_reference.md
  • docs/zh-cn/dev/codegen/00-pto_codegen.md
  • docs/zh-cn/dev/codegen/01-cce_codegen.md
  • docs/zh-cn/dev/ir/02-types.md
  • docs/zh-cn/dev/ir/05-operators.md
  • docs/zh-cn/dev/language/00-python_syntax.md
  • docs/zh-cn/dev/passes/00-pass_manager.md
  • docs/zh-cn/dev/passes/01-verifier.md
  • docs/zh-cn/dev/passes/04-init_memref.md
  • docs/zh-cn/dev/passes/05-basic_memory_reuse.md
  • docs/zh-cn/dev/passes/07-allocate_memory_addr.md
  • docs/zh-cn/user/01-language_guide.md
  • docs/zh-cn/user/02-operation_reference.md
  • examples/ir_builder/tile_ops_example.py
  • examples/ir_parser/paged_attention_example.py
  • examples/ir_parser/paged_attention_with_incore.py
  • include/pypto/codegen/cce/cce_codegen.h
  • include/pypto/codegen/cce/code_context.h
  • include/pypto/codegen/codegen_base.h
  • include/pypto/ir/op_registry.h
  • include/pypto/ir/transforms/ir_property.h
  • include/pypto/ir/transforms/op_conversion_registry.h
  • include/pypto/ir/transforms/pass_properties.h
  • include/pypto/ir/transforms/passes.h
  • include/pypto/ir/verifier/verifier.h
  • python/bindings/modules/ir.cpp
  • python/bindings/modules/passes.cpp
  • python/pypto/ir/op/__init__.py
  • python/pypto/ir/op/tile_ops.py
  • python/pypto/ir/op_conversion.py
  • python/pypto/ir/pass_manager.py
  • python/pypto/language/__init__.py
  • python/pypto/language/op/__init__.py
  • python/pypto/language/op/tile_ops.py
  • python/pypto/language/op/unified_ops.py
  • python/pypto/language/parser/ast_parser.py
  • python/pypto/language/typing/__init__.py
  • python/pypto/language/typing/tile.py
  • python/pypto/pypto_core/ir.pyi
  • python/pypto/pypto_core/passes.pyi
  • reference/README.md
  • src/backend/910B_CCE/backend_910b_cce_ops.cpp
  • src/backend/910B_PTO/backend_910b_pto_ops.cpp
  • src/codegen/cce/cce_codegen.cpp
  • src/codegen/orchestration/orchestration_codegen.cpp
  • src/ir/op/README.md
  • src/ir/op/tile_ops/batch_matmul.cpp
  • src/ir/op/tile_ops/broadcast.cpp
  • src/ir/op/tile_ops/elementwise.cpp
  • src/ir/op/tile_ops/matmul.cpp
  • src/ir/op/tile_ops/memory.cpp
  • src/ir/op/tile_ops/reduction.cpp
  • src/ir/op/tile_ops/transform.cpp
  • src/ir/op/tile_ops/unary.cpp
  • src/ir/transforms/allocate_memory_addr_pass.cpp
  • src/ir/transforms/basic_memory_reuse_pass.cpp
  • src/ir/transforms/convert_tensor_to_tile_ops_pass.cpp
  • src/ir/transforms/init_memref.cpp
  • src/ir/transforms/insert_sync_pass.cpp
  • src/ir/transforms/ir_property.cpp
  • src/ir/transforms/op_conversion_registry.cpp
  • src/ir/transforms/outline_incore_scopes_pass.cpp
  • src/ir/transforms/python_printer.cpp
  • src/ir/verifier/property_verifier_registry.cpp
  • tests/st/README.md
  • tests/st/examples/01_beginner/basic/test_basic_ops.py
  • tests/st/fuzz/README.md
  • tests/st/fuzz/src/fuzzer.py
  • tests/st/fuzz/src/golden_generator.py
  • tests/st/fuzz/src/kernel_generator.py
  • tests/st/harness/core/harness.py
  • tests/ut/codegen/test_cce_codegen.py
  • tests/ut/codegen/test_pto_codegen.py
  • tests/ut/codegen/test_pto_codegen_ops.py
  • tests/ut/codegen/test_pto_codegen_paged_attn.py
  • tests/ut/ir/memory/test_memref.py
  • tests/ut/ir/operators/test_operation_span_capture.py
  • tests/ut/ir/operators/test_tile_ops.py
  • tests/ut/ir/printing/test_python_printer.py
  • tests/ut/ir/transforms/test_allocate_memory_addr_pass.py
  • tests/ut/ir/transforms/test_basic_memory_reuse.py
  • tests/ut/ir/transforms/test_convert_tensor_to_tile_ops.py
  • tests/ut/ir/transforms/test_flatten_call_expr_pass.py
  • tests/ut/ir/transforms/test_init_memref.py
  • tests/ut/ir/transforms/test_insert_sync.py
  • tests/ut/ir/transforms/test_outline_incore_scopes.py
  • tests/ut/ir/transforms/test_pass_manager.py
  • tests/ut/language/parser/test_closure_var_resolution.py
  • tests/ut/language/parser/test_decorator.py
  • tests/ut/language/parser/test_printer_integration.py
  • tests/ut/language/parser/test_type_resolver.py
  • tests/ut/language/test_unified_ops.py

Comment thread docs/en/dev/ir/05-operators.md Outdated
Comment thread docs/en/user/02-operation_reference.md
Comment thread docs/zh-cn/dev/passes/00-pass_manager.md Outdated
Comment thread docs/zh-cn/dev/passes/01-verifier.md Outdated
Comment thread docs/zh-cn/dev/passes/04-init_memref.md
Comment thread src/ir/op/tile_ops/reduction.cpp
Comment thread src/ir/transforms/init_memref.cpp Outdated
Comment thread src/ir/transforms/outline_incore_scopes_pass.cpp
Comment thread tests/st/README.md Outdated
Comment thread tests/ut/ir/transforms/test_flatten_call_expr_pass.py Outdated


- Fix "Block operator implementations" → "Tile operator implementations" in docs
- Fix "使用块操作" → "使用 tile 操作" in zh-cn pass docs (3 files)
- Fix stale "4th argument" comment → "3rd argument" in init_memref.cpp
- Remove unsupported `shapes` kwarg from pl.tile.store example in st/README.md
- Fix duplicated type: ignore and rename unused loop var `i` → `_i`
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/zh-cn/dev/passes/04-init_memref.md (1)

62-62: ⚠️ Potential issue | 🟡 Minor

术语仍有残留:请将“块操作转换”改为“tile 操作转换”。

Line 62 仍使用旧术语“块操作转换”,与本次 blocktile 全局迁移目标不一致,建议统一为“tile 操作转换”。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/zh-cn/dev/passes/04-init_memref.md` at line 62, Replace the remaining
outdated term "块操作转换" with the new global term "tile 操作转换" in this document
(specifically where the phrase appears in the sentence "**变换前**(经过
SSA/块操作转换后):"); update that instance so the line reads "**变换前**(经过 SSA/tile
操作转换后):", ensuring the terminology now matches the `block` → `tile` migration
used elsewhere.
🧹 Nitpick comments (1)
docs/en/dev/ir/05-operators.md (1)

257-257: Consider renaming the example function for consistency.

The function name "block_computation" in this TileOp example is inconsistent with the rename. While this is a user-defined string (not an API name), updating it to "tile_computation" would avoid confusion and align the example with the section's focus on tile operations.

📝 Optional documentation improvement
-with ib.function("block_computation") as f:
+with ib.function("tile_computation") as f:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/en/dev/ir/05-operators.md` at line 257, Rename the example function
string to match the tile-focused section: change the user-defined function name
used in the example from "block_computation" to "tile_computation" (the call
using ib.function("block_computation") as f should be updated to
ib.function("tile_computation") as f) so the example aligns with the TileOp
naming and avoids confusion.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@docs/zh-cn/dev/passes/04-init_memref.md`:
- Line 62: Replace the remaining outdated term "块操作转换" with the new global term
"tile 操作转换" in this document (specifically where the phrase appears in the
sentence "**变换前**(经过 SSA/块操作转换后):"); update that instance so the line reads
"**变换前**(经过 SSA/tile 操作转换后):", ensuring the terminology now matches the `block`
→ `tile` migration used elsewhere.

---

Nitpick comments:
In `@docs/en/dev/ir/05-operators.md`:
- Line 257: Rename the example function string to match the tile-focused
section: change the user-defined function name used in the example from
"block_computation" to "tile_computation" (the call using
ib.function("block_computation") as f should be updated to
ib.function("tile_computation") as f) so the example aligns with the TileOp
naming and avoids confusion.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1cf77a6c-45cb-4b44-b5b1-46f6cf9b2500

📥 Commits

Reviewing files that changed from the base of the PR and between 134fc54 and b2c6b7d.

📒 Files selected for processing (7)
  • docs/en/dev/ir/05-operators.md
  • docs/zh-cn/dev/passes/00-pass_manager.md
  • docs/zh-cn/dev/passes/01-verifier.md
  • docs/zh-cn/dev/passes/04-init_memref.md
  • src/ir/transforms/init_memref.cpp
  • tests/st/README.md
  • tests/ut/ir/transforms/test_flatten_call_expr_pass.py
🚧 Files skipped from review as they are similar to previous changes (3)
  • docs/zh-cn/dev/passes/01-verifier.md
  • src/ir/transforms/init_memref.cpp
  • tests/st/README.md

- Fix "块操作转换" → "tile 操作转换" in zh-cn init_memref docs
- Rename "block_computation" → "tile_computation" in operator example (en + zh-cn)
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/zh-cn/dev/ir/05-operators.md`:
- Line 380: Update the Chinese header text "块算子实现" to match the English "Tile
operator implementations" by replacing it with a consistent Chinese label such
as "Tile 算子实现" (or "Tile 操作符实现") in the docs/zh-cn/dev/ir/05-operators.md file;
ensure the label sits directly above the referenced path `src/ir/op/tile_ops/`
so the Chinese doc matches the English wording and the actual directory name.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 066df0a8-9515-43d6-8052-22e53887f987

📥 Commits

Reviewing files that changed from the base of the PR and between b2c6b7d and ca1e1f2.

📒 Files selected for processing (3)
  • docs/en/dev/ir/05-operators.md
  • docs/zh-cn/dev/ir/05-operators.md
  • docs/zh-cn/dev/passes/04-init_memref.md

Comment thread docs/zh-cn/dev/ir/05-operators.md Outdated
- Fix "块算子实现" → "Tile 算子实现" to match src/ir/op/tile_ops/ path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Rename pl.block to pl.tile to match the Tile type

2 participants