[ptodsl] remove pto.constexpr in favor of pto.const_expr#805
Conversation
There was a problem hiding this comment.
Code Review
This pull request renames pto.constexpr to pto.const_expr across the codebase, including documentation, tests, diagnostics, and the public API. Feedback on the changes includes removing an unused import of const_expr in _control_flow.py, updating an outdated error message in _diagnostics.py that still references constexpr, and refining the phrasing of another error message to be more professional.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| from ._bootstrap import make_context # noqa: F401 | ||
| from ._runtime_index_ops import coerce_runtime_index | ||
| from ._surface_types import const_expr |
|
|
||
| def jit_constexpr_missing_default_error(name: str) -> TypeError: | ||
| """Return one diagnostic for ``pto.constexpr`` params missing a default value.""" | ||
| """Return one diagnostic for ``pto.const_expr`` params missing a default value.""" |
There was a problem hiding this comment.
Although the docstring has been updated to reference pto.const_expr, the actual error message raised on line 105 still uses the old constexpr name: f"@pto.jit constexpr parameter '{name}' must declare a default value...". To prevent user confusion (since pto.constexpr is being completely removed), please update the error message string to use const_expr instead of constexpr.
| return TypeError( | ||
| f"@pto.jit keyword-only parameter '{name}' uses unsupported compile-time annotation {annotation!r}. " | ||
| "Compile-time @pto.jit parameters must remain keyword-only pto.constexpr values in this change; " | ||
| "Compile-time @pto.jit parameters must remain keyword-only pto.const_expr values in this change; " |
There was a problem hiding this comment.
The phrase 'in this change' in the error message is a bit colloquial and sounds like a temporary developer note. It would be cleaner and more professional to remove it.
| "Compile-time @pto.jit parameters must remain keyword-only pto.const_expr values in this change; " | |
| "Compile-time @pto.jit parameters must remain keyword-only pto.const_expr values; " |
Codex Review该评论由 review 机器人自动更新。
SummaryReview failed at stage Findings未生成结构化 findings,因为 review 过程提前失败。 Log Tail |
f98e63a to
4a18403
Compare
4a18403 to
c52114f
Compare
A3 板测失败
失败用例
|
A3 板测失败详情:PR #805orchestration_example_kernel_add
vector_example_dag_kernel_add_scalar
paged_attention_example_kernel_pv_matmul
paged_attention_example_kernel_init_inplace
vector_example_dag_kernel_add
paged_attention_example_kernel_online_update
paged_attention_example_kernel_softmax_prepare
orchestration_example_kernel_add_scalar
paged_attention_example_kernel_qk_matmul
orchestration_example_kernel_mul
vector_example_dag_kernel_mul
prelu
plan_memory_bind_tile_alias_liveness
plan_memory_peak_exact_capacity
plan_memory_loop_no_reuse_outer_live
plan_memory_if_yield
plan_memory_loop_in_if
plan_memory_peak_8_overlapping
plan_memory_if_in_loop
plan_memory_fragmentation_hole_fit
plan_memory_for_iter_args_yield
plan_memory_no_reuse_overlap
plan_memory_reuse_sequential
plan_memory_nested_loops
plan_memory_fragmentation_two_holes
rems
partition_view_verify_rank_mismatch_valid
partition_view_verify_valid
partition5d_dynamic
partition5d
sparse_attn_test_incore_7
decode_hca_test_incore_54
attention_swa_test_incore_40
decode_swa_test_incore_40
decode_csa_test_incore_81
attention_hca_test_incore_54
attention_csa_test_refresh_incore_81
tensor_view_layout_dn
rope_kv_cache
qwen3_decode_incore_4
post_rmsnorm
qwen3_decode_incore_1
qwen3_decode_incore_10
qwen3_decode_incore_11
rmsnorm
qwen3_decode_incore_6
qwen3_decode_incore_2
qwen3_decode_incore_7
qwen3_decode_incore_5
qwen3_decode_incore_12
test_barrier_sync
matmul
add_double_dynamic
nested_loop_confliect
rar_optimization_test
test_dynamic_valid_shape
test_auto_sync_tail_hint
compensation_test
rem
|
Summary
Testing