-
Notifications
You must be signed in to change notification settings - Fork 836
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: begin using -std=c++17 and c17 in Makefile builds (#2648)
Begin using -std=c++17 and -std=c17 in Makefile builds on all platforms. Bazel builds have been using C++17 since 52c9568. Set `-stdlib=libc++ on xt-clang` on Xtensa to add C++17 library support in addition to compiler support. From the xt-clang docs: Starting with the RI-2019.1 release, XT-CLANG has included support for C++14 and C++17 language features. The compiler support for C++14 and C++17 is accompanied by the C++ library from the LLVM project. This library can be selected with the -stdlib=libc++ option, and this is strongly recommended when compiling with -std=c++14 or - std=c++17. Starting with the RI-2021.6 release, two additional versions of this C++ library are provided— one that excludes support for exception handling, and one that excludes both exception handling and run-time type identification. These libraries can be selected with -stdlib=libc ++-e and -stdlib=libc++-re options respectively. Based on the `docker run` command in tflite-micro/.github/workflows/xtensa_presubmit.yml, our CI is currently using RI-2020.4. Refactor the make/ext_libs/xtensa_download.sh script to make it eaiser to patch downloads for all Xtensa platforms. The old script made overly strict assumptions about the name of the patch. Patch the Xtensa vision_p6 platform download xi_tflmlib_vision_p6 for compatibility with the C++ library standard. Use the header <climits> to access constants such as INT_MAX. BUG=#2650
- Loading branch information
Showing
8 changed files
with
46 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
tensorflow/lite/micro/tools/make/ext_libs/xi_tflmlib_vision_p6.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From ed92529a6be7a910462558edcf10070fbb0f2870 Mon Sep 17 00:00:00 2001 | ||
From: Ryan Kuester <[email protected]> | ||
Date: Thu, 1 Aug 2024 12:48:12 -0500 | ||
Subject: [PATCH] fix: use <climits> instead of <limits> to access INT_MAX and | ||
friends | ||
|
||
For compatibility with the C++ library standard, use the header, | ||
<climits>, to access constants such as INT_MAX. | ||
--- | ||
runtime/include/cnnrt_xi.h | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/runtime/include/cnnrt_xi.h b/runtime/include/cnnrt_xi.h | ||
index f3a911e..00c74b8 100644 | ||
--- a/runtime/include/cnnrt_xi.h | ||
+++ b/runtime/include/cnnrt_xi.h | ||
@@ -25,7 +25,7 @@ | ||
# define INCLUDE_XI_CNN | ||
#endif | ||
|
||
-#include <limits> | ||
+#include <climits> | ||
#include "xi_api.h" | ||
#include "xi_cnn_api.h" | ||
#include "xi_tile_manager.h" | ||
-- | ||
2.43.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters