Skip to content

Commit

Permalink
Add unit test comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianlizarraga committed Nov 15, 2024
1 parent f790028 commit 6d112d4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion onnxruntime/test/providers/qnn/layer_norm_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,10 @@ TEST_F(QnnHTPBackendTests, LayerNorm1D_LastAxis_StaticScale_StaticBias_AU8_WU8_B
}

TEST_F(QnnHTPBackendTests, LayerNorm1D_QNN2_24_ImplicitBias_ValidationBug) {
// QNN 2.24 to 2.27 LayerNorm fails validation (intermittent) if the bias input is not provided. QNN EP will provide
// QNN 2.24 to 2.27: LayerNorm fails validation (intermittent) if the bias input is not provided. QNN EP will provide
// an explicit bias of all zeros to get around this bug.
// QNN 2.28.0: Validation bug is fixed, but get accuracy errors.
// QNN 2.28.2: All fixed.
for (size_t i = 0; i < 15; i++) { // Run it multiple times since this is an intermittent bug.
RunLayerNormQDQTest<uint16_t, uint8_t>(TestInputDef<float>({1, 2, 3}, false, GetFloatDataInRange(0.0f, 1.0f, 6)),
TestInputDef<float>({3}, true, GetFloatDataInRange(0.0f, 1.0f, 3)),
Expand All @@ -202,6 +204,8 @@ TEST_F(QnnHTPBackendTests, LayerNorm1D_QNN2_24_ImplicitBias_ValidationBug) {
}

TEST_F(QnnHTPBackendTests, LayerNorm1D_LastAxis_StaticScale_AU16_WU8) {
// QNN 2.28.0: Get accuracy errors.
// QNN 2.28.2: All fixed.
RunLayerNormQDQTest<uint16_t, uint8_t>(TestInputDef<float>({1, 2, 3}, false, GetFloatDataInRange(0.0f, 10.0f, 6)),
TestInputDef<float>({3}, true, GetFloatDataInRange(0.0f, 1.0f, 3)), // Static
TestInputDef<float>(),
Expand Down

0 comments on commit 6d112d4

Please sign in to comment.