Skip to content

Commit

Permalink
Qualcomm AI Engine Direct - Fix Missing Kernels (pytorch#2040)
Browse files Browse the repository at this point in the history
Summary:
- Complie and link to aten kernels
- Add LLama partition number test cases

Pull Request resolved: pytorch#2040

Reviewed By: mergennachin

Differential Revision: D54071603

Pulled By: cccclai

fbshipit-source-id: 3731bc4a9e14c555e79adfddc6e648669d3da7d0
  • Loading branch information
Joey Tsai authored and facebook-github-bot committed Feb 22, 2024
1 parent 4853727 commit 7e43846
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions backends/qualcomm/tests/test_qnn_delegate.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from executorch.examples.models.edsr import EdsrModel
from executorch.examples.models.inception_v3 import InceptionV3Model
from executorch.examples.models.inception_v4 import InceptionV4Model
from executorch.examples.models.llama2 import Llama2Model
from executorch.examples.models.mobilebert import MobileBertModelExample
from executorch.examples.models.mobilenet_v2 import MV2Model
from executorch.examples.models.mobilenet_v3 import MV3Model
Expand Down Expand Up @@ -421,6 +422,7 @@ def test_qnn_backend_example_models(self):
EdsrModel(),
InceptionV3Model(),
InceptionV4Model(),
Llama2Model(),
MV2Model(),
MV3Model(),
MobileBertModelExample(),
Expand All @@ -437,6 +439,7 @@ def test_qnn_backend_example_models(self):
1,
1,
1,
1,
]
# TODO: Due to trigger maximum recursion depth exceeded, need to check it.
disable_validation()
Expand Down Expand Up @@ -895,6 +898,7 @@ def test_qnn_backend_example_models(self):
{"module": EdsrModel(), "annotation": (annotate_forward,)},
{"module": InceptionV3Model(), "annotation": ()},
{"module": InceptionV4Model(), "annotation": ()},
{"module": Llama2Model(), "annotation": ()},
{"module": MV2Model(), "annotation": ()},
{"module": MV3Model(), "annotation": ()},
# only works on QNN 2.12 so far
Expand All @@ -909,6 +913,7 @@ def test_qnn_backend_example_models(self):
1,
1,
1,
1,
# For MobileBertModelExample
# 1,
1,
Expand Down
6 changes: 3 additions & 3 deletions examples/qualcomm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ gen_selected_ops("" "" "ON")
generate_bindings_for_kernels(
${EXECUTORCH_ROOT}/kernels/portable/functions.yaml ""
)
gen_operators_lib("portable_ops_lib" portable_kernels executorch)
target_include_directories(portable_ops_lib
gen_operators_lib("full_portable_ops_lib" portable_kernels executorch)
target_include_directories(full_portable_ops_lib
PUBLIC
${_common_include_directories}
)
Expand Down Expand Up @@ -87,7 +87,7 @@ target_include_directories(qnn_executor_runner
)
target_link_libraries(qnn_executor_runner
qnn_executorch_backend
portable_ops_lib
full_portable_ops_lib
gflags
)
target_compile_options(qnn_executor_runner
Expand Down

0 comments on commit 7e43846

Please sign in to comment.