Skip to content

Commit 6567280

Browse files
author
Hao-Wei Hsu
committed
[Rearrange example folder]
- move examples/backend/qualcomm -> example/qualcomm - change documents, CMakeLists.txt accordingly - remove copyright from Meta
1 parent 52fbd57 commit 6567280

File tree

15 files changed

+17
-21
lines changed

15 files changed

+17
-21
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ endif()
303303
option(EXECUTORCH_BUILD_QNN "Build the backends/qualcomm directory" OFF)
304304
if(EXECUTORCH_BUILD_QNN)
305305
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backends/qualcomm)
306-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/examples/backend/qualcomm)
306+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/examples/qualcomm)
307307
endif()
308308

309309
# Add selective build subdirectory

backends/qualcomm/qnn_quantizer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Copyright (c) Meta Platforms, Inc. and affiliates.
21
# Copyright (c) Qualcomm Innovation Center, Inc.
32
# All rights reserved
43
#

backends/qualcomm/runtime/QnnExecuTorchBackend.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/*
2-
* Copyright (c) Meta Platforms, Inc. and affiliates.
32
* Copyright (c) Qualcomm Innovation Center, Inc.
43
* All rights reserved.
54
*

backends/qualcomm/tests/qnn_test_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Copyright (c) Meta Platforms, Inc. and affiliates.
21
# Copyright (c) Qualcomm Innovation Center, Inc.
32
# All rights reserved
43
#

backends/qualcomm/tests/test_qnn_delegate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Copyright (c) Meta Platforms, Inc. and affiliates.
21
# Copyright (c) Qualcomm Innovation Center, Inc.
32
# All rights reserved
43
#

examples/backend/qualcomm/CMakeLists.txt renamed to examples/qualcomm/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# qnn_executor_runner: Like executor_runner but with QNN
88
if(${ANDROID})
99
get_filename_component(EXECUTORCH_SOURCE_DIR
10-
"${CMAKE_CURRENT_LIST_DIR}/../../.."
10+
"${CMAKE_CURRENT_LIST_DIR}/../.."
1111
ABSOLUTE
1212
)
1313
set(_qnn_executor_runner__srcs ${_executor_runner__srcs})

examples/backend/qualcomm/README.md renamed to examples/qualcomm/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Here are some general information and limitations.
88

99
## Prerequisite
1010

11-
Please finish tutorial [Setting up executorch](../../../docs/website/docs/tutorials/00_setting_up_executorch.md).
11+
Please finish tutorial [Setting up executorch](../../docs/website/docs/tutorials/00_setting_up_executorch.md).
1212

13-
Please finish [setup QNN backend](../../../backends/qualcomm/setup.md).
13+
Please finish [setup QNN backend](../../backends/qualcomm/setup.md).
1414

1515
## Environment
1616

1717
Please set up `QNN_SDK_ROOT` environment variable.
1818
Note that this version should be exactly same as building QNN backend.
19-
Please check [setup](../../../backends/qualcomm/setup.md).
19+
Please check [setup](../../backends/qualcomm/setup.md).
2020

2121
Please set up `LD_LIBRARY_PATH` to `$QNN_SDK_ROOT/lib/x86_64-linux-clang`.
2222
Or, you could put QNN libraries to default search path of the dynamic linker.
@@ -26,7 +26,7 @@ Or, you could put QNN libraries to default search path of the dynamic linker.
2626
Please connect an Android phone to the workstation. We use `adb` to communicate with the device.
2727

2828
If the device is in a remote host, you might want to add `-H` to the `adb`
29-
commands in the `SimpleADB` class inside [utils.py](../../../backends/qualcomm/utils/utils.py).
29+
commands in the `SimpleADB` class inside [utils.py](utils.py).
3030

3131

3232
## Please use python xxx.py --help for information of each examples.

examples/backend/qualcomm/deeplab_v3.py renamed to examples/qualcomm/scripts/deeplab_v3.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
import re
1212

1313
import numpy as np
14-
from executorch.examples.backend.qualcomm.utils import (
14+
15+
from executorch.examples.models.deeplab_v3 import DeepLabV3ResNet101Model
16+
from executorch.examples.qualcomm.scripts.utils import (
1517
build_executorch_binary,
1618
make_output_dir,
1719
segmentation_metrics,
1820
SimpleADB,
1921
)
2022

21-
from executorch.examples.models.deeplab_v3 import DeepLabV3ResNet101Model
22-
2323

2424
def get_dataset(data_size, dataset_dir, download):
2525
import numpy as np

examples/backend/qualcomm/edsr.py renamed to examples/qualcomm/scripts/edsr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
import numpy as np
1212
import piq
1313
import torch
14-
from executorch.examples.backend.qualcomm.utils import (
14+
from executorch.examples.models.edsr import EdsrModel
15+
from executorch.examples.qualcomm.scripts.utils import (
1516
build_executorch_binary,
1617
make_output_dir,
1718
SimpleADB,
1819
)
19-
from executorch.examples.models.edsr import EdsrModel
2020

2121
from PIL import Image
2222
from torch.utils.data import Dataset

examples/backend/qualcomm/inception_v4.py renamed to examples/qualcomm/scripts/inception_v4.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
import numpy as np
1111

1212
import torch
13-
from executorch.examples.backend.qualcomm.utils import (
13+
from executorch.examples.models.inception_v4 import InceptionV4Model
14+
from executorch.examples.qualcomm.scripts.utils import (
1415
build_executorch_binary,
1516
make_output_dir,
1617
SimpleADB,
1718
topk_accuracy,
1819
)
19-
from executorch.examples.models.inception_v4 import InceptionV4Model
2020

2121

2222
def get_dataset(dataset_path, data_size):

examples/backend/qualcomm/mobilebert_fine_tune.py renamed to examples/qualcomm/scripts/mobilebert_fine_tune.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import numpy as np
1111

1212
import torch
13-
from executorch.examples.backend.qualcomm.utils import (
13+
from executorch.examples.qualcomm.scripts.utils import (
1414
build_executorch_binary,
1515
make_output_dir,
1616
SimpleADB,

examples/backend/qualcomm/mobilenet_v2.py renamed to examples/qualcomm/scripts/mobilenet_v2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
import numpy as np
1111

1212
import torch
13-
from executorch.examples.backend.qualcomm.utils import (
13+
from executorch.examples.models.mobilenet_v2 import MV2Model
14+
from executorch.examples.qualcomm.scripts.utils import (
1415
build_executorch_binary,
1516
make_output_dir,
1617
SimpleADB,
1718
topk_accuracy,
1819
)
19-
from executorch.examples.models.mobilenet_v2 import MV2Model
2020

2121

2222
def get_dataset(dataset_path, data_size):

examples/backend/qualcomm/utils.py renamed to examples/qualcomm/scripts/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def push(self, inputs, input_list):
8383
f"libQnnHtpV{self.soc_model}Stub.so"
8484
),
8585
f"{self.qnn_sdk}/lib/aarch64-android/libQnnSystem.so",
86-
f"{self.artifact_path}/examples/backend/qualcomm/qnn_executor_runner",
86+
f"{self.artifact_path}/examples/qualcomm/qnn_executor_runner",
8787
input_list_file,
8888
]:
8989
self._adb(["push", artifact, self.workspace])

0 commit comments

Comments
 (0)