-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ed38c2
commit 4a4879e
Showing
7 changed files
with
49 additions
and
42 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,19 @@ | ||
#ifndef CONVERT_FLOAT_TO_FLOAT16_H | ||
#define CONVERT_FLOAT_TO_FLOAT16_H | ||
|
||
#include <string> | ||
#include <unordered_set> | ||
|
||
#include <onnx/onnx_pb.h> | ||
|
||
void convert_float_to_float16( | ||
ONNX_NAMESPACE::ModelProto & model, | ||
bool force_fp16_initializers | ||
// , bool keep_io_types = True | ||
// , bool disable_shape_infer = True | ||
// , const std::optional<std::unordered_set<std::string>> op_block_list = DEFAULT_OP_BLOCK_LIST | ||
// , const std::optional<std::unordered_set<std::string>> op_block_list = {} | ||
, const std::unordered_set<std::string> & op_block_list | ||
) noexcept; | ||
|
||
#endif |
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,18 @@ | ||
#ifndef ONNX_UTILS_H | ||
#define ONNX_UTILS_H | ||
|
||
#include <cstdint> | ||
#include <string> | ||
#include <string_view> | ||
#include <variant> | ||
|
||
#include <onnx/onnx_pb.h> | ||
|
||
std::variant<std::string, ONNX_NAMESPACE::ModelProto> loadONNX( | ||
const std::string_view & path, | ||
int64_t tile_w, | ||
int64_t tile_h, | ||
bool path_is_serialization | ||
) noexcept; | ||
|
||
#endif |
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