From 2ffa7ad3912786d94d42d8587125f4c5fa23db64 Mon Sep 17 00:00:00 2001 From: Michael Butler Date: Wed, 3 Nov 2021 22:01:36 -0700 Subject: [PATCH] Remove unnecessary NNAPI header files This change removes the following header files, which were created temporarily while NNAPI utility code was being re-organized, and are no longer needed: * include/AidlBufferTracker.h * include/AidlHalInterfaces.h * include/AidlHalUtils.h * include/AidlValidateHal.h Bug: 191442336 Test: mma Test: atest neuralnetworks_utils_hal_* Change-Id: I895d0bf6b5fd0ec4ef2977da0ecfe2a106e44083 --- .../aidl/utils/include/AidlBufferTracker.h | 17 ----------------- .../aidl/utils/include/AidlHalInterfaces.h | 17 ----------------- .../aidl/utils/include/AidlHalUtils.h | 17 ----------------- .../aidl/utils/include/AidlValidateHal.h | 17 ----------------- neuralnetworks/aidl/utils/src/Buffer.cpp | 1 - ...{AidlBufferTracker.cpp => BufferTracker.cpp} | 8 ++++---- .../src/{AidlHalUtils.cpp => HalUtils.cpp} | 8 ++++---- .../{AidlValidateHal.cpp => ValidateHal.cpp} | 8 ++++---- .../aidl/vts/functional/MemoryDomainTests.cpp | 2 +- 9 files changed, 13 insertions(+), 82 deletions(-) delete mode 100644 neuralnetworks/aidl/utils/include/AidlBufferTracker.h delete mode 100644 neuralnetworks/aidl/utils/include/AidlHalInterfaces.h delete mode 100644 neuralnetworks/aidl/utils/include/AidlHalUtils.h delete mode 100644 neuralnetworks/aidl/utils/include/AidlValidateHal.h rename neuralnetworks/aidl/utils/src/{AidlBufferTracker.cpp => BufferTracker.cpp} (99%) rename neuralnetworks/aidl/utils/src/{AidlHalUtils.cpp => HalUtils.cpp} (96%) rename neuralnetworks/aidl/utils/src/{AidlValidateHal.cpp => ValidateHal.cpp} (98%) diff --git a/neuralnetworks/aidl/utils/include/AidlBufferTracker.h b/neuralnetworks/aidl/utils/include/AidlBufferTracker.h deleted file mode 100644 index 4421876336..0000000000 --- a/neuralnetworks/aidl/utils/include/AidlBufferTracker.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "nnapi/hal/aidl/BufferTracker.h" diff --git a/neuralnetworks/aidl/utils/include/AidlHalInterfaces.h b/neuralnetworks/aidl/utils/include/AidlHalInterfaces.h deleted file mode 100644 index 37779694e9..0000000000 --- a/neuralnetworks/aidl/utils/include/AidlHalInterfaces.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "nnapi/hal/aidl/HalInterfaces.h" diff --git a/neuralnetworks/aidl/utils/include/AidlHalUtils.h b/neuralnetworks/aidl/utils/include/AidlHalUtils.h deleted file mode 100644 index 98bfbad3cc..0000000000 --- a/neuralnetworks/aidl/utils/include/AidlHalUtils.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "nnapi/hal/aidl/HalUtils.h" diff --git a/neuralnetworks/aidl/utils/include/AidlValidateHal.h b/neuralnetworks/aidl/utils/include/AidlValidateHal.h deleted file mode 100644 index 5aaa74d01d..0000000000 --- a/neuralnetworks/aidl/utils/include/AidlValidateHal.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "nnapi/hal/aidl/ValidateHal.h" diff --git a/neuralnetworks/aidl/utils/src/Buffer.cpp b/neuralnetworks/aidl/utils/src/Buffer.cpp index c729a688d1..9af3c9e3ab 100644 --- a/neuralnetworks/aidl/utils/src/Buffer.cpp +++ b/neuralnetworks/aidl/utils/src/Buffer.cpp @@ -22,7 +22,6 @@ #include "Conversions.h" #include "Utils.h" -#include "nnapi/hal/aidl/Conversions.h" #include #include diff --git a/neuralnetworks/aidl/utils/src/AidlBufferTracker.cpp b/neuralnetworks/aidl/utils/src/BufferTracker.cpp similarity index 99% rename from neuralnetworks/aidl/utils/src/AidlBufferTracker.cpp rename to neuralnetworks/aidl/utils/src/BufferTracker.cpp index 15d0810d84..94dc89171e 100644 --- a/neuralnetworks/aidl/utils/src/AidlBufferTracker.cpp +++ b/neuralnetworks/aidl/utils/src/BufferTracker.cpp @@ -14,9 +14,12 @@ * limitations under the License. */ -#include "AidlBufferTracker.h" +#include "BufferTracker.h" + +#include "HalInterfaces.h" #include +#include #include #include @@ -25,9 +28,6 @@ #include #include -#include "AidlHalInterfaces.h" -#include "nnapi/TypeUtils.h" - namespace android::nn { std::shared_ptr AidlManagedBuffer::create( diff --git a/neuralnetworks/aidl/utils/src/AidlHalUtils.cpp b/neuralnetworks/aidl/utils/src/HalUtils.cpp similarity index 96% rename from neuralnetworks/aidl/utils/src/AidlHalUtils.cpp rename to neuralnetworks/aidl/utils/src/HalUtils.cpp index 6fc46ab893..64b6259d4f 100644 --- a/neuralnetworks/aidl/utils/src/AidlHalUtils.cpp +++ b/neuralnetworks/aidl/utils/src/HalUtils.cpp @@ -17,9 +17,12 @@ // utilities. LegacyUtils.h is the subset of these utilities that do not touch // HAL. -#include "AidlHalUtils.h" +#include "HalUtils.h" + +#include "HalInterfaces.h" #include +#include #include #include @@ -27,9 +30,6 @@ #include #include -#include "AidlHalInterfaces.h" -#include "nnapi/TypeUtils.h" - namespace android::nn { std::vector nonExtensionOperandPerformance( diff --git a/neuralnetworks/aidl/utils/src/AidlValidateHal.cpp b/neuralnetworks/aidl/utils/src/ValidateHal.cpp similarity index 98% rename from neuralnetworks/aidl/utils/src/AidlValidateHal.cpp rename to neuralnetworks/aidl/utils/src/ValidateHal.cpp index a1c496a045..a56de21705 100644 --- a/neuralnetworks/aidl/utils/src/AidlValidateHal.cpp +++ b/neuralnetworks/aidl/utils/src/ValidateHal.cpp @@ -16,9 +16,12 @@ #define LOG_TAG "ValidateHal" -#include "AidlValidateHal.h" +#include "ValidateHal.h" + +#include "HalUtils.h" #include +#include #include #include @@ -27,9 +30,6 @@ #include #include -#include "AidlHalUtils.h" -#include "nnapi/TypeUtils.h" - namespace android { namespace nn { diff --git a/neuralnetworks/aidl/vts/functional/MemoryDomainTests.cpp b/neuralnetworks/aidl/vts/functional/MemoryDomainTests.cpp index 1819699ab2..cd5475c0d3 100644 --- a/neuralnetworks/aidl/vts/functional/MemoryDomainTests.cpp +++ b/neuralnetworks/aidl/vts/functional/MemoryDomainTests.cpp @@ -28,9 +28,9 @@ #include #include #include +#include #include -#include "AidlHalInterfaces.h" #include "Callbacks.h" #include "GeneratedTestHarness.h" #include "MemoryUtils.h"