Pull Request已成功合入, 合并人@ascend-robot
(感谢 刘家旺 的贡献)Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-Ascend/msit | ✅ jhon-117, minghang_c (2/2) | ✅ jhon-117 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


msprechecker/msprechecker/cmate/custom_fn.pydef get_conf_pagesize():
return os.sysconf('SC_PAGESIZE')为 `get_conf_pagesize` 函数添加文档字符串,说明其功能、返回值和可能的异常。例如:def get_conf_pagesize():
"""
获取系统内存页面大小(以字节为单位)。Returns: int: 系统配置的页面大小。如果获取失败,返回一个默认值(如4096)。 """ try: return os.sysconf('SC_PAGESIZE') except (OSError, ValueError): return 4096</pre><div style='margin-top: 4px; font-size: 9px; color: #999;'>---<br>此评论由代码审查工具自动生成</div></div>


问题/功能描述
本次PR主要包含两项功能增强。首先,为CMATE表达式引擎增加了对逻辑“非”运算符(not)的支持,解决了现有引擎无法处理逻辑否定运算的问题。其次,新增了系统内存页大小获取能力,并基于此在MindIE配置检查规则中,新增了对HCCL_RDMA_PCIE_DIRECT_POST_NOSTRICT环境变量与系统页大小组合的配置校验,旨在避免在特定页大小(4KB/64KB)下因配置不当导致的性能劣化或内存碎片化引发OOM的风险。
修改方案描述
修改方案分为两部分。一是在表达式求值器的运算符映射表中新增逻辑“非”运算符(not)的处理逻辑,并新增get_conf_pagesize自定义函数以通过os.sysconf获取系统内存页大小。二是在配置检查规则文件中,利用获取的页大小,新增了三条断言规则,用于在校验时根据页大小(4KB或64KB)对HCCL_RDMA_PCIE_DIRECT_POST_NOSTRICT环境变量的配置给出提示、报错或建议,从而引导用户进行正确配置。


compile


compile


/lgtm


/approve


Review Guide
This pull-request passes review.
Committers who wrote a comment of /approve are: jhon-117.
Reviewers who wrote a comment of /lgtm are: jhon-117, minghang_c.


关联 issue:https://gitcode.com/Ascend/msit/issues/394
当

HCCL_RDMA_PCIE_DIRECT_POST_NOSTRICT为 TRUE,且 pagesize 为 4096 时,提示用户配置了没有用自验证:
当

HCCL_RDMA_PCIE_DIRECT_POST_NOSTRICT为 TRUE,且 pagesize 为 65536 时,告警用户配置了会 OOM当

HCCL_RDMA_PCIE_DIRECT_POST_NOSTRICT不为 TRUE,且 pagesize 为 65536 时,提示用户换一个 pagesize