Repository navigation
feat(pto): default disable LegalizePTOVMIMemoryAccess - #28
Open
wangchen965 wants to merge 1 commit into
Open
wangchen965 wants to merge 1 commit into
wangchen965 wants to merge 1 commit into
Conversation
wangchen965
force-pushed
the
memory
branch
2 times, most recently
from
October 26, 2026 11:16
42f5f1c to
5a18426
Compare
KurrinQu
reviewed
Oct 26, 2026
| TL_ENABLE_AUTO_SCHEDULE = "tl.enable_auto_schedule" | ||
| """Enable Ascend auto scheduling. Default: True.""" | ||
|
|
||
| TL_ENABLE_PTO_VMI_COVERAGE_CHECK = "tl.enable_pto_vmi_coverage_check" |
There was a problem hiding this comment.
新增 Python PassConfigKey 不能代替 C++ PassContext 配置注册。当前代码没有注册 tl.enable_pto_vmi_coverage_check,所以文档中的 pass_configs={...: True} 在建立 PassContext 时就会报 Invalid config option,还未进入 pipeline;设置 False 同样失败。请参照 tl.enable_auto_schedule 注册 Bool 配置,增加对应的TVM_REGISTER_PASS_CONFIG_OPTION(..., Bool),沿用现有配置声明方式。验证显式配置能够覆盖环境变量默认值。
Author
There was a problem hiding this comment.
Fixed in src/ascend/op/builtin.cc
TVM_REGISTER_PASS_CONFIG_OPTION(kEnablePtoVmiCoverageCheck, Bool);
Signed-off-by: wangchen <wangchen965@huawei.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LegalizePTOVMIMemoryAccess is not enabled by default. Due to the shortcomings of the analysis ability of community tvm, LegalizePTOvmiMemoryAccess is added at present, and the writing method that may lead to physical cross-border reading is rejected, but this will affect the usability of VMI.
Take
x_ub = T.alloc_shared((heads_per_task, hidden_size), T.bfloat16)as an example.Original writing:
x_f32 = V.vcvt(V.vload(x_ub[head_id, offset], size=vec_size), 'float32')LegalizePTOVMIMemoryAccess will reject this writing, and you need to write:
Now, LegalizePTOvmiMemoryAccess is set to be disabled by default, allowing the use of the original writing method.
Usage
or