Skip to content

Fix: rename enable_profiling to runtime_profiling in RunConfig#91

Merged
zhangqi-chen merged 1 commit intohw-native-sys:mainfrom
zhangqi-chen:fix/rename-enable-profiling-to-runtime-profiling
Apr 10, 2026
Merged

Fix: rename enable_profiling to runtime_profiling in RunConfig#91
zhangqi-chen merged 1 commit intohw-native-sys:mainfrom
zhangqi-chen:fix/rename-enable-profiling-to-runtime-profiling

Conversation

@zhangqi-chen
Copy link
Copy Markdown
Collaborator

Summary

  • The pypto runtime API renamed RunConfig.enable_profiling to RunConfig.runtime_profiling
  • Updated all 21 example files (beginner, intermediate, qwen3, deepseek_v3_2) to use the new parameter name

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3511118e-a7f3-452a-b3b3-4a2f02e58922

📥 Commits

Reviewing files that changed from the base of the PR and between 453c80b and 23f78cf.

📒 Files selected for processing (21)
  • examples/beginner/hello_world.py
  • examples/beginner/matmul.py
  • examples/intermediate/gemm.py
  • examples/intermediate/layer_norm.py
  • examples/intermediate/rms_norm.py
  • examples/intermediate/rope.py
  • examples/intermediate/softmax.py
  • examples/models/deepseek_v3_2/deepseek_v3_2_decode_back.py
  • examples/models/deepseek_v3_2/deepseek_v3_2_decode_front.py
  • examples/models/deepseek_v3_2/deepseek_v3_2_prefill_back.py
  • examples/models/deepseek_v3_2/deepseek_v3_2_prefill_front.py
  • examples/models/qwen3/qwen3_32b_decode.py
  • examples/models/qwen3/qwen3_32b_decode_scope1.py
  • examples/models/qwen3/qwen3_32b_decode_scope12.py
  • examples/models/qwen3/qwen3_32b_decode_scope1_tile.py
  • examples/models/qwen3/qwen3_32b_decode_scope2.py
  • examples/models/qwen3/qwen3_32b_decode_scope3.py
  • examples/models/qwen3/qwen3_32b_decode_tilelet.py
  • examples/models/qwen3/qwen3_32b_prefill.py
  • examples/models/qwen3/qwen3_32b_prefill_tilelet.py
  • examples/models/qwen3/qwen3_32b_training_forward_and_backward.py
🚧 Files skipped from review as they are similar to previous changes (18)
  • examples/intermediate/gemm.py
  • examples/models/deepseek_v3_2/deepseek_v3_2_prefill_back.py
  • examples/models/qwen3/qwen3_32b_decode.py
  • examples/models/qwen3/qwen3_32b_training_forward_and_backward.py
  • examples/intermediate/rms_norm.py
  • examples/models/qwen3/qwen3_32b_decode_scope1_tile.py
  • examples/models/qwen3/qwen3_32b_prefill_tilelet.py
  • examples/models/deepseek_v3_2/deepseek_v3_2_decode_front.py
  • examples/models/qwen3/qwen3_32b_decode_scope3.py
  • examples/models/deepseek_v3_2/deepseek_v3_2_prefill_front.py
  • examples/models/qwen3/qwen3_32b_decode_tilelet.py
  • examples/intermediate/layer_norm.py
  • examples/intermediate/rope.py
  • examples/models/deepseek_v3_2/deepseek_v3_2_decode_back.py
  • examples/beginner/hello_world.py
  • examples/models/qwen3/qwen3_32b_decode_scope2.py
  • examples/models/qwen3/qwen3_32b_decode_scope1.py
  • examples/intermediate/softmax.py

📝 Walkthrough

Walkthrough

Rename profiling option across example scripts: function parameter enable_profilingruntime_profiling, RunConfig keyword enable_profiling=runtime_profiling=, and CLI flag --enable-profiling--runtime-profiling in multiple example files.

Changes

