| 730 | class CPUBackendCopyBufferTest : public MNNTestCase { |
| 731 | public: |
| 732 | virtual bool run(int precision) { |
| 733 | auto type = MNN_FORWARD_CPU; |
| 734 | auto creator = MNNGetExtraRuntimeCreator(type); |
| 735 | for (int p = 0; p < 3; ++p) { |
| 736 | MNN::Backend::Info info; |
| 737 | info.type = type; |
| 738 | BackendConfig user; |
| 739 | user.precision = (MNN::BackendConfig::PrecisionMode)p; |
| 740 | info.user = &user; |
| 741 | std::shared_ptr<Runtime> runtime(creator->onCreate(info)); |
| 742 | MNN_PRINT("Test %d Backend for %d \n", type, user.precision); |
| 743 | std::shared_ptr<Backend> bn(runtime->onCreate(&user)); |
| 744 | auto res = NC4HW4_2_NC4HW4_IntType<int32_t>(bn); |
| 745 | res = res && NC4HW4_2_NC4HW4_IntType<int16_t>(bn); |
| 746 | res = res && NC4HW4_2_NC4HW4_IntType<int8_t>(bn); |
| 747 | res = res && nhwc_2_NC4HW4_2_nhwc_inttype<int32_t>(bn); |
| 748 | res = res && nhwc_2_NC4HW4_2_nhwc_inttype<int16_t>(bn); |
| 749 | res = res && nhwc_2_NC4HW4_2_nhwc_inttype<int8_t>(bn); |
| 750 | if (!res) { |
| 751 | MNN_ERROR("Error for Int Copy\n"); |
| 752 | return false; |
| 753 | } |
| 754 | } |
| 755 | return true; |
| 756 | } |
| 757 | }; |
| 758 | |
| 759 | class BackendCopyBufferUint8Test : public MNNTestCase { |
nothing calls this directly
no test coverage detected