Skip to content

Commit a799bdd

Browse files
solved tests fails
1 parent 09960ca commit a799bdd

File tree

3 files changed

+0
-211
lines changed

3 files changed

+0
-211
lines changed

tests/cpp/dpu_layerValidator_test.cpp

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -447,99 +447,4 @@ TEST_F(LayersValidationTest, Check_layer_with_big_shape) {
447447
lambda(tests);
448448
}
449449

450-
TEST_F(LayersValidationTest, Check_layer_with_autopad) {
451-
LayersValidation dut;
452-
SanityReport sane;
453-
454-
DPUWorkload wl_ref{
455-
VPUDevice::NPU_RESERVED,
456-
Operation::ELTWISE,
457-
{VPUTensor(28, 9, 16, 1, DataType::FLOAT16)}, // input dimensions
458-
{VPUTensor(28, 9, 1, 1, DataType::UINT8)}, // output dimensions
459-
{1, 1}, // kernels
460-
{1, 1}, // strides
461-
{0, 0, 0, 0}, // padding
462-
ExecutionMode::CUBOID_8x16, // execution mode
463-
ActivationFunction::NONE, // activation
464-
0.0F, // act_sparsity
465-
0.0F, // weight_sparsity
466-
{swz_def, swz_def}, // input_swizzling
467-
{swz_def}, // output_swizzling
468-
1, // output_write_tiles
469-
{0, 0, 0, 0}, // offsets
470-
ISIStrategy::CLUSTERING, // isi_strategy
471-
false, // weight_sparsity_enabled
472-
};
473-
wl_ref.superdense_memory = true;
474-
475-
DPUWorkload wl_ref2{
476-
VPUDevice::NPU_RESERVED,
477-
Operation::AVEPOOL,
478-
{VPUTensor(32, 80, 16, 1, DataType::UINT8, Layout::ZXY)}, // input dimensions
479-
{VPUTensor(32, 80, 2, 1, DataType::UINT8, Layout::XYZ)}, // output dimensions
480-
{1, 1}, // kernels
481-
{1, 1}, // strides
482-
{0, 0, 0, 0}, // padding
483-
ExecutionMode::CUBOID_16x16, // execution mode
484-
ActivationFunction::NONE, // activation
485-
0.0F, // act_sparsity
486-
0.0F, // weight_sparsity
487-
{swz_def, swz_def}, // input_swizzling
488-
{swz_def}, // output_swizzling
489-
1, // output_write_tiles
490-
{0, 0, 0, 0}, // offsets
491-
ISIStrategy::CLUSTERING, // isi_strategy
492-
false, // weight_sparsity_enabled
493-
};
494-
495-
DPUWorkload wl_output_autopad{wl_ref};
496-
wl_output_autopad.output_autopad = true;
497-
DPULayer wl_layer_autopad(wl_output_autopad);
498-
499-
dut.check_splitLayer_consistency(wl_layer_autopad, sane);
500-
EXPECT_EQ(sane.value(), V(VPUNN::Cycles::NO_ERROR))
501-
<< sane.info << "\n error is : " << VPUNN::Cycles::toErrorText(sane.value()) << "\n"
502-
<< wl_layer_autopad;
503-
504-
dut.check_completeLayer_consistency(wl_layer_autopad, sane, ISIStrategy::CLUSTERING, 3U, VPUTilingStrategy::NONE);
505-
EXPECT_EQ(sane.value(), V(VPUNN::Cycles::NO_ERROR))
506-
<< sane.info << "\n error is : " << VPUNN::Cycles::toErrorText(sane.value()) << "\n"
507-
<< wl_layer_autopad;
508-
509-
DPUWorkload wl_input_autopad{wl_ref};
510-
wl_input_autopad.input_autopad = true;
511-
wl_input_autopad.inputs[0] = VPUTensor(
512-
{wl_ref.inputs[0].width(), wl_ref.inputs[0].height(), 5, wl_ref.inputs[0].batches()}, wl_ref.inputs[0]);
513-
wl_input_autopad.outputs[0] =
514-
VPUTensor({wl_ref.outputs[0].width(), wl_ref.outputs[0].height(), 16, wl_ref.outputs[0].batches()},
515-
wl_ref.outputs[0]);
516-
DPULayer wl_in_layer_autopad(wl_input_autopad);
517-
518-
dut.check_splitLayer_consistency(wl_in_layer_autopad, sane);
519-
EXPECT_EQ(sane.value(), V(VPUNN::Cycles::ERROR_INVALID_INPUT_CONFIGURATION))
520-
<< sane.info << "\n error is : " << VPUNN::Cycles::toErrorText(sane.value()) << "\n"
521-
<< wl_in_layer_autopad;
522-
523-
dut.check_completeLayer_consistency(wl_in_layer_autopad, sane, ISIStrategy::CLUSTERING, 3U,
524-
VPUTilingStrategy::NONE);
525-
EXPECT_EQ(sane.value(), V(VPUNN::Cycles::ERROR_INVALID_LAYER_CONFIGURATION))
526-
<< sane.info << "\n error is : " << VPUNN::Cycles::toErrorText(sane.value()) << "\n"
527-
<< wl_in_layer_autopad;
528-
529-
DPUWorkload wl2_output_autopad{wl_ref2};
530-
wl2_output_autopad.output_autopad = true;
531-
DPULayer wl2_layer_autopad(wl2_output_autopad);
532-
533-
dut.check_splitLayer_consistency(wl2_layer_autopad, sane);
534-
EXPECT_EQ(sane.value(), V(VPUNN::Cycles::NO_ERROR))
535-
<< sane.info << "\n error is : " << VPUNN::Cycles::toErrorText(sane.value()) << "\n"
536-
<< wl2_layer_autopad;
537-
538-
dut.check_completeLayer_consistency(wl2_layer_autopad, sane, ISIStrategy::CLUSTERING, 3U, VPUTilingStrategy::NONE);
539-
EXPECT_EQ(sane.value(), V(VPUNN::Cycles::NO_ERROR))
540-
<< sane.info << "\n error is : " << VPUNN::Cycles::toErrorText(sane.value()) << "\n"
541-
<< wl2_layer_autopad;
542-
543-
}
544-
545450
} // namespace VPUNN_unit_tests