Cohort / File(s) Summary
Beginner Examples
examples/beginner/hello_world.py, examples/beginner/matmul.py
Function signature parameter renamed enable_profilingruntime_profiling; CLI flag --enable-profiling--runtime-profiling; RunConfig keyword updated to runtime_profiling=....
Intermediate Examples
examples/intermediate/gemm.py, examples/intermediate/layer_norm.py, examples/intermediate/rms_norm.py, examples/intermediate/rope.py, examples/intermediate/softmax.py
Same rename applied: function parameter, CLI flag, and RunConfig keyword changed from enable_profiling/--enable-profiling to runtime_profiling/--runtime-profiling.
DeepSeek v3.2 Models
examples/models/deepseek_v3_2/deepseek_v3_2_decode_back.py, examples/models/deepseek_v3_2/deepseek_v3_2_decode_front.py, examples/models/deepseek_v3_2/deepseek_v3_2_prefill_back.py, examples/models/deepseek_v3_2/deepseek_v3_2_prefill_front.py
Function signatures, CLI flags, and RunConfig keyword arguments renamed to use runtime_profiling.
Qwen3 32B Decode Variants
examples/models/qwen3/qwen3_32b_decode.py, examples/models/qwen3/qwen3_32b_decode_scope1.py, examples/models/qwen3/qwen3_32b_decode_scope12.py, examples/models/qwen3/qwen3_32b_decode_scope1_tile.py, examples/models/qwen3/qwen3_32b_decode_scope2.py, examples/models/qwen3/qwen3_32b_decode_scope3.py, examples/models/qwen3/qwen3_32b_decode_tilelet.py
Applied consistent rename of parameter, CLI flag, and RunConfig keyword from enable_profiling/--enable-profiling to runtime_profiling/--runtime-profiling.
Qwen3 Prefill & Training
examples/models/qwen3/qwen3_32b_prefill.py, examples/models/qwen3/qwen3_32b_prefill_tilelet.py, examples/models/qwen3/qwen3_32b_training_forward_and_backward.py
Same set of changes: function parameter, CLI flag, and RunConfig keyword updated to runtime_profiling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I hop through files with nimble paws,

renaming flags and changing laws.
enable_profiling takes a bow,
runtime_profiling leads the now.
Hooray—small hops, big cause! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: renaming enable_profiling to runtime_profiling in RunConfig across all 21 example files.
Description check ✅ Passed The description is related to the changeset, providing a concise summary of the API change and scope of updates across example files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@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 renames the "enable_profiling" parameter to "runtime_profiling" within "RunConfig" across multiple example scripts. The reviewer recommends renaming the associated local variables and function parameters to "runtime_profiling" as well to maintain naming consistency throughout the modified files.

dump_passes=dump_passes,
backend_type=backend,
enable_profiling=enable_profiling,
runtime_profiling=enable_profiling,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For consistency with the RunConfig parameter runtime_profiling, consider renaming the enable_profiling variable to runtime_profiling throughout this file. This includes the function parameter in compile_and_run, the command-line argument, and the variable used in the main execution block.

dump_passes=dump_passes,
backend_type=backend,
enable_profiling=enable_profiling,
runtime_profiling=enable_profiling,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For consistency with the RunConfig parameter runtime_profiling, consider renaming the enable_profiling variable to runtime_profiling throughout this file. This includes the function parameter in compile_and_run, the command-line argument, and the variable used in the main execution block.

dump_passes=dump_passes,
backend_type=backend,
enable_profiling=enable_profiling,
runtime_profiling=enable_profiling,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For consistency with the RunConfig parameter runtime_profiling, consider renaming the enable_profiling variable to runtime_profiling throughout this file. This includes the function parameter in compile_and_run, the command-line argument, and the variable used in the main execution block.

dump_passes=dump_passes,
backend_type=backend,
enable_profiling=enable_profiling,
runtime_profiling=enable_profiling,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For consistency with the RunConfig parameter runtime_profiling, consider renaming the enable_profiling variable to runtime_profiling throughout this file. This includes the function parameter in compile_and_run, the command-line argument, and the variable used in the main execution block.

dump_passes=dump_passes,
backend_type=backend,
enable_profiling=enable_profiling,
runtime_profiling=enable_profiling,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For consistency with the RunConfig parameter runtime_profiling, consider renaming the enable_profiling variable to runtime_profiling throughout this file. This includes the function parameter in compile_and_run, the command-line argument, and the variable used in the main execution block.

dump_passes=dump_passes,
backend_type=backend,
enable_profiling=enable_profiling,
runtime_profiling=enable_profiling,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For consistency with the RunConfig parameter runtime_profiling, consider renaming the enable_profiling variable to runtime_profiling throughout this file. This includes the function parameter in compile_and_run, the command-line argument, and the variable used in the main execution block.

dump_passes=dump_passes,
backend_type=BackendType.Ascend950,
enable_profiling=enable_profiling,
runtime_profiling=enable_profiling,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For consistency with the RunConfig parameter runtime_profiling, consider renaming the enable_profiling variable to runtime_profiling throughout this file. This includes the function parameter in compile_and_run, the command-line argument, and the variable used in the main execution block.

dump_passes=dump_passes,
backend_type=BackendType.Ascend950,
enable_profiling=enable_profiling,
runtime_profiling=enable_profiling,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For consistency with the RunConfig parameter runtime_profiling, consider renaming the enable_profiling variable to runtime_profiling throughout this file. This includes the function parameter in compile_and_run, the command-line argument, and the variable used in the main execution block.

