Skip to content

[tools/onnx-subgraph] add config file parser for target device#15080

Merged
seanshpark merged 2 commits intoSamsung:masterfrom
chenyx113:onnx-subgraph-0408
Apr 9, 2025
Merged

[tools/onnx-subgraph] add config file parser for target device#15080
seanshpark merged 2 commits intoSamsung:masterfrom
chenyx113:onnx-subgraph-0408

Conversation

@chenyx113
Copy link
Copy Markdown
Contributor

related issue: #14534
historical full changes: #14613

add config file parser for target device with json

ONE-DCO-1.0-Signed-off-by: Youxin Chen yx113.chen@samsung.com

add config file parser for target device with json

ONE-DCO-1.0-Signed-off-by: Youxin Chen <yx113.chen@samsung.com>
@chenyx113 chenyx113 marked this pull request as ready for review April 8, 2025 05:14
Comment on lines +26 to +27
#include "graph.h"
enum class DeviceType
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include "graph.h"
enum class DeviceType
#include "graph.h"
enum class DeviceType

class Device
{
private:
std::string onnxFile;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
std::string onnxFile;
std::string _onnxFile;

Comment on lines +46 to +49
std::vector<std::string> NPUPreferOp;
std::vector<std::string> CPUSupportOp;
std::vector<std::string> NPUSupportOp;
float max_subgraph_size;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
std::vector<std::string> NPUPreferOp;
std::vector<std::string> CPUSupportOp;
std::vector<std::string> NPUSupportOp;
float max_subgraph_size;
std::vector<std::string> _NPUPreferOp;
std::vector<std::string> _CPUSupportOp;
std::vector<std::string> _NPUSupportOp;
float _max_subgraph_size;

std::string getOnnxFile() { return onnxFile; }
};

#endif
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#endif
#endif // DEVICE_H

*/
#include "device.h"

void Device::GetDeviceJson(std::string json_path) { return; }
Copy link
Copy Markdown
Contributor

@seanshpark seanshpark Apr 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
void Device::GetDeviceJson(std::string json_path) { return; }
void Device::GetDeviceJson(const std::string &json_path) { return; }

Copy link
Copy Markdown
Contributor

@seanshpark seanshpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@seanshpark seanshpark merged commit dc33ef1 into Samsung:master Apr 9, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants