Open
告警清理 #6
hedongdongAdd on Sep 23
H
hedongdongCollaborators
Sep 23 Create
Sep 23 Create


Sep 23 Modify description of issue
hedongdong
Sep 23 Comments:
Sep 23 Comments:
432 e0f67d00f880634752a75d72ac79662b clangTidy G.PRE.01-CPP 禁止使用宏来表示常量 huawei-macro-define-not-const #define GMM_TPL_FLOAT 0 Macros are not allowed to represent constants. 23 hyper_parallel/core/multicore/ops/hyper_mega_moe/op_kernel/hyper_mega_moe_tiling_key.h check_code/hyper_parallel/core/multicore/ops/hyper_mega_moe https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/e0f67d00f880634752a75d72ac79662b?defectIndex=1&allMergedRequest=false Zhanghanbo zhanghanbo7@huawei.com 贺冬冬
434 e1873a4b48f1a52a50f0116be14a2a16 clangTidy G.PRE.01-CPP 禁止使用宏来表示常量 huawei-macro-define-not-const #define GROUPED_MATMUL_GROUP_LIST_TYPE_SPARSEM 2 Macros are not allowed to represent constants. 32 hyper_parallel/core/multicore/ops/hyper_mega_moe/op_kernel/hyper_mega_moe_tiling_key.h check_code/hyper_parallel/core/multicore/ops/hyper_mega_moe https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/e1873a4b48f1a52a50f0116be14a2a16?defectIndex=1&allMergedRequest=false Zhanghanbo zhanghanbo7@huawei.com 贺冬冬
441 e6a04db12efbb91804c15787223c2945 clangTidy G.FUN.01-CPP 函数功能要单一 readability-function-size_parameters hyper_mega_moe() __global__ __aicore__ void hyper_mega_moe( function 'hyper_mega_moe' exceeds recommended size/complexity thresholds 23 hyper_parallel/core/multicore/ops/hyper_mega_moe/op_kernel/hyper_mega_moe.cpp check_code/hyper_parallel/core/multicore/ops/hyper_mega_moe https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/e6a04db12efbb91804c15787223c2945?defectIndex=1&allMergedRequest=false hedongdong hedongdong@huawei.com 贺冬冬
443 e8f9bc37fa4c5bbd264fa962e6868475 clangTidy G.PRE.01-CPP 禁止使用宏来表示常量 huawei-macro-define-not-const #define GROUPED_MATMUL_GROUP_LIST_TYPE_CUMSUM 0 Macros are not allowed to represent constants. 30 hyper_parallel/core/multicore/ops/hyper_mega_moe_grad/op_kernel/hyper_mega_moe_grad_tiling_key.h check_code/hyper_parallel/core/multicore/ops/hyper_mega_moe_grad https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/e8f9bc37fa4c5bbd264fa962e6868475?defectIndex=1&allMergedRequest=false Zhanghanbo zhanghanbo7@huawei.com 贺冬冬
447 eb8cf4ae6d4f6864fbb43031f7132ce6 CodeMars G.LOG.02 使用日志记录工具实现日志功能 BD_use_logging_tool_to_record_log sys.stderr.write(f"[HP-NATIVE-DEPENDENCY-ERROR] {error}\n") recommended use logging module. function(sys.stderr.write) 224 hyper_parallel/core/multicore/_build/prepare_dependencies.py check_code/hyper_parallel/core/multicore/_build https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/eb8cf4ae6d4f6864fbb43031f7132ce6?defectIndex=1&allMergedRequest=false hedongdong hedongdong@huawei.com 贺冬冬
451 edfe2f90444cb884de3cf2d1263c8c8b clangTidy G.PRE.01-CPP 禁止使用宏来表示常量 huawei-macro-define-not-const #define GROUPED_MATMUL_A16W8_KERNEL_TEMPLATE_NONE 0 Macros are not allowed to represent constants. 41 hyper_parallel/core/multicore/ops/hyper_mega_moe_grad/op_kernel/hyper_mega_moe_grad_tiling_key.h check_code/hyper_parallel/core/multicore/ops/hyper_mega_moe_grad https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/edfe2f90444cb884de3cf2d1263c8c8b?defectIndex=1&allMergedRequest=false Zhanghanbo zhanghanbo7@huawei.com 贺冬冬
455 f15bda6ce61b587e2b7bb3624e38a613 clangTidy G.PRE.01-CPP 禁止使用宏来表示常量 huawei-macro-define-not-const #define GROUPED_MATMUL_A8W4_KERNEL_TEMPLATE_MSD_API_DEQUANT 1 Macros are not allowed to represent constants. 35 hyper_parallel/core/multicore/ops/hyper_mega_moe_grad/op_kernel/hyper_mega_moe_grad_tiling_key.h check_code/hyper_parallel/core/multicore/ops/hyper_mega_moe_grad https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/f15bda6ce61b587e2b7bb3624e38a613?defectIndex=1&allMergedRequest=false Zhanghanbo zhanghanbo7@huawei.com 贺冬冬
457 f16c2259998568645b3c9611e226ed81 fixbotengine-cxx G.STD.02-CPP 使用std::string表示字符串 CPP_RULE_ID_NO_USE_CHAR_STAR FixedBufferWriter() FixedBufferWriter(char *buffer, std::size_t capacity) noexcept : buffer_(buffer), capacity_(capacity) {} Use std::string instead of char*. 36 hyper_parallel/core/multicore/shmem/ccsrc/runtime/log.cpp check_code/hyper_parallel/core/multicore/shmem/ccsrc https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/f16c2259998568645b3c9611e226ed81?defectIndex=1&allMergedRequest=false hedongdong hedongdong 贺冬冬
459 f1af8ef3b6f9d9581fc7ca1592d8c27f fixbotengine-cxx G.NAM.02-CPP C++文件名和类名保持一致 CPP_RULE_ID_FILE_NAME_SAME_AS_CLASS_NAME class AllocationRegistry final { Keep C++ file names the same as the class name.The className is AllocationRegistry ,the fileName is allocation 49 hyper_parallel/core/multicore/shmem/ccsrc/runtime/allocation.h check_code/hyper_parallel/core/multicore/shmem/ccsrc https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/f1af8ef3b6f9d9581fc7ca1592d8c27f?defectIndex=1&allMergedRequest=false wang_ziqi wangziqi4@huawei.com 王子麒
466 f58b4f28ca5301b52235fc2efd04da99 clangTidy G.PRE.01-CPP 禁止使用宏来表示常量 huawei-macro-define-not-const #define GROUPED_MATMUL_CUBE_ONLY 0 Macros are not allowed to represent constants. 45 hyper_parallel/core/multicore/ops/hyper_mega_moe/op_kernel/hyper_mega_moe_tiling_key.h check_code/hyper_parallel/core/multicore/ops/hyper_mega_moe https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/f58b4f28ca5301b52235fc2efd04da99?defectIndex=1&allMergedRequest=false Zhanghanbo zhanghanbo7@huawei.com 贺冬冬
480 f9e47e21c290fcdf9b8d762d3fbd2180 fixbotengine-cxx G.CNS.02 不要使用难以理解的字面量 C_RULE_ID_MAGICNUMBER FormatTimestamp() timestamp[length + 1U] = static_cast<char>('0' + milliseconds / 100); Do not use magic numbers.The number is 100 172 hyper_parallel/core/multicore/shmem/ccsrc/runtime/log.cpp check_code/hyper_parallel/core/multicore/shmem/ccsrc https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/f9e47e21c290fcdf9b8d762d3fbd2180?defectIndex=1&allMergedRequest=false hedongdong hedongdong 贺冬冬
486 fb20f1caef7b4b2b3f96fb2fb27ec0d0 fixbotengine-cxx G.NAM.02-CPP C++文件名和类名保持一致 CPP_RULE_ID_FILE_NAME_SAME_AS_CLASS_NAME class HyperMegaMoeGrad : public OpDef { Keep C++ file names the same as the class name.The className is HyperMegaMoeGrad ,the fileName is hyper_mega_moe_grad_def 18 hyper_parallel/core/multicore/ops/hyper_mega_moe_grad/op_host/hyper_mega_moe_grad_def.cpp check_code/hyper_parallel/core/multicore/ops/hyper_mega_moe_grad https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/fb20f1caef7b4b2b3f96fb2fb27ec0d0?defectIndex=1&allMergedRequest=false hedongdong hedongdong@huawei.com 贺冬冬
489 fc273e0a3a521f15761714a602bdf294 clangTidy G.PRE.01-CPP 禁止使用宏来表示常量 huawei-macro-define-not-const #define GMM_TPL_FLOAT16 1 Macros are not allowed to represent constants. 24 hyper_parallel/core/multicore/ops/hyper_mega_moe_grad/op_kernel/hyper_mega_moe_grad_tiling_key.h check_code/hyper_parallel/core/multicore/ops/hyper_mega_moe_grad https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/fc273e0a3a521f15761714a602bdf294?defectIndex=1&allMergedRequest=false Zhanghanbo zhanghanbo7@huawei.com 贺冬冬
496 ff8d9c3dcee1a5b0a133e7224522290b clangTidy G.PRE.01-CPP 禁止使用宏来表示常量 huawei-macro-define-not-const #define GROUPED_MATMUL_A8W4_KERNEL_TEMPLATE_NONE 0 Macros are not allowed to represent constants. 34 hyper_parallel/core/multicore/ops/hyper_mega_moe_grad/op_kernel/hyper_mega_moe_grad_tiling_key.h check_code/hyper_parallel/core/multicore/ops/hyper_mega_moe_grad https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/ff8d9c3dcee1a5b0a133e7224522290b?defectIndex=1&allMergedRequest=false Zhanghanbo zhanghanbo7@huawei.com 贺冬冬
498 ffb97765e853a0b0f87e4e6a1ae7863b clangTidy G.EXP.13-CPP 使用char、wchar_t等类型表示字符 huawei-use-proper-char-type FormatTimestamp() timestamp[length + 1U] = static_cast<char>('0' + milliseconds / 100); no use 'char' as left operand of binary operator '+' 172 hyper_parallel/core/multicore/shmem/ccsrc/runtime/log.cpp check_code/hyper_parallel/core/multicore/shmem/ccsrc https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/ffb97765e853a0b0f87e4e6a1ae7863b?defectIndex=1&allMergedRequest=false hedongdong hedongdong 贺冬冬
586 3f34878a89cd26943409c859313e227d pylint R0914 R0914 _decode_profile_slot() def _decode_profile_slot( Too many local variables (16/15) 738 hyper_parallel/core/multicore/profiler/profiling.py check_code/hyper_parallel/core/multicore/profiler https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/3f34878a89cd26943409c859313e227d?defectIndex=1&allMergedRequest=false hedongdong hedongdong 贺冬冬
650 6533699da5eac6780af73c77605a9367 pylint G.FNM.05 当函数返回值个数较多时,建议通过class/namedtuple/dataclass等具名形式进行封装 H3405 backward() return ( Too many return values in a return statement (7/5) 484 hyper_parallel/core/multicore/modules/mega_moe/function.py check_code/hyper_parallel/core/multicore/modules/mega_moe https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/6533699da5eac6780af73c77605a9367?defectIndex=1&allMergedRequest=false hedongdong hedongdong 贺冬冬
713 8eb87286790d32ca8a03c77f12b3d7b0 pylint G.FNM.07 建议妥善处理函数的返回值和异常 H3407 _measure_backend() warmup_loss, warmup_latency = _timed_step(workload) The return value and exception of the function are not processed 615 hyper_parallel/core/multicore/examples/mega_moe/qwen_moe_benchmark.py check_code/hyper_parallel/core/multicore/examples/mega_moe https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/8eb87286790d32ca8a03c77f12b3d7b0?defectIndex=1&allMergedRequest=false hedongdong hedongdong 贺冬冬
799 cab99e588d34b86bf52ad2504e327abc secbrella G.RES.01-CPP 外部数据作为数组索引或者内存操作长度时,需要校验其合法性 SecK_OutOfBoundsChecker hyper_parallel::multicore::shmem::runtime::log::(anonymous namespace)::FormatTimestamp " if (!converted || std::strftime(timestamp, sizeof(timestamp), ""%Y-%m-%d-%H:%M:%S"", &local_time) == 0) {
std::copy_n(kFallbackTimestamp.data(), kFallbackTimestamp.size(), timestamp);
timestamp[kFallbackTimestamp.size()] = '\0';
return;
}
const auto milliseconds =
std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count() % kMillisecondsPerSecond;
const std::size_t length = std::strlen(timestamp);
timestamp[length] = '.';
timestamp[length + 1U] = static_cast<char>('0' + milliseconds / 100);
timestamp[length + 2U] = static_cast<char>('0' + milliseconds / 10 % 10);
timestamp[length + 3U] = static_cast<char>('0' + milliseconds % 10);
timestamp[length + 4U] = '\0';
}
void FinishLine(char (&line)[kLogLineCapacity], std::size_t length, bool truncated) noexcept {
if (truncated && kTruncationMarker.size() + 2U < kLogLineCapacity) {
length = kLogLineCapacity - kTruncationMarker.size() - 2U;
std::copy_n(kTruncationMarker.data(), kTruncationMarker.size(), line + length);
length += kTruncationMarker.size();
" Overrunning array "timestamp" of 32 elements by accessing it with index "length + 1U" equal to 32 172 hyper_parallel/core/multicore/shmem/ccsrc/runtime/log.cpp check_code/hyper_parallel/core/multicore/shmem/ccsrc https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/cab99e588d34b86bf52ad2504e327abc?defectIndex=1&allMergedRequest=false hedongdong hedongdong 贺冬冬
799 cab99e588d34b86bf52ad2504e327abc secbrella G.RES.01-CPP 外部数据作为数组索引或者内存操作长度时,需要校验其合法性 SecK_OutOfBoundsChecker hyper_parallel::multicore::shmem::runtime::log::(anonymous namespace)::FormatTimestamp " timestamp[kFallbackTimestamp.size()] = '\0';
return;
}
const auto milliseconds =
std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count() % kMillisecondsPerSecond;
const std::size_t length = std::strlen(timestamp);
timestamp[length] = '.';
timestamp[length + 1U] = static_cast<char>('0' + milliseconds / 100);
timestamp[length + 2U] = static_cast<char>('0' + milliseconds / 10 % 10);
timestamp[length + 3U] = static_cast<char>('0' + milliseconds % 10);
timestamp[length + 4U] = '\0';
}
void FinishLine(char (&line)[kLogLineCapacity], std::size_t length, bool truncated) noexcept {
if (truncated && kTruncationMarker.size() + 2U < kLogLineCapacity) {
length = kLogLineCapacity - kTruncationMarker.size() - 2U;
std::copy_n(kTruncationMarker.data(), kTruncationMarker.size(), line + length);
length += kTruncationMarker.size();
}
length = std::min(length, kLogLineCapacity - 2U);
" Overrunning array "timestamp" of 32 elements by accessing it with index "length + 3U" equal to 32 174 hyper_parallel/core/multicore/shmem/ccsrc/runtime/log.cpp check_code/hyper_parallel/core/multicore/shmem/ccsrc https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/cab99e588d34b86bf52ad2504e327abc?defectIndex=1&allMergedRequest=false hedongdong hedongdong 贺冬冬
799 cab99e588d34b86bf52ad2504e327abc secbrella G.RES.01-CPP 外部数据作为数组索引或者内存操作长度时,需要校验其合法性 SecK_OutOfBoundsChecker hyper_parallel::multicore::shmem::runtime::log::(anonymous namespace)::FormatTimestamp " std::copy_n(kFallbackTimestamp.data(), kFallbackTimestamp.size(), timestamp);
timestamp[kFallbackTimestamp.size()] = '\0';
return;
}
const auto milliseconds =
std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count() % kMillisecondsPerSecond;
const std::size_t length = std::strlen(timestamp);
timestamp[length] = '.';
timestamp[length + 1U] = static_cast<char>('0' + milliseconds / 100);
timestamp[length + 2U] = static_cast<char>('0' + milliseconds / 10 % 10);
timestamp[length + 3U] = static_cast<char>('0' + milliseconds % 10);
timestamp[length + 4U] = '\0';
}
void FinishLine(char (&line)[kLogLineCapacity], std::size_t length, bool truncated) noexcept {
if (truncated && kTruncationMarker.size() + 2U < kLogLineCapacity) {
length = kLogLineCapacity - kTruncationMarker.size() - 2U;
std::copy_n(kTruncationMarker.data(), kTruncationMarker.size(), line + length);
length += kTruncationMarker.size();
}
" Overrunning array "timestamp" of 32 elements by accessing it with index "length + 2U" equal to 32 173 hyper_parallel/core/multicore/shmem/ccsrc/runtime/log.cpp check_code/hyper_parallel/core/multicore/shmem/ccsrc https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/cab99e588d34b86bf52ad2504e327abc?defectIndex=1&allMergedRequest=false hedongdong hedongdong 贺冬冬
799 cab99e588d34b86bf52ad2504e327abc secbrella G.RES.01-CPP 外部数据作为数组索引或者内存操作长度时,需要校验其合法性 SecK_OutOfBoundsChecker hyper_parallel::multicore::shmem::runtime::log::(anonymous namespace)::FormatTimestamp " return;
}
const auto milliseconds =
std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count() % kMillisecondsPerSecond;
const std::size_t length = std::strlen(timestamp);
timestamp[length] = '.';
timestamp[length + 1U] = static_cast<char>('0' + milliseconds / 100);
timestamp[length + 2U] = static_cast<char>('0' + milliseconds / 10 % 10);
timestamp[length + 3U] = static_cast<char>('0' + milliseconds % 10);
timestamp[length + 4U] = '\0';
}
void FinishLine(char (&line)[kLogLineCapacity], std::size_t length, bool truncated) noexcept {
if (truncated && kTruncationMarker.size() + 2U < kLogLineCapacity) {
length = kLogLineCapacity - kTruncationMarker.size() - 2U;
std::copy_n(kTruncationMarker.data(), kTruncationMarker.size(), line + length);
length += kTruncationMarker.size();
}
length = std::min(length, kLogLineCapacity - 2U);
for (std::size_t index = 0; index < length; ++index) {
" Overrunning array "timestamp" of 32 elements by accessing it with index "length + 4U" equal to 32 175 hyper_parallel/core/multicore/shmem/ccsrc/runtime/log.cpp check_code/hyper_parallel/core/multicore/shmem/ccsrc https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/cab99e588d34b86bf52ad2504e327abc?defectIndex=1&allMergedRequest=false hedongdong hedongdong 贺冬冬
800 cafee0e83edc209a2d2df92fc67a7d02 pylint R0914 R0914 fill() def fill( Too many local variables (16/15) 65 hyper_parallel/core/multicore/tasks/swiglu.py check_code/hyper_parallel/core/multicore/tasks https://clouddragon.huawei.com/codecheck/project/ge44d8d6612d54d568e3c74eeddc9a943/codecheck/task/yellow/73488617dc914c73a3cfb59129ab4419/defect/cafee0e83edc209a2d2df92fc67a7d02?defectIndex=1&allMergedRequest=false yuanjunkang yuanjunkang@huawei.com 苑骏康