dump_passes=dump_passes,
backend_type=BackendType.Ascend950,
enable_profiling=enable_profiling,
runtime_profiling=enable_profiling,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For consistency with the RunConfig parameter runtime_profiling, consider renaming the enable_profiling variable to runtime_profiling throughout this file. This includes the function parameter in compile_and_run, the command-line argument, and the variable used in the main execution block.

backend_type=BackendType.CCE,
work_dir=work_dir,
enable_profiling=enable_profiling,
runtime_profiling=enable_profiling,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For consistency with the RunConfig parameter runtime_profiling, consider renaming the enable_profiling variable to runtime_profiling throughout this file. This includes the function parameter in compile_and_run, the command-line argument, and the variable used in the main execution block.

The pypto runtime API renamed RunConfig.enable_profiling to
RunConfig.runtime_profiling. Update all 21 example files to match.
@zhangqi-chen zhangqi-chen force-pushed the fix/rename-enable-profiling-to-runtime-profiling branch from 453c80b to 23f78cf Compare April 10, 2026 02:32
@zhangqi-chen zhangqi-chen merged commit 5d85f1c into hw-native-sys:main Apr 10, 2026
5 checks passed
@zhangqi-chen zhangqi-chen deleted the fix/rename-enable-profiling-to-runtime-profiling branch April 10, 2026 02:39
sjduan pushed a commit to wangqin1723-max/pypto-lib that referenced this pull request Apr 10, 2026
sjduan pushed a commit to wangqin1723-max/pypto-lib that referenced this pull request Apr 10, 2026
wangqin1723-max pushed a commit to wangqin1723-max/pypto-lib that referenced this pull request Apr 13, 2026
wangqin1723-max pushed a commit to wangqin1723-max/pypto-lib that referenced this pull request Apr 13, 2026
wangqin1723-max added a commit to wangqin1723-max/pypto-lib that referenced this pull request Apr 13, 2026
…ons with FP32 projection output

Scope 1 (prefill_scope1.py):
- Scale to full Qwen3-32B: NUM_HEADS=64, MAX_SEQ=4096, HIDDEN=8192
- Change Q/K/V projection output from BF16 to FP32, aligning with
  decode_scope1 so scope 2 receives FP32 inputs without extra round-trip
- Remove intermediate FP32 buffer + BF16 cast; assemble matmul accumulator
  directly to output tensor
- Increase TOK_TILE from 16 to 64 for fewer task blocks
- Simplify golden: full-sequence vectorization, FP32 output
- Tighten tolerance from 2e-3 to 1e-3

Scope 1 wIOBuffer (prefill_scope1_wIOBuffer.py) [NEW]:
- I/O buffer caching wrapper for scope 1 via io_cache plugin
- wrap_golden_multi() helper for multi-output golden caching

Scope 3 (prefill_scope3.py):
- Scale to full Qwen3-32B: HIDDEN=8192, INTERMEDIATE=25600, MAX_SEQ=4096
- Increase TOK_TILE to 64, MLP_OUT_CHUNK to 128
- Simplify golden: full-sequence vectorization, pre-convert weights to FP32
- Clean up stage numbering and comments

Scope 3 wIOBuffer (prefill_scope3_wIOBuffer.py):
- Fix parameter name: enable_profiling -> runtime_profiling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
wangqin1723-max added a commit to wangqin1723-max/pypto-lib that referenced this pull request Apr 13, 2026
…ons with FP32 projection output

Scope 1 (prefill_scope1.py):
- Scale to full Qwen3-32B: NUM_HEADS=64, MAX_SEQ=4096, HIDDEN=8192
- Change Q/K/V projection output from BF16 to FP32, aligning with
  decode_scope1 so scope 2 receives FP32 inputs without extra round-trip
- Remove intermediate FP32 buffer + BF16 cast; assemble matmul accumulator
  directly to output tensor
- Increase TOK_TILE from 16 to 64 for fewer task blocks
- Simplify golden: full-sequence vectorization, FP32 output
- Tighten tolerance from 2e-3 to 1e-3

Scope 1 wIOBuffer (prefill_scope1_wIOBuffer.py) [NEW]:
- I/O buffer caching wrapper for scope 1 via io_cache plugin
- wrap_golden_multi() helper for multi-output golden caching

Scope 3 (prefill_scope3.py):
- Scale to full Qwen3-32B: HIDDEN=8192, INTERMEDIATE=25600, MAX_SEQ=4096
- Increase TOK_TILE to 64, MLP_OUT_CHUNK to 128
- Simplify golden: full-sequence vectorization, pre-convert weights to FP32
- Clean up stage numbering and comments

Scope 3 wIOBuffer (prefill_scope3_wIOBuffer.py):
- Fix parameter name: enable_profiling -> runtime_profiling
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