中文
注册
我要评分
文档获取效率
文档正确性
内容完整性
文档易理解
在线提单
论坛求助

向量化检查

stage('vectorized-check') {
                            steps {
                                echo '====== 向量化检查 ======'
                                sh '''
                                    if [ ! -d "./report_dir" ]; then mkdir -p ./report_dir; fi
/usr/bin/rm -rf ./report_dir/*.html
                                    devkit advisor vec-check -i /opt/DevKit/testcase/affinity/vec/simple -f 
                                    /opt/DevKit/testcase/affinity/vec/BCfiles -c make -r html -o ./report_dir
                                    mv ./report_dir/vec-check*.html ./report_dir/vectorized-check.html
                                '''
                            }
                            post {
                                always {
                                    publishHTML(target: [allowMissing: false,
                                                alwaysLinkToLastBuild: false,
                                                keepAll              : true,
                                                reportDir            : './report_dir',
                                                reportFiles          : 'vectorized-check.html',
                                                reportName           : 'vectorized-check Report']
                                                )
                                }
                            }
                        }

具体参数如表1所示。

表1 向量化检查参数说明

参数

参数选项

参数说明

-i/--input

package_path

必选参数。BC文件对应的源码文件夹路径。

例如:/home/test

-f/--bc-file

path

必选参数。BC文件路径,该路径下必须存在BC文件。

例如:/home/testbc

-c/--cmd

cmd

必选参数。源码的构建命令。

例如:make all

-p/--compiler

gcc,clang

可选参数。编译器,默认为clang。

例如:gcc。

-o/--output

output_path

可选参数。报告存放路径,报告默认存放在当前执行路径下,名称默认为“特性名称_时间戳”。

--set-timeout

time

可选参数。任务超时时间,默认无超时时间,任务将持续执行直到结束。

-l/--log-level

0,1,2,3

可选参数。设置日志等级,日志等级分类有0(DEBUG)、1(INFO)、2(WARNING)、3(ERROR),默认为1(INFO)。

-r/--report-type

all,json,html,csv

可选参数。扫描报告的格式,默认为all,即默认生成json、html、csv三种报告。

--sve-enable

true,false

可选参数。是否启用sve,默认不开启。

  • 使用向量化检查功能时,代码示例中需要添加BC文件对应的源码文件路径、BC文件路径、源码构建命令、报告输出格式以及报告存放地址。

    格式:devkit advisor vec-check -i BC文件对应的源码文件路径 -f BC文件路径 -c 源码的构建命令 –r html -o 报告存放地址

    示例:devkit advisor vec-check -i /opt/DevKit/testcase/affinity/vec/simple -f /opt/DevKit/testcase/affinity/vec/BCfiles -c make –r html -o ./report_dir

  • 使用向量化检查建议放在构建流程节点前。