From 8bc29bb0f9041b287e9f4f8d23d9ed347ec0a7ec Mon Sep 17 00:00:00 2001 From: 13611516375 Date: Wed, 9 Apr 2025 06:34:18 +0000 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E9=81=BFmsprof=20op=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E5=87=BA=E7=8E=B0=E7=BB=93=E6=9E=9C=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- operator_contrib/MatmulLeakyReluCustom/AclNNInvocation/run.sh | 2 +- .../MatmulLeakyReluCustom/AclNNInvocation/scripts/gen_data.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/operator_contrib/MatmulLeakyReluCustom/AclNNInvocation/run.sh b/operator_contrib/MatmulLeakyReluCustom/AclNNInvocation/run.sh index 351ecfc37..97520806d 100755 --- a/operator_contrib/MatmulLeakyReluCustom/AclNNInvocation/run.sh +++ b/operator_contrib/MatmulLeakyReluCustom/AclNNInvocation/run.sh @@ -82,7 +82,7 @@ function main { # 4. 运行可执行文件 cd $CURRENT_DIR/output echo "INFO: execute op!" - msprof op ./execute_matmul_leakyrelu_op + msprof --application="./execute_matmul_leakyrelu_op" if [ $? -ne 0 ]; then echo "ERROR: acl executable run failed! please check your project!" return 1 diff --git a/operator_contrib/MatmulLeakyReluCustom/AclNNInvocation/scripts/gen_data.py b/operator_contrib/MatmulLeakyReluCustom/AclNNInvocation/scripts/gen_data.py index 05099df29..10d72e241 100644 --- a/operator_contrib/MatmulLeakyReluCustom/AclNNInvocation/scripts/gen_data.py +++ b/operator_contrib/MatmulLeakyReluCustom/AclNNInvocation/scripts/gen_data.py @@ -22,7 +22,7 @@ def gen_golden_data(): input_bias = np.random.randint(1, 10, [N]).astype(np.float32) alpha = 0.001 golden = (np.matmul(input_a.astype(np.float32), input_b.astype(np.float32))).astype(np.float32) - # golden = np.where(golden >= 0, golden, golden * alpha) + golden = np.where(golden >= 0, golden, golden * alpha) os.system("mkdir -p input") os.system("mkdir -p output") input_a.tofile("./input/input_a.bin") -- Gitee