Skip to content

Refactor: clean up repo structure and organize docs#17

Merged
zhangqi-chen merged 1 commit intohw-native-sys:mainfrom
zhangqi-chen:refactor/cleanup-repo
Mar 17, 2026
Merged

Refactor: clean up repo structure and organize docs#17
zhangqi-chen merged 1 commit intohw-native-sys:mainfrom
zhangqi-chen:refactor/cleanup-repo

Conversation

@zhangqi-chen
Copy link
Collaborator

@zhangqi-chen zhangqi-chen commented Mar 17, 2026

Summary

  • Remove archived directories: junk_models/, junk_tensor_functions/, projects/
  • Remove non-essential examples (softmax, paged attention, batch hash lookup, pa variants and their build dumps)
  • Move 3 core reference docs (pypto-frontend-coding-style.md, para_for.md, pto2_rt.md) into docs/
  • Delete temporary session logs and outdated task files (design_goal.md, porting_to_pypto_v3.md, deepseek_v3_2_code_review.md, qwen3_32b_run_log.md)
  • Update file path references in .claude/CLAUDE.md, git-commit skill, and issue template

Retained

  • examples/: hello_world, qwen3 (4 files), deepseek (4 files)
  • tests/: lint checks
  • docs/: 3 core reference documents
  • README.md, .claude/, .github/

Testing

  • Pre-commit hooks pass (check-headers, check-english-only)
  • CI hello_world --sim test passes (no changes to hello_world.py or CI workflow)

Summary by CodeRabbit

  • Removals

    • Removed example implementations for paged attention, softmax, predicate kernels, and batch hash lookup workflows.
    • Removed the tensor functions library providing primitive operations (cast, elementwise, reductions, linear algebra, indexing, etc.).
    • Removed model implementations including Arctic LSTM, DeepSeek Lightning Indexer, GLM-4.5, and Qwen3 components.
    • Removed comprehensive documentation for memory usage analysis, AIV splitting, fusion scope notes, and sequence length handling.
  • Documentation Updates

    • Updated example file paths and documentation location references throughout configuration files.
    • Modified validation rules for example Python files and coding style references.

- Remove archived directories: junk_models/, junk_tensor_functions/, projects/
- Remove non-essential examples: softmax, paged attention, batch hash lookup
- Remove build dump directories from examples/
- Move core reference docs to docs/: coding style, para_for, pto2_rt
- Delete temporary session logs and outdated task files
- Update file path references in CLAUDE.md, git-commit skill, and issue template
@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

📝 Walkthrough

Walkthrough

Large-scale cleanup removing numerous example files, model implementations, tensor function libraries, and supporting documentation. Changes include deletion of multiple paged attention examples, model code for Arctic/DeepSeek/GLM/Qwen3, tensor operation primitives, and project artifacts, alongside minor documentation path updates.

Changes

