diff --git a/tests/test_tipc/static/dp/bert/benchmark_common/run_benchmark.sh b/tests/test_tipc/static/dp/bert/benchmark_common/run_benchmark.sh index f1eb8b2052bc..a8ddbfd99529 100644 --- a/tests/test_tipc/static/dp/bert/benchmark_common/run_benchmark.sh +++ b/tests/test_tipc/static/dp/bert/benchmark_common/run_benchmark.sh @@ -1,4 +1,18 @@ -#!/usr/bin/env bash +#!/bin/bash +# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Test training benchmark for a model. # Usage:bash benchmark/run_benchmark.sh ${model_item} ${bs_item} ${fp_item} ${run_mode} ${device_num} function _set_params(){ @@ -130,6 +144,7 @@ function _train(){ rm ${log_file} cp mylog/workerlog.0 ${log_file} fi + echo ${train_cmd} >> ${log_file} } source ${BENCHMARK_ROOT}/scripts/run_model.sh # 在该脚本中会对符合benchmark规范的log使用analysis.py 脚本进行性能数据解析;如果不联调只想要产出训练log可以注掉本行,提交时需打开 _set_params $@ diff --git a/tests/test_tipc/static/dp/gpt/benchmark_common/run_benchmark.sh b/tests/test_tipc/static/dp/gpt/benchmark_common/run_benchmark.sh index b5b0a8d096b2..fcfe447ef130 100644 --- a/tests/test_tipc/static/dp/gpt/benchmark_common/run_benchmark.sh +++ b/tests/test_tipc/static/dp/gpt/benchmark_common/run_benchmark.sh @@ -1,4 +1,19 @@ -#!/usr/bin/env bash +#!/bin/bash + +# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Test training benchmark for a model. # Usage:bash benchmark/run_benchmark.sh ${model_item} ${bs_item} ${fp_item} ${run_mode} ${device_num} function _set_params(){ @@ -108,6 +123,7 @@ function _train(){ rm ${log_file} cp mylog/workerlog.0 ${log_file} fi + echo ${train_cmd} >> ${log_file} } source ${BENCHMARK_ROOT}/scripts/run_model.sh # 在该脚本中会对符合benchmark规范的log使用analysis.py 脚本进行性能数据解析;如果不联调只想要产出训练log可以注掉本行,提交时需打开 _set_params $@ diff --git a/tests/test_tipc/static/dp/transformer/benchmark_common/run_benchmark.sh b/tests/test_tipc/static/dp/transformer/benchmark_common/run_benchmark.sh index fe29d9a0fc8e..d961790145fb 100644 --- a/tests/test_tipc/static/dp/transformer/benchmark_common/run_benchmark.sh +++ b/tests/test_tipc/static/dp/transformer/benchmark_common/run_benchmark.sh @@ -1,4 +1,19 @@ -#!/usr/bin/env bash +#!/bin/bash + +# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Test training benchmark for a model. # Usage:bash benchmark/run_benchmark.sh ${model_item} ${bs_item} ${fp_item} ${run_mode} ${device_num} function _set_params(){ @@ -87,7 +102,7 @@ function _train(){ *) echo "choose run_mode "; exit 1; esac echo "train_cmd: ${train_cmd} log_file: ${log_file}" - timeout 15m ${train_cmd} > ${log_file} 2>&1 + timeout 25m ${train_cmd} > ${log_file} 2>&1 if [ $? -ne 0 ];then echo -e "${model_name}, FAIL" else @@ -98,6 +113,7 @@ function _train(){ rm ${log_file} cp mylog/workerlog.0 ${log_file} fi + echo ${train_cmd} >> ${log_file} } source ${BENCHMARK_ROOT}/scripts/run_model.sh # 在该脚本中会对符合benchmark规范的log使用analysis.py 脚本进行性能数据解析;如果不联调只想要产出训练log可以注掉本行,提交时需打开 _set_params $@