Enable QDQ node unit support for Log op (#17354)

### Description
Enable QDQ node unit support for Log op
This commit is contained in:
Hector Li 2023-08-30 16:23:33 -07:00 committed by GitHub
parent 64f06d0b4a
commit 47fe7fe900
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -69,6 +69,7 @@ static const OpVersionsAndSelector::OpVersionsMap GetUnaryOpVersionsMap() {
{"Sign", {}},
{"Tanh", {}},
{"Exp", {}},
{"Log", {}},
{"LRN", {}},
{"Ceil", {}},
{"Abs", {}},

View file

@ -278,6 +278,14 @@ TEST_F(QnnHTPBackendTests, UnaryOp_Cos_Inaccurate) {
11, ExpectedEPNodeAssignment::All);
}
// Check that QNN compiles DQ -> Log -> Q as a single unit.
// Use an input of rank 3.
TEST_F(QnnHTPBackendTests, UnaryOp_Log) {
RunQDQUnaryOpTest(TestInputDef<float>({1, 2, 3}, false, {3.14159f, 100.88436f, 10.542863f, 9.1f, 1.05622f, 3.14159f}),
"Log", {},
11, ExpectedEPNodeAssignment::All);
}
// Check that QNN compiles DQ -> Softmax -> Q as a single unit.
// Test that the default axis (-1) for SoftMax opset 13 works.
TEST_F(QnnHTPBackendTests, UnaryOp_Softmax13_DefaultAxis) {