tests/cpp/dpu_saniter_tests.cpp

Lines changed: 0 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -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

tests/cpp/layer.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -520,18 +520,6 @@ TEST_F(VPULayerCostModelTest, BatchValues_LayerLevel) {
520520
{{mkLayer(VPUDevice::VPU_4_0, 2), {1U, 1U, 1U, VPUNN::VPUTilingStrategy::NONE, false, false, prefetch}},
521521
{VPUNN::Cycles::NO_ERROR, true, 1200, 1200 * no_fail + 1000},
522522
"Device 4.0, B=2 "},
523-
524-
{{mkLayer(VPUDevice::NPU_RESERVED, 0), {1U, 1U, 1U, VPUNN::VPUTilingStrategy::NONE, false, false, prefetch}},
525-
{VPUNN::Cycles::ERROR_INVALID_LAYER_CONFIGURATION, true, 12500, 12500 * no_fail + 1000},
526-
"Device 5.0, B=0 "},
527-
{{mkLayer(VPUDevice::NPU_RESERVED, 1), {1U, 1U, 1U, VPUNN::VPUTilingStrategy::NONE, false, false, prefetch}},
528-
{VPUNN::Cycles::NO_ERROR, true, 1000, 1000 * no_fail + 1000},
529-
"Device 5.0, B=1 "},
530-
{{mkLayer(VPUDevice::NPU_RESERVED, 2), {1U, 1U, 1U, VPUNN::VPUTilingStrategy::NONE, false, false, prefetch}},
531-
{VPUNN::Cycles::ERROR_INVALID_LAYER_CONFIGURATION, true, 12500, 12500 * no_fail + 1000},
532-
"Device 5.0, B=2 "},
533-
534-
535523
};
536524
executeTests(tests);
537525
}

0 commit comments

Comments
 (0)