1 Star 0 Fork 50

刘智杰/Ark-workload

forked from xliu/Ark-workload 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
run_aot.sh 5.55 KB
一键复制 编辑 原始数据 按行查看 历史
linan0 提交于 2023-11-24 20:15 . xts_acts_ffixts
#!/bin/sh
declare -A testSets
testSets["arrayAccess"]="./ts-swift-workload/array-access/ts/"
testSets["fannkuc-redux"]="./ts-swift-workload/array-access/ts/"
testSets["fastarepeat"]="./ts-swift-workload/array-access/ts/"
testSets["fastarandom1"]="./ts-swift-workload/array-access/ts/"
testSets["fastarandom2"]="./ts-swift-workload/array-access/ts/"
testSets["mandelbrot"]="./ts-swift-workload/array-access/ts/"
testSets["spectralnorm"]="./ts-swift-workload/array-access/ts/"
testSets["threeDCube"]="./ts-swift-workload/array-access/ts/"
testSets["threeDRaytrace"]="./ts-swift-workload/array-access/ts/"
# testSets["Deep_Nested_Call"]="./ts-swift-workload/function-call/ts/"
testSets["Method_Call"]="./ts-swift-workload/function-call/ts/"
testSets["Normal_Call"]="./ts-swift-workload/function-call/ts/"
testSets["Pointer_Call"]="./ts-swift-workload/function-call/ts/"
testSets["Pointer_Paraless_Call"]="./ts-swift-workload/function-call/ts/"
# testSets["Shallow_Nested_Call"]="./ts-swift-workload/function-call/ts/"
testSets["nbody"]="./ts-swift-workload/nbody/ts/"
testSets["cocos"]="./ts-swift-workload/cocos/ts/"
testSets["cocos_airplane"]="./ts-swift-workload/cocos/ts/"
testSets["bitops"]="./ts-swift-workload/numerical-calculation/ts/"
testSets["cordic"]="./ts-swift-workload/numerical-calculation/ts/"
testSets["numericalComputation"]="./ts-swift-workload/numerical-calculation/ts/"
testSets["partialSum"]="./ts-swift-workload/numerical-calculation/ts/"
# testSets["propertyaccess1"]="./ts-swift-workload/property-access/ts/"
testSets["propertyaccess2"]="./ts-swift-workload/property-access/ts/"
testSets["splay"]="./ts-swift-workload/splay/ts/"
read -p "is_standalone? true or false: " choice
echo $choice
True="true"
False="false"
if [[ "$choice" == "false" ]] ; then
read -p "Choose your target from [rk3568, hispark_taurus_standard]: " target
if [[ "$target" == "rk3568" || "$target" == "hispark_taurus_standard" ]]; then
../../out/${target}/clang_x64/arkcompiler/ets_frontend/es2abc ../../arkcompiler/ets_runtime/ecmascript/ts_types/lib_ark_builtins.d.ts --type-extractor --type-dts-builtin --module --merge-abc --extension=ts --output ../../arkcompiler/ets_runtime/ecmascript/ts_types/lib_ark_builtins.d.abc
../../out/${target}/clang_x64/arkcompiler/ets_frontend/es2abc ./utils/assert.ts --merge-abc --module --output ./utils/assert.abc
../../out/${target}/clang_x64/arkcompiler/ets_frontend/es2abc ./utils/benchmarkTsSuite.ts --merge-abc --module --output ./utils/benchmarkTsSuite.abc
export LD_LIBRARY_PATH=../../out/${target}/clang_x64/lib.unstripped/clang_x64/arkcompiler/ets_runtime:../../out/${target}/clang_x64/lib.unstripped/clang_x64/test/test:../../out/${target}/clang_x64/lib.unstripped/clang_x64/thirdparty/icu:prebuilts/clang/ohos/linux-x86_64/llvm/lib:../../out/${target}/clang_x64/lib.unstripped/clang_x64/thirdparty/zlib
for key in ${!testSets[@]};do
ts_file=${testSets[${key}]}${key}.ts
file_name=${key}
abc_file=${testSets[${key}]}${key}.abc
echo ${ts_file}
echo ${file_name}
echo ${abc_file}
../../out/${target}/clang_x64/arkcompiler/ets_frontend/es2abc ${ts_file} --type-extractor --type-dts-builtin --module --merge-abc --extension=ts --output ${abc_file}
../../out/${target}/clang_x64/exe.unstripped/clang_x64/arkcompiler/ets_runtime/ark_aot_compiler --builtins-dts=../../arkcompiler/ets_runtime/ecmascript/ts_types/lib_ark_builtins.d.abc --aot-file=${file_name} ${abc_file}
../../out/${target}/clang_x64/exe.unstripped/clang_x64/arkcompiler/ets_runtime/ark_js_vm --icu-data-path "../../third_party/icu/ohos_icu4j/data" --log-level=info --asm-interpreter=true --entry-point=${file_name} --aot-file=${file_name} ${abc_file}
done
else
echo "Invalid target, please choose in [rk3568, hispark_taurus_standard]"
fi
elif [[ "$choice" == "true" ]] ; then
../../out/x64.release/arkcompiler/ets_frontend/es2abc ../../arkcompiler/ets_runtime/ecmascript/ts_types/lib_ark_builtins.d.ts --type-extractor --type-dts-builtin --module --merge-abc --extension=ts --output ../../arkcompiler/ets_runtime/ecmascript/ts_types/lib_ark_builtins.d.abc
../../out/x64.release/arkcompiler/ets_frontend/es2abc ./utils/assert.ts --merge-abc --module --output ./utils/assert.abc
../../out/x64.release/arkcompiler/ets_frontend/es2abc ./utils/benchmarkTsSuite.ts --merge-abc --module --output ./utils/benchmarkTsSuite.abc
export LD_LIBRARY_PATH=../../out/x64.release/lib.unstripped/arkcompiler/ets_runtime:../../out/x64.release/lib.unstripped/test/test:../../out/x64.release/lib.unstripped/thirdparty/icu:prebuilts/clang/ohos/linux-x86_64/llvm/lib:../../out/x64.release/lib.unstripped/thirdparty/zlib
for key in ${!testSets[@]};do
ts_file=${testSets[${key}]}${key}.ts
file_name=${key}
abc_file=${testSets[${key}]}${key}.abc
echo ${ts_file}
echo ${file_name}
echo ${abc_file}
../../out/x64.release/arkcompiler/ets_frontend/es2abc ${ts_file} --type-extractor --type-dts-builtin --module --merge-abc --extension=ts --output ${abc_file}
../../out/x64.release/arkcompiler/ets_runtime/ark_aot_compiler --builtins-dts=../../arkcompiler/ets_runtime/ecmascript/ts_types/lib_ark_builtins.d.abc --aot-file=${file_name} ${abc_file}
../../out/x64.release/arkcompiler/ets_runtime/ark_js_vm --icu-data-path "../../third_party/icu/ohos_icu4j/data" --log-level=info --asm-interpreter=true --entry-point=${file_name} --aot-file=${file_name} ${abc_file}
done
else
echo "Invalid input, please enter true or false"
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/liu-zhijie0614/ark-workload.git
git@gitee.com:liu-zhijie0614/ark-workload.git
liu-zhijie0614
ark-workload
Ark-workload
master

搜索帮助