@@ -1152,108 +1152,4 @@ TEST_F(DPU_WorkloadValidatorTest, Memory_Output_32Bits_NPU40) {
11521152 }
11531153}
11541154
1155-
1156- TEST_F (DPU_WorkloadValidatorTest, AutoPadding_support) {
1157- DPU_OperationSanitizer dut;
1158- VPUNN::SanityReport sane;
1159-
1160- DPUWorkload wl_ref{
1161- VPUDevice::NPU_RESERVED,
1162- Operation::ELTWISE,
1163- {VPUTensor (28 , 9 , 16 , 1 , DataType::FLOAT16)}, // input dimensions
1164- {VPUTensor (28 , 9 , 1 , 1 , DataType::UINT8)}, // output dimensions
1165- {1 , 1 }, // kernels
1166- {1 , 1 }, // strides
1167- {0 , 0 , 0 , 0 }, // padding
1168- ExecutionMode::CUBOID_8x16, // execution mode
1169- ActivationFunction::NONE, // activation
1170- 0 .0F , // act_sparsity
1171- 0 .0F , // weight_sparsity
1172- {swz_def, swz_def}, // input_swizzling
1173- {swz_def}, // output_swizzling
1174- 1 , // output_write_tiles
1175- {0 , 0 , 0 , 0 }, // offsets
1176- ISIStrategy::CLUSTERING, // isi_strategy
1177- false , // weight_sparsity_enabled
1178- };
1179- wl_ref.superdense_memory = true ;
1180-
1181- DPUWorkload wl_ref2{
1182- VPUDevice::NPU_RESERVED,
1183- Operation::AVEPOOL,
1184- {VPUTensor (32 , 80 , 16 , 1 , DataType::UINT8, Layout::ZXY)}, // input dimensions
1185- {VPUTensor (32 , 80 , 2 , 1 , DataType::UINT8, Layout::XYZ)}, // output dimensions
1186- {1 , 1 }, // kernels
1187- {1 , 1 }, // strides
1188- {0 , 0 , 0 , 0 }, // padding
1189- ExecutionMode::CUBOID_16x16, // execution mode
1190- ActivationFunction::NONE, // activation
1191- 0 .0F , // act_sparsity
1192- 0 .0F , // weight_sparsity
1193- {swz_def, swz_def}, // input_swizzling
1194- {swz_def}, // output_swizzling
1195- 1 , // output_write_tiles
1196- {0 , 0 , 0 , 0 }, // offsets
1197- ISIStrategy::CLUSTERING, // isi_strategy
1198- false , // weight_sparsity_enabled
1199- };
1200-
1201- DPUWorkload wl_ref3{
1202- VPUDevice::NPU_RESERVED,
1203- Operation::ELTWISE,
1204- {VPUTensor (224 , 43 , 16 , 1 , DataType::UINT8, Layout::ZXY)}, // input dimensions
1205- {VPUTensor (224 , 43 , 1 , 1 , DataType::FLOAT16, Layout::ZXY)}, // output dimensions
1206- {1 , 1 }, // kernels
1207- {1 , 1 }, // strides
1208- {0 , 0 , 0 , 0 }, // padding
1209- ExecutionMode::CUBOID_8x16, // execution mode
1210- ActivationFunction::NONE, // activation
1211- 0 .0F , // act_sparsity
1212- 0 .0F , // weight_sparsity
1213- {swz_def, swz_def}, // input_swizzling
1214- {swz_def}, // output_swizzling
1215- 1 , // output_write_tiles
1216- {0 , 0 , 0 , 0 }, // offsets
1217- ISIStrategy::CLUSTERING, // isi_strategy
1218- false , // weight_sparsity_enabled
1219- };
1220- wl_ref3.superdense_memory = true ;
1221-
1222- DPUWorkload wl_output_autopad{wl_ref};
1223- wl_output_autopad.output_autopad = true ;
1224-
1225- dut.check_and_sanitize (wl_output_autopad, sane);
1226- EXPECT_EQ (sane.value (), V (VPUNN::Cycles::NO_ERROR))
1227- << sane.info << " \n error is : " << VPUNN::Cycles::toErrorText (sane.value ()) << " \n "
1228- << wl_output_autopad;
1229-
1230- DPUWorkload wl_input_autopad{wl_ref};
1231- wl_input_autopad.input_autopad = true ;
1232- wl_input_autopad.inputs [0 ] = VPUTensor (
1233- {wl_ref.inputs [0 ].width (), wl_ref.inputs [0 ].height (), 5 , wl_ref.inputs [0 ].batches ()}, wl_ref.inputs [0 ]);
1234- wl_input_autopad.outputs [0 ] = VPUTensor (
1235- {wl_ref.outputs [0 ].width (), wl_ref.outputs [0 ].height (), 16 , wl_ref.outputs [0 ].batches ()}, wl_ref.outputs [0 ]);
1236-
1237- dut.check_and_sanitize (wl_input_autopad, sane);
1238- EXPECT_EQ (sane.value (), V (VPUNN::Cycles::ERROR_INVALID_INPUT_CONFIGURATION))
1239- << sane.info << " \n error is : " << VPUNN::Cycles::toErrorText (sane.value ()) << " \n "
1240- << wl_input_autopad;
1241-
1242- DPUWorkload wl2_output_autopad{wl_ref2};
1243- wl2_output_autopad.output_autopad = true ;
1244-
1245- dut.check_and_sanitize (wl2_output_autopad, sane);
1246- EXPECT_EQ (sane.value (), V (VPUNN::Cycles::NO_ERROR))
1247- << sane.info << " \n error is : " << VPUNN::Cycles::toErrorText (sane.value ()) << " \n "
1248- << wl2_output_autopad;
1249-
1250- DPUWorkload wl3_output_autopad{wl_ref3};
1251- wl3_output_autopad.output_autopad = true ;
1252-
1253- dut.check_and_sanitize (wl3_output_autopad, sane);
1254- EXPECT_EQ (sane.value (), V (VPUNN::Cycles::NO_ERROR))
1255- << sane.info << " \n error is : " << VPUNN::Cycles::toErrorText (sane.value ()) << " \n "
1256- << wl3_output_autopad;
1257- }
1258-
12591155} // namespace VPUNN_unit_tests
0 commit comments