Skip to content

Commit

Permalink
Add guards for CMSIS-NN tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mousius committed Oct 21, 2021
1 parent c347020 commit 9795a5b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/modules/contrib/CMSISNN.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# under the License.

if(USE_CMSISNN)
add_definitions(-DTVM_USE_CMSISNN)
message(STATUS "Build with CMSIS-NN support")
file(GLOB RELAY_CONTRIB_CMSISNN_SRCS src/relay/backend/contrib/cmsisnn/*.cc)
list(APPEND COMPILER_SRCS ${RELAY_CONTRIB_CMSISNN_SRCS})
Expand Down
4 changes: 4 additions & 0 deletions tests/cpp/relay/backend/contrib/cmsisnn/buffer_size_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* under the License.
*/

#ifdef TVM_USE_CMSISNN

#include "../../../../../../src/relay/backend/contrib/cmsisnn/buffer_size.h"

#include <gtest/gtest.h>
Expand Down Expand Up @@ -135,3 +137,5 @@ TEST(CMSISNNBufferSize, Default) {
} // namespace contrib
} // namespace relay
} // namespace tvm

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* under the License.
*/

#ifdef TVM_USE_CMSISNN

#include "../../../../../../src/relay/backend/contrib/cmsisnn/compiler_attrs.h"

#include <gtest/gtest.h>
Expand Down Expand Up @@ -123,3 +125,5 @@ INSTANTIATE_TEST_CASE_P(CMSISNNFlags, CMSISNNFlagsNoExtensions, ::testing::Value
} // namespace contrib
} // namespace relay
} // namespace tvm

#endif

0 comments on commit 9795a5b

Please sign in to comment.