-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #571 from xmos/feature/versions
Add version support
- Loading branch information
Showing
8 changed files
with
57 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright 2021 XMOS LIMITED. This Software is subject to the terms of the | ||
// XMOS Public License: Version 1 | ||
|
||
#ifndef XFORMER_VERSION_H_ | ||
#define XFORMER_VERSION_H_ | ||
|
||
namespace xformer { | ||
|
||
unsigned majorVersion = 0; | ||
unsigned minorVersion = 1; | ||
unsigned patchVersion = 6; | ||
|
||
} // namespace xformer | ||
|
||
#endif // XFORMER_VERSION_H_ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- tensorflow/compiler/mlir/lite/flatbuffer_export.cc 2022-03-28 16:22:27.000000000 +0100 | ||
+++ tensorflow/compiler/mlir/lite/flatbuffer_export.cc 2022-03-28 16:21:41.000000000 +0100 | ||
@@ -1553,10 +1553,13 @@ | ||
BuildMetadata("min_runtime_version", std::string(kByteStringSize, '\0'))); | ||
for (const auto& kv : metadata_) { | ||
const std::string& val = kv.second; | ||
- // Only take the first kByteStringSize values. | ||
- const int count = std::min(kByteStringSize, val.length()); | ||
- std::string value = std::string(kByteStringSize, '\0') | ||
- .assign(val.begin(), val.begin() + count); | ||
+ if(val.length() % 16 != 0) { | ||
+ module_.emitError( | ||
+ "metadata string must be aligned to 16 bytes"); | ||
+ return llvm::None; | ||
+ } | ||
+ std::string value = std::string(val.length(), '\0') | ||
+ .assign(val.begin(), val.begin() + val.length()); | ||
metadata.push_back(BuildMetadata(kv.first, value)); | ||
} | ||
return builder_.CreateVector(metadata); |
Submodule lib_nn
updated
49 files
Submodule lib_tflite_micro
updated
8 files