[INFO] Initializing environment for https://gitcode.com/pre-commit/pre-commit-hooks. [WARNING] repo `https://gitcode.com/pre-commit/pre-commit-hooks` uses deprecated stage names (commit, push) which will be removed in a future version. Hint: often `pre-commit autoupdate --repo https://gitcode.com/pre-commit/pre-commit-hooks` will fix this. if it does not -- consider reporting an issue to that repo. [INFO] Initializing environment for https://gitcode.com/pre-commit-clang/mirrors-clang-format. [INFO] Initializing environment for https://gitcode.com/gh_mirrors/ru/ruff-pre-commit. [INFO] Initializing environment for https://gitcode.com/gh_mirrors/co/codespell. [INFO] Installing environment for https://gitcode.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://gitcode.com/pre-commit-clang/mirrors-clang-format. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://gitcode.com/gh_mirrors/ru/ruff-pre-commit. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://gitcode.com/gh_mirrors/co/codespell. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... trim trailing whitespace.................................................Passed fix end of files.........................................................Failed - hook id: end-of-file-fixer - exit code: 1 - files were modified by this hook Fixing examples/add_example/tests/ut/op_kernel/test_add_example.cpp check yaml...........................................(no files to check)Skipped check for added large files..............................................Passed check for merge conflicts................................................Passed detect private key.......................................................Passed check json...........................................(no files to check)Skipped clang-format.............................................................Failed - hook id: clang-format - files were modified by this hook Formatting [1/1] examples/add_example/tests/ut/op_kernel/test_add_example.cpp ruff check...........................................(no files to check)Skipped ruff format..........................................(no files to check)Skipped codespell................................................................Passed All changes made by hooks: diff --git a/examples/add_example/tests/ut/op_kernel/test_add_example.cpp b/examples/add_example/tests/ut/op_kernel/test_add_example.cpp index 4bf8ecf..97c1975 100644 --- a/examples/add_example/tests/ut/op_kernel/test_add_example.cpp +++ b/examples/add_example/tests/ut/op_kernel/test_add_example.cpp @@ -26,14 +26,8 @@ using namespace std; class add_example_test : public testing::Test { protected: - static void SetUpTestCase() - { - cout << "add_example_test SetUp\n" << endl; - } - static void TearDownTestCase() - { - cout << "add_example_test TearDown\n" << endl; - } + static void SetUpTestCase() { cout << "add_example_test SetUp\n" << endl; } + static void TearDownTestCase() { cout << "add_example_test TearDown\n" << endl; } }; TEST_F(add_example_test, test_case_0) @@ -74,13 +68,7 @@ TEST_F(add_example_test, test_case_0) ICPU_SET_TILING_KEY(0); AscendC::SetKernelMode(KernelMode::AIV_MODE); - ICPU_RUN_KF(AddExampleKernel, - blockDim, - x, - y, - z, - workspace, - (uint8_t *)(tilingDatafromBin)); + ICPU_RUN_KF(AddExampleKernel, blockDim, x, y, z, workspace, (uint8_t*)(tilingDatafromBin)); // 逐元素校验输出(float32 加法位精确,可位级比较) const float* zFloat = reinterpret_cast(z); @@ -94,4 +82,4 @@ TEST_F(add_example_test, test_case_0) AscendC::GmFree(workspace); AscendC::GmFree(tiling); free(path_); -} \ No newline at end of file +}