Cohort / File(s) Summary
Documentation & Configuration Updates
.claude/CLAUDE.md, .claude/skills/git-commit/SKILL.md, .github/ISSUE_TEMPLATE/documentation.yml, junk_models/__init__.py
Updated documentation paths and removed module docstrings. Path references changed from top-level to docs/ subdirectory; coding style guide reference updated to docs/pypto-frontend-coding-style.md.
Design & Analysis Documents Removed
design_goal.md, deepseek_v3_2_code_review.md, porting_to_pypto_v3.md, qwen3_32b_run_log.md, examples/docs/*
Deleted comprehensive design documentation, code review reports, porting guidance, run logs, and DeepSeek/Qwen3 analysis files (AIV splitting, memory usage, fusion scope notes, local usage reports).
Paged Attention Examples (pa.py, pa1.py - pa4.py) & Generated Passes
examples/pa*.py, examples/pa1_build/passes_dump/*, examples/pa3_build/passes_dump/*, examples/pa4_build/passes_dump/*
Removed complete paged attention implementation examples and all generated compiler passes (00_frontend through 13_after_AllocateMemoryAddr stages) for multiple variants.
Predicate Test Examples
examples/pa5_predicate_test.py, examples/pa5_predicate_build/passes_dump/*
Deleted predicate kernel test program and all 13 generated compiler pass artifacts (frontend through memory allocation stages).
Other Example Programs
examples/batch_hash_lookup.py, examples/softmax_example.py, examples/paged_attention_example.py
Removed batch hash lookup SIMD example, softmax computation example, and comprehensive paged attention module with multi-kernel pipeline.
Arctic Model Implementation
junk_models/arctic/__init__.py, junk_models/arctic/sum_lstm.py
Deleted Arctic LSTM model including RMS norm, GELU activation, and LSTM compute functions with state management.
DeepSeek V3.2 Model Implementation
junk_models/deepseek_v32_exp/__init__.py, junk_models/deepseek_v32_exp/*.py
Removed Lightning Indexer prolog/quant, MLA indexer prolog, sparse attention antiquant, and sparse flash attention modules for quantized attention computation.
GLM-4.5 Model Components
junk_models/glm_v4_5/__init__.py, junk_models/glm_v4_5/glm_*.py
Deleted attention, FFN, quantization, and MoE routing implementations including flash attention blocks, expert selection, SwiGLU, and layernorm modules.
Qwen3-Next Model
junk_models/qwen3_next/__init__.py, junk_models/qwen3_next/gated_delta_rule.py
Removed Gated Delta Rule attention implementation including L2 norm, pre-attention, matrix inversion, and main compute function.
Tensor Functions Library
junk_tensor_functions/__init__.py, junk_tensor_functions/*.py
Deleted entire tensor operation primitive library: cast primitives, elementwise binary/unary ops, reductions, linear algebra, type/layout operations, indexing operations, and composite fused operations (softmax, layernorm, RoPE, quantization).
Qwen3 Report Files
examples/qwen3_32b_build/report/*, examples/qwen3_32b_prefill_dump/report/*
Removed memory usage reports and kernel SRAM usage documentation for Qwen3 implementations.
Lightning Indexer Project
projects/deepseek_v32_exp_lightning_indexer_prolog_quant/*
Removed entire project including Python implementation, PyPTO IR kernels (matmul, layernorm, softmax, quantization), C++ orchestration, golden reference, build configs, and README.
Paged Attention Project
projects/paged-attention/paged_attention.py
Deleted standalone paged attention golden implementation with input generation and online softmax computation.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes


🐰 Hoppy hops through the dust of deletion,
Old examples fade to pale reflection,
Tensor functions rest in memory's nest,
A springtime clearing for the simplest best!

Copy link

@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.

🧹 Nitpick comments (1)
.claude/skills/git-commit/SKILL.md (1)

19-19: Clarify what to run for Python changes outside examples/.

Line 19 is clear for example files, but the table now leaves tests//tooling .py changes unspecified. Add an explicit row for “Python outside examples/” with expected checks (e.g., lint/tests) to avoid skipped validation.

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

In @.claude/skills/git-commit/SKILL.md at line 19, Update the checklist table in
.claude/skills/git-commit/SKILL.md by adding an explicit row for "Python
(outside `examples/`)" next to the existing "Python (`.py`) in `examples/`"
entry; specify the expected verification steps such as running linters (e.g.,
flake8/ruff), running unit tests in tests/, and validating any tooling or CI
config changes so Python changes outside examples aren't left unspecified.
Reference the existing table and the "Python (`.py`) in `examples/`" row when
adding the new row to match style and columns.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.claude/skills/git-commit/SKILL.md:
- Line 19: Update the checklist table in .claude/skills/git-commit/SKILL.md by
adding an explicit row for "Python (outside `examples/`)" next to the existing
"Python (`.py`) in `examples/`" entry; specify the expected verification steps
such as running linters (e.g., flake8/ruff), running unit tests in tests/, and
validating any tooling or CI config changes so Python changes outside examples
aren't left unspecified. Reference the existing table and the "Python (`.py`) in
`examples/`" row when adding the new row to match style and columns.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bc720b13-d719-4f9b-8556-403184bc97d9

📥 Commits

Reviewing files that changed from the base of the PR and between ab85f17 and 645c631.

📒 Files selected for processing (129)
  • .claude/CLAUDE.md
  • .claude/skills/git-commit/SKILL.md
  • .github/ISSUE_TEMPLATE/documentation.yml
  • deepseek_v3_2_code_review.md
  • design_goal.md
  • docs/para_for.md
  • docs/pto2_rt.md
  • docs/pypto-frontend-coding-style.md
  • examples/batch_hash_lookup.py
  • examples/docs/deepseek_v3_2_aiv_splitting_analysis_pass08.md
  • examples/docs/deepseek_v3_2_fusion_scope_notes.md
  • examples/docs/deepseek_v3_2_memory_usage_unified_report.md
  • examples/docs/deepseek_v3_2_mixed_kernel_local_usage_side_by_side.md
  • examples/docs/gen_front_capacity_budget.py
  • examples/docs/gen_mixed_kernel_local_usage.py
  • examples/docs/qwen3_aiv_splitting_analysis_pass08.md
  • examples/docs/seq_lens_handling_analysis.md
  • examples/pa.py
  • examples/pa1.py
  • examples/pa1_build/passes_dump/00_frontend.py
  • examples/pa1_build/passes_dump/01_after_UnrollLoops.py
  • examples/pa1_build/passes_dump/02_after_ConvertToSSA.py
  • examples/pa1_build/passes_dump/03_after_FlattenCallExpr.py
  • examples/pa1_build/passes_dump/04_after_SplitChunkedLoops.py
  • examples/pa1_build/passes_dump/05_after_InterchangeChunkLoops.py
  • examples/pa1_build/passes_dump/06_after_RunVerifier.py
  • examples/pa1_build/passes_dump/07_after_OutlineIncoreScopes.py
  • examples/pa2.py
  • examples/pa3.py
  • examples/pa3_build/passes_dump/00_frontend.py
  • examples/pa3_build/passes_dump/01_after_UnrollLoops.py
  • examples/pa3_build/passes_dump/02_after_ConvertToSSA.py
  • examples/pa3_build/passes_dump/03_after_FlattenCallExpr.py
  • examples/pa3_build/passes_dump/04_after_SplitChunkedLoops.py
  • examples/pa3_build/passes_dump/05_after_InterchangeChunkLoops.py
  • examples/pa3_build/passes_dump/06_after_RunVerifier.py
  • examples/pa3_build/passes_dump/07_after_OutlineIncoreScopes.py
  • examples/pa3_build/passes_dump/08_after_ConvertTensorToBlockOps.py
  • examples/pa3_build/passes_dump/09_after_InitMemRef.py
  • examples/pa3_build/passes_dump/10_after_MemoryReuse.py
  • examples/pa3_build/passes_dump/11_after_InsertSync.py
  • examples/pa3_build/passes_dump/12_after_AllocateMemoryAddr.py
  • examples/pa4.py
  • examples/pa4_build/passes_dump/00_frontend.py
  • examples/pa4_build/passes_dump/01_after_UnrollLoops.py
  • examples/pa4_build/passes_dump/02_after_ConvertToSSA.py
  • examples/pa4_build/passes_dump/03_after_FlattenCallExpr.py
  • examples/pa4_build/passes_dump/04_after_SplitChunkedLoops.py
  • examples/pa4_build/passes_dump/05_after_InterchangeChunkLoops.py
  • examples/pa4_build/passes_dump/06_after_RunVerifier.py
  • examples/pa4_build/passes_dump/07_after_OutlineIncoreScopes.py
  • examples/pa4_build/passes_dump/08_after_ExpandMixedKernel.py
  • examples/pa4_build/passes_dump/09_after_ConvertTensorToBlockOps.py
  • examples/pa4_build/passes_dump/10_after_InitMemRef.py
  • examples/pa4_build/passes_dump/11_after_MemoryReuse.py
  • examples/pa4_build/passes_dump/12_after_InsertSync.py
  • examples/pa4_build/passes_dump/13_after_AllocateMemoryAddr.py
  • examples/pa5_predicate_build/passes_dump/00_frontend.py
  • examples/pa5_predicate_build/passes_dump/01_after_UnrollLoops.py
  • examples/pa5_predicate_build/passes_dump/02_after_ConvertToSSA.py
  • examples/pa5_predicate_build/passes_dump/03_after_FlattenCallExpr.py
  • examples/pa5_predicate_build/passes_dump/04_after_SplitChunkedLoops.py
  • examples/pa5_predicate_build/passes_dump/05_after_InterchangeChunkLoops.py
  • examples/pa5_predicate_build/passes_dump/06_after_RunVerifier.py
  • examples/pa5_predicate_build/passes_dump/07_after_OutlineIncoreScopes.py
  • examples/pa5_predicate_build/passes_dump/08_after_ExpandMixedKernel.py
  • examples/pa5_predicate_build/passes_dump/09_after_ConvertTensorToBlockOps.py
  • examples/pa5_predicate_build/passes_dump/10_after_InitMemRef.py
  • examples/pa5_predicate_build/passes_dump/11_after_MemoryReuse.py
  • examples/pa5_predicate_build/passes_dump/12_after_InsertSync.py
  • examples/pa5_predicate_build/passes_dump/13_after_AllocateMemoryAddr.py
  • examples/pa5_predicate_test.py
  • examples/paged_attention_example.py
  • examples/qwen3_32b_build/report/memory_after_AllocateMemoryAddr.txt
  • examples/qwen3_32b_prefill_dump/report/prefill_kernel_local_tensor_summary.md
  • examples/softmax_example.py
  • junk_models/__init__.py
  • junk_models/arctic/__init__.py
  • junk_models/arctic/sum_lstm.py
  • junk_models/deepseek_v32_exp/__init__.py
  • junk_models/deepseek_v32_exp/lightning_indexer_prolog_quant.py
  • junk_models/deepseek_v32_exp/lightning_indexer_quant.py
  • junk_models/deepseek_v32_exp/mla_indexer_prolog_quant.py
  • junk_models/deepseek_v32_exp/mla_prolog_quant.py
  • junk_models/deepseek_v32_exp/sparse_attention_antiquant.py
  • junk_models/deepseek_v32_exp/sparse_flash_attention_quant.py
  • junk_models/deepseek_v32_exp/sparse_flash_attention_quant_withscope.py
  • junk_models/glm_v4_5/__init__.py
  • junk_models/glm_v4_5/glm_attention.py
  • junk_models/glm_v4_5/glm_attention_fusion.py
  • junk_models/glm_v4_5/glm_attention_pre_quant.py
  • junk_models/glm_v4_5/glm_ffn_common_interface.py
  • junk_models/glm_v4_5/glm_ffn_shared_expert_quant.py
  • junk_models/glm_v4_5/glm_gate.py
  • junk_models/glm_v4_5/glm_matmul_allreduce_add_rmsnorm.py
  • junk_models/glm_v4_5/glm_moe_fusion.py
  • junk_models/glm_v4_5/glm_select_experts.py
  • junk_models/qwen3_next/__init__.py
  • junk_models/qwen3_next/gated_delta_rule.py
  • junk_tensor_functions/__init__.py
  • junk_tensor_functions/cast_primitives.py
  • junk_tensor_functions/composite.py
  • junk_tensor_functions/elementwise_binary.py
  • junk_tensor_functions/elementwise_unary.py
  • junk_tensor_functions/indexing.py
  • junk_tensor_functions/linalg.py
  • junk_tensor_functions/reduction.py
  • junk_tensor_functions/tiling.py
  • junk_tensor_functions/type_layout.py
  • porting_to_pypto_v3.md
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/PROJECT_ANALYSIS.md
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/lightning_indexer_prolog_quant.py
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/README.md
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernel_config.py
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aic/incore_matmul.pto
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aic/incore_matmul_acc.pto
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aic/incore_matmul_nn.pto
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_add.pto
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_layernorm.pto
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_mul.pto
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_neg.pto
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_softmax.pto
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_symmetric_quant.pto
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/orchestration/LightningIndexerPrologQuant.cpp
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/report/memory_after_AllocateMemoryAddr.txt
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/golden.py
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/run_a2a3_swimlane.sh
  • projects/paged-attention/paged_attention.py
  • qwen3_32b_run_log.md
💤 Files with no reviewable changes (123)
  • examples/docs/deepseek_v3_2_memory_usage_unified_report.md
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_softmax.pto
  • examples/docs/deepseek_v3_2_mixed_kernel_local_usage_side_by_side.md
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_add.pto
  • junk_tensor_functions/tiling.py
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/report/memory_after_AllocateMemoryAddr.txt
  • qwen3_32b_run_log.md
  • examples/docs/deepseek_v3_2_aiv_splitting_analysis_pass08.md
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/PROJECT_ANALYSIS.md
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_mul.pto
  • junk_models/deepseek_v32_exp/sparse_attention_antiquant.py
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_neg.pto
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/run_a2a3_swimlane.sh
  • junk_models/qwen3_next/init.py
  • junk_models/glm_v4_5/glm_moe_fusion.py
  • examples/pa2.py
  • examples/docs/deepseek_v3_2_fusion_scope_notes.md
  • examples/pa1_build/passes_dump/05_after_InterchangeChunkLoops.py
  • junk_models/deepseek_v32_exp/mla_prolog_quant.py
  • examples/pa4_build/passes_dump/05_after_InterchangeChunkLoops.py
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aic/incore_matmul_nn.pto
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/README.md
  • examples/qwen3_32b_build/report/memory_after_AllocateMemoryAddr.txt
  • junk_models/deepseek_v32_exp/sparse_flash_attention_quant_withscope.py
  • examples/batch_hash_lookup.py
  • junk_models/glm_v4_5/glm_matmul_allreduce_add_rmsnorm.py
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aic/incore_matmul_acc.pto
  • junk_tensor_functions/indexing.py
  • examples/pa4.py
  • examples/pa3_build/passes_dump/10_after_MemoryReuse.py
  • junk_models/deepseek_v32_exp/lightning_indexer_quant.py
  • design_goal.md
  • examples/pa3_build/passes_dump/00_frontend.py
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_symmetric_quant.pto
  • examples/pa5_predicate_build/passes_dump/02_after_ConvertToSSA.py
  • examples/pa5_predicate_build/passes_dump/01_after_UnrollLoops.py
  • examples/pa3_build/passes_dump/03_after_FlattenCallExpr.py
  • examples/pa3_build/passes_dump/04_after_SplitChunkedLoops.py
  • examples/docs/seq_lens_handling_analysis.md
  • examples/pa4_build/passes_dump/10_after_InitMemRef.py
  • examples/pa1.py
  • examples/pa.py
  • examples/pa4_build/passes_dump/00_frontend.py
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernel_config.py
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/lightning_indexer_prolog_quant.py
  • junk_tensor_functions/linalg.py
  • examples/pa5_predicate_build/passes_dump/08_after_ExpandMixedKernel.py
  • examples/docs/gen_mixed_kernel_local_usage.py
  • junk_models/glm_v4_5/glm_gate.py
  • examples/pa4_build/passes_dump/04_after_SplitChunkedLoops.py
  • examples/pa5_predicate_build/passes_dump/00_frontend.py
  • examples/pa5_predicate_build/passes_dump/06_after_RunVerifier.py
  • junk_tensor_functions/type_layout.py
  • examples/pa5_predicate_build/passes_dump/10_after_InitMemRef.py
  • examples/pa3_build/passes_dump/11_after_InsertSync.py
  • junk_tensor_functions/cast_primitives.py
  • junk_models/glm_v4_5/glm_ffn_shared_expert_quant.py
  • porting_to_pypto_v3.md
  • examples/qwen3_32b_prefill_dump/report/prefill_kernel_local_tensor_summary.md
  • junk_models/arctic/init.py
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aic/incore_matmul.pto
  • examples/paged_attention_example.py
  • examples/pa1_build/passes_dump/07_after_OutlineIncoreScopes.py
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/golden.py
  • junk_models/deepseek_v32_exp/sparse_flash_attention_quant.py
  • junk_models/glm_v4_5/glm_ffn_common_interface.py
  • junk_models/deepseek_v32_exp/init.py
  • examples/pa1_build/passes_dump/06_after_RunVerifier.py
  • examples/pa5_predicate_build/passes_dump/05_after_InterchangeChunkLoops.py
  • junk_models/glm_v4_5/glm_attention_pre_quant.py
  • examples/pa3_build/passes_dump/01_after_UnrollLoops.py
  • examples/pa5_predicate_build/passes_dump/11_after_MemoryReuse.py
  • examples/pa3_build/passes_dump/08_after_ConvertTensorToBlockOps.py
  • examples/pa4_build/passes_dump/06_after_RunVerifier.py
  • examples/pa5_predicate_build/passes_dump/07_after_OutlineIncoreScopes.py
  • examples/pa4_build/passes_dump/02_after_ConvertToSSA.py
  • examples/pa5_predicate_build/passes_dump/03_after_FlattenCallExpr.py
  • junk_models/glm_v4_5/glm_attention_fusion.py
  • examples/pa4_build/passes_dump/09_after_ConvertTensorToBlockOps.py
  • examples/docs/qwen3_aiv_splitting_analysis_pass08.md
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_layernorm.pto
  • examples/docs/gen_front_capacity_budget.py
  • examples/pa1_build/passes_dump/01_after_UnrollLoops.py
  • projects/paged-attention/paged_attention.py
  • junk_tensor_functions/elementwise_binary.py
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/orchestration/LightningIndexerPrologQuant.cpp
  • examples/pa3_build/passes_dump/02_after_ConvertToSSA.py
  • junk_models/glm_v4_5/glm_select_experts.py
  • junk_models/arctic/sum_lstm.py
  • junk_models/init.py
  • junk_tensor_functions/reduction.py
  • examples/pa1_build/passes_dump/00_frontend.py
  • examples/pa3_build/passes_dump/09_after_InitMemRef.py
  • examples/pa4_build/passes_dump/13_after_AllocateMemoryAddr.py
  • examples/pa5_predicate_test.py
  • deepseek_v3_2_code_review.md
  • examples/pa4_build/passes_dump/03_after_FlattenCallExpr.py
  • examples/pa3_build/passes_dump/12_after_AllocateMemoryAddr.py
  • junk_models/glm_v4_5/init.py
  • examples/pa4_build/passes_dump/12_after_InsertSync.py
  • examples/pa4_build/passes_dump/07_after_OutlineIncoreScopes.py
  • examples/softmax_example.py
  • junk_tensor_functions/elementwise_unary.py
  • examples/pa5_predicate_build/passes_dump/12_after_InsertSync.py
  • examples/pa3_build/passes_dump/06_after_RunVerifier.py
  • examples/pa5_predicate_build/passes_dump/04_after_SplitChunkedLoops.py
  • junk_models/deepseek_v32_exp/mla_indexer_prolog_quant.py
  • examples/pa1_build/passes_dump/04_after_SplitChunkedLoops.py
  • junk_models/deepseek_v32_exp/lightning_indexer_prolog_quant.py
  • junk_tensor_functions/composite.py
  • examples/pa1_build/passes_dump/02_after_ConvertToSSA.py
  • examples/pa3_build/passes_dump/05_after_InterchangeChunkLoops.py
  • junk_tensor_functions/init.py
  • examples/pa5_predicate_build/passes_dump/09_after_ConvertTensorToBlockOps.py
  • junk_models/qwen3_next/gated_delta_rule.py
  • examples/pa3_build/passes_dump/07_after_OutlineIncoreScopes.py
  • examples/pa4_build/passes_dump/08_after_ExpandMixedKernel.py
  • examples/pa3.py
  • examples/pa1_build/passes_dump/03_after_FlattenCallExpr.py
  • examples/pa5_predicate_build/passes_dump/13_after_AllocateMemoryAddr.py
  • examples/pa4_build/passes_dump/01_after_UnrollLoops.py
  • junk_models/glm_v4_5/glm_attention.py
  • examples/pa4_build/passes_dump/11_after_MemoryReuse.py

@gemini-code-assist
Copy link

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 significantly refactors the repository's file organization by removing obsolete components and centralizing documentation. The changes aim to enhance the clarity and maintainability of the codebase, making it easier for developers to navigate and understand the project's core elements.

Highlights

  • Repository Structure Cleanup: Removed archived directories such as 'junk_models/', 'junk_tensor_functions/', and 'projects/' to streamline the repository.
  • Example Consolidation: Eliminated non-essential examples including softmax, paged attention, batch hash lookup, and their variants, retaining only core examples like 'hello_world', 'qwen3', and 'deepseek'.
  • Documentation Reorganization: Moved key reference documents ('pypto-frontend-coding-style.md', 'para_for.md', 'pto2_rt.md') into a dedicated 'docs/' directory for better organization.
  • Removal of Outdated Files: Deleted temporary session logs and outdated task-specific files such as 'design_goal.md' and various code review logs.
  • Path Reference Updates: Updated file path references in '.claude/CLAUDE.md', the git-commit skill, and the issue template to reflect the new repository structure.
Changelog
  • .claude/CLAUDE.md
    • Updated the 'Directory Structure' section to reflect the removal of 'projects/', 'junk_models/', 'junk_tensor_functions/' and the addition of 'docs/' and 'tests/'.
    • Modified the 'Key Documentation' section to use the new 'docs/' paths for core reference documents.
    • Changed the example run command from 'python examples/softmax_example.py' to 'python examples/hello_world.py'.
  • .claude/skills/git-commit/SKILL.md
    • Updated the example validation table to remove 'projects/' from Python file types.
    • Modified the checklist item for coding conventions to reference 'docs/pypto-frontend-coding-style.md'.
  • .github/ISSUE_TEMPLATE/documentation.yml
    • Updated the placeholder text for 'Documentation Location' to include the 'docs/' prefix for 'pypto-frontend-coding-style.md'.
  • deepseek_v3_2_code_review.md
    • Removed the file.
  • design_goal.md
    • Removed the file.
  • examples/batch_hash_lookup.py
    • Removed the file.
  • examples/docs/deepseek_v3_2_aiv_splitting_analysis_pass08.md
    • Removed the file.
  • examples/docs/deepseek_v3_2_fusion_scope_notes.md
    • Removed the file.
  • examples/docs/deepseek_v3_2_memory_usage_unified_report.md
    • Removed the file.
  • examples/docs/deepseek_v3_2_mixed_kernel_local_usage_side_by_side.md
    • Removed the file.
  • examples/docs/gen_front_capacity_budget.py
    • Removed the file.
  • examples/docs/gen_mixed_kernel_local_usage.py
    • Removed the file.
  • examples/docs/qwen3_aiv_splitting_analysis_pass08.md
    • Removed the file.
  • examples/docs/seq_lens_handling_analysis.md
    • Removed the file.
  • examples/pa.py
    • Removed the file.
  • examples/pa1.py
    • Removed the file.
  • examples/pa1_build/passes_dump/00_frontend.py
    • Removed the file.
  • examples/pa1_build/passes_dump/01_after_UnrollLoops.py
    • Removed the file.
  • examples/pa1_build/passes_dump/02_after_ConvertToSSA.py
    • Removed the file.
  • examples/pa1_build/passes_dump/03_after_FlattenCallExpr.py
    • Removed the file.
  • examples/pa1_build/passes_dump/04_after_SplitChunkedLoops.py
    • Removed the file.
  • examples/pa1_build/passes_dump/05_after_InterchangeChunkLoops.py
    • Removed the file.
  • examples/pa1_build/passes_dump/06_after_RunVerifier.py
    • Removed the file.
  • examples/pa1_build/passes_dump/07_after_OutlineIncoreScopes.py
    • Removed the file.
  • examples/pa2.py
    • Removed the file.
  • examples/pa3.py
    • Removed the file.
  • examples/pa3_build/passes_dump/00_frontend.py
    • Removed the file.
  • examples/pa3_build/passes_dump/01_after_UnrollLoops.py
    • Removed the file.
  • examples/pa3_build/passes_dump/02_after_ConvertToSSA.py
    • Removed the file.
  • examples/pa3_build/passes_dump/03_after_FlattenCallExpr.py
    • Removed the file.
  • examples/pa3_build/passes_dump/04_after_SplitChunkedLoops.py
    • Removed the file.
  • examples/pa3_build/passes_dump/05_after_InterchangeChunkLoops.py
    • Removed the file.
  • examples/pa3_build/passes_dump/06_after_RunVerifier.py
    • Removed the file.
  • examples/pa3_build/passes_dump/07_after_OutlineIncoreScopes.py
    • Removed the file.
  • examples/pa3_build/passes_dump/08_after_ConvertTensorToBlockOps.py
    • Removed the file.
  • examples/pa3_build/passes_dump/09_after_InitMemRef.py
    • Removed the file.
  • examples/pa3_build/passes_dump/10_after_MemoryReuse.py
    • Removed the file.
  • examples/pa3_build/passes_dump/11_after_InsertSync.py
    • Removed the file.
  • examples/pa3_build/passes_dump/12_after_AllocateMemoryAddr.py
    • Removed the file.
  • examples/pa4.py
    • Removed the file.
  • examples/pa4_build/passes_dump/00_frontend.py
    • Removed the file.
  • examples/pa4_build/passes_dump/01_after_UnrollLoops.py
    • Removed the file.
  • examples/pa4_build/passes_dump/02_after_ConvertToSSA.py
    • Removed the file.
  • examples/pa4_build/passes_dump/03_after_FlattenCallExpr.py
    • Removed the file.
  • examples/pa4_build/passes_dump/04_after_SplitChunkedLoops.py
    • Removed the file.
  • examples/pa4_build/passes_dump/05_after_InterchangeChunkLoops.py
    • Removed the file.
  • examples/pa4_build/passes_dump/06_after_RunVerifier.py
    • Removed the file.
  • examples/pa4_build/passes_dump/07_after_OutlineIncoreScopes.py
    • Removed the file.
  • examples/pa4_build/passes_dump/08_after_ExpandMixedKernel.py
    • Removed the file.
  • examples/pa4_build/passes_dump/09_after_ConvertTensorToBlockOps.py
    • Removed the file.
  • examples/pa4_build/passes_dump/10_after_InitMemRef.py
    • Removed the file.
  • examples/pa4_build/passes_dump/11_after_MemoryReuse.py
    • Removed the file.
  • examples/pa4_build/passes_dump/12_after_InsertSync.py
    • Removed the file.
  • examples/pa4_build/passes_dump/13_after_AllocateMemoryAddr.py
    • Removed the file.
  • examples/pa5_predicate_build/passes_dump/00_frontend.py
    • Removed the file.
  • examples/pa5_predicate_build/passes_dump/01_after_UnrollLoops.py
    • Removed the file.
  • examples/pa5_predicate_build/passes_dump/02_after_ConvertToSSA.py
    • Removed the file.
  • examples/pa5_predicate_build/passes_dump/03_after_FlattenCallExpr.py
    • Removed the file.
  • examples/pa5_predicate_build/passes_dump/04_after_SplitChunkedLoops.py
    • Removed the file.
  • examples/pa5_predicate_build/passes_dump/05_after_InterchangeChunkLoops.py
    • Removed the file.
  • examples/pa5_predicate_build/passes_dump/06_after_RunVerifier.py
    • Removed the file.
  • examples/pa5_predicate_build/passes_dump/07_after_OutlineIncoreScopes.py
    • Removed the file.
  • examples/pa5_predicate_build/passes_dump/08_after_ExpandMixedKernel.py
    • Removed the file.
  • examples/pa5_predicate_build/passes_dump/09_after_ConvertTensorToBlockOps.py
    • Removed the file.
  • examples/pa5_predicate_build/passes_dump/10_after_InitMemRef.py
    • Removed the file.
  • examples/pa5_predicate_build/passes_dump/11_after_MemoryReuse.py
    • Removed the file.
  • examples/pa5_predicate_build/passes_dump/12_after_InsertSync.py
    • Removed the file.
  • examples/pa5_predicate_build/passes_dump/13_after_AllocateMemoryAddr.py
    • Removed the file.
  • examples/pa5_predicate_test.py
    • Removed the file.
  • examples/paged_attention_example.py
    • Removed the file.
  • examples/qwen3_32b_build/report/memory_after_AllocateMemoryAddr.txt
    • Removed the file.
  • examples/qwen3_32b_prefill_dump/report/prefill_kernel_local_tensor_summary.md
    • Removed the file.
  • examples/softmax_example.py
    • Removed the file.
  • junk_models/init.py
    • Removed the file.
  • junk_models/arctic/init.py
    • Removed the file.
  • junk_models/arctic/sum_lstm.py
    • Removed the file.
  • junk_models/deepseek_v32_exp/init.py
    • Removed the file.
  • junk_models/deepseek_v32_exp/lightning_indexer_prolog_quant.py
    • Removed the file.
  • junk_models/deepseek_v32_exp/lightning_indexer_quant.py
    • Removed the file.
  • junk_models/deepseek_v32_exp/mla_indexer_prolog_quant.py
    • Removed the file.
  • junk_models/deepseek_v32_exp/mla_prolog_quant.py
    • Removed the file.
  • junk_models/deepseek_v32_exp/sparse_attention_antiquant.py
    • Removed the file.
  • junk_models/deepseek_v32_exp/sparse_flash_attention_quant.py
    • Removed the file.
  • junk_models/deepseek_v32_exp/sparse_flash_attention_quant_withscope.py
    • Removed the file.
  • junk_models/glm_v4_5/init.py
    • Removed the file.
  • junk_models/glm_v4_5/glm_attention.py
    • Removed the file.
  • junk_models/glm_v4_5/glm_attention_fusion.py
    • Removed the file.
  • junk_models/glm_v4_5/glm_attention_pre_quant.py
    • Removed the file.
  • junk_models/glm_v4_5/glm_ffn_common_interface.py
    • Removed the file.
  • junk_models/glm_v4_5/glm_ffn_shared_expert_quant.py
    • Removed the file.
  • junk_models/glm_v4_5/glm_gate.py
    • Removed the file.
  • junk_models/glm_v4_5/glm_matmul_allreduce_add_rmsnorm.py
    • Removed the file.
  • junk_models/glm_v4_5/glm_moe_fusion.py
    • Removed the file.
  • junk_models/glm_v4_5/glm_select_experts.py
    • Removed the file.
  • junk_models/qwen3_next/init.py
    • Removed the file.
  • junk_models/qwen3_next/gated_delta_rule.py
    • Removed the file.
  • junk_tensor_functions/init.py
    • Removed the file.
  • junk_tensor_functions/cast_primitives.py
    • Removed the file.
  • junk_tensor_functions/composite.py
    • Removed the file.
  • junk_tensor_functions/elementwise_binary.py
    • Removed the file.
  • junk_tensor_functions/elementwise_unary.py
    • Removed the file.
  • junk_tensor_functions/indexing.py
    • Removed the file.
  • junk_tensor_functions/linalg.py
    • Removed the file.
  • junk_tensor_functions/reduction.py
    • Removed the file.
  • junk_tensor_functions/tiling.py
    • Removed the file.
  • junk_tensor_functions/type_layout.py
    • Removed the file.
  • para_for.md
    • Renamed the file to 'docs/para_for.md'.
  • porting_to_pypto_v3.md
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/PROJECT_ANALYSIS.md
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/lightning_indexer_prolog_quant.py
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/README.md
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernel_config.py
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aic/incore_matmul.pto
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aic/incore_matmul_acc.pto
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aic/incore_matmul_nn.pto
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_add.pto
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_layernorm.pto
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_mul.pto
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_neg.pto
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_softmax.pto
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/kernels/aiv/incore_symmetric_quant.pto
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/orchestration/LightningIndexerPrologQuant.cpp
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/build_output/report/memory_after_AllocateMemoryAddr.txt
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/pypto_src/golden.py
    • Removed the file.
  • projects/deepseek_v32_exp_lightning_indexer_prolog_quant/run_a2a3_swimlane.sh
    • Removed the file.
  • projects/paged-attention/paged_attention.py
    • Removed the file.
  • pto2_rt.md
    • Renamed the file to 'docs/pto2_rt.md'.
  • pypto-frontend-coding-style.md
    • Renamed the file to 'docs/pypto-frontend-coding-style.md'.
Activity
  • Pre-commit hooks passed (check-headers, check-english-only).
  • CI 'hello_world --sim' test is pending.
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

@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 pull request introduces a significant refactoring to clean up the repository structure. It removes a large number of archived directories, non-essential examples, and outdated documentation files, which greatly improves the project's maintainability. The core documentation has been centralized into a new docs/ directory. The corresponding path updates in configuration files like .claude/CLAUDE.md and issue templates appear to be correct and consistent with these changes. I have found one minor issue regarding a broken relative link within one of the moved documentation files. Given the large scale of this refactoring, it is crucial to ensure that all remaining examples and tests are functional and that no essential code has been inadvertently removed.

@zhangqi-chen zhangqi-chen merged commit 7e00d41 into hw-native-sys:main Mar 17, 2026
4 checks passed
@zhangqi-chen zhangqi-chen deleted the refactor/cleanup-repo branch March 17, 2026 08:27
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.

1 participant