Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VitisAI] export Graph::SetName to VitisA IEP #23731

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/external/emsdk
Submodule emsdk updated 43 files
+38 −34 .circleci/config.yml
+17 −17 .flake8
+0 −39 .github/workflows/create-release.yml
+0 −78 .github/workflows/tag-release.yml
+3 −4 README.md
+9 −35 bazel/README.md
+6 −24 bazel/deps.bzl
+18 −20 bazel/emscripten_deps.bzl
+3 −3 bazel/emscripten_toolchain/BUILD.bazel
+0 −0 bazel/emscripten_toolchain/emscripten_config
+6 −7 bazel/emscripten_toolchain/link_wrapper.py
+3 −13 bazel/emscripten_toolchain/toolchain.bzl
+13 −22 bazel/emscripten_toolchain/wasm_cc_binary.bzl
+0 −133 bazel/revisions.bzl
+0 −1 bazel/test_secondary_lto_cache/.bazelrc
+0 −4 bazel/test_secondary_lto_cache/.gitignore
+0 −19 bazel/test_secondary_lto_cache/BUILD
+0 −1 bazel/test_secondary_lto_cache/MODULE.bazel
+0 −31 bazel/test_secondary_lto_cache/WORKSPACE
+0 −6 bazel/test_secondary_lto_cache/hello-world.cc
+1 −95 bazel/toolchains.bzl
+2 −2 docker/Dockerfile
+1 −39 emscripten-releases-tags.json
+11 −1 emsdk
+21 −0 emsdk.bat
+9 −1 emsdk.ps1
+35 −67 emsdk.py
+0 −2 emsdk_env.fish
+324 −30 emsdk_manifest.json
+17 −33 scripts/create_release.py
+0 −44 scripts/get_emscripten_revision_info.py
+0 −25 scripts/get_release_info.py
+1 −1 scripts/update_bazel_workspace.py
+11 −15 scripts/update_node.py
+22 −12 scripts/update_python.py
+0 −19 scripts/zip.py
+1 −1 test/test.bat
+7 −7 test/test.py
+7 −0 test/test_activation.ps1
+0 −6 test/test_bazel.ps1
+12 −14 test/test_bazel.sh
+6 −7 test/test_bazel_mac.sh
+3 −0 test/test_path_preservation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,7 @@ struct ProviderHost {
virtual const Graph* Graph__ParentGraph(const Graph* p) const = 0;
virtual Graph* Graph__MutableParentGraph(Graph* p) = 0;
virtual const std::string& Graph__Name(const Graph* p) const noexcept = 0;
virtual void Graph__SetName(Graph* p, const std::string& name) const noexcept = 0;
virtual const std::filesystem::path& Graph__ModelPath(const Graph* p) const = 0;
virtual const std::vector<const NodeArg*>& Graph__GetInputsIncludingInitializers(const Graph* p) const noexcept = 0;
virtual bool Graph__IsSubgraph(const Graph* p) = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,7 @@ struct Graph final {
const Graph* ParentGraph() const { return g_host->Graph__ParentGraph(this); }
Graph* MutableParentGraph() { return g_host->Graph__MutableParentGraph(this); }
const std::string& Name() const noexcept { return g_host->Graph__Name(this); }
void SetName(const std::string& name) noexcept { return g_host->Graph__SetName(this, name); }
const std::filesystem::path& ModelPath() const { return g_host->Graph__ModelPath(this); }
const std::vector<const NodeArg*>& GetInputsIncludingInitializers() const noexcept { return g_host->Graph__GetInputsIncludingInitializers(this); }
bool IsSubgraph() const { return g_host->Graph__IsSubgraph(this); }
Expand Down
1 change: 1 addition & 0 deletions onnxruntime/core/providers/vitisai/imp/global_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ vaip_core::OrtApiForVaip* create_org_api_hook() {
};
the_global_api.graph_nodes_unsafe = [](const Graph& graph) -> auto { return vaip_core::DllSafe(graph.Nodes()); };
the_global_api.graph_get_name = [](const Graph& graph) -> const std::string& { return graph.Name(); };
the_global_api.graph_set_name = [](Graph& graph, const char * name) -> void { return graph.SetName(std::string(name)); };
the_global_api.graph_reverse_dfs_from = [](const Graph& graph, gsl::span<const Node* const> from,
const auto& enter, const auto& leave, const auto& stop) {
graph.ReverseDFSFrom(from, enter, leave, nullptr, stop);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct OrtApi;

namespace vaip_core {

#define VAIP_ORT_API_MAJOR (14u)
#define VAIP_ORT_API_MAJOR (15u)
#define VAIP_ORT_API_MINOR (0u)
#define VAIP_ORT_API_PATCH (0u)
struct OrtApiForVaip {
Expand Down Expand Up @@ -249,7 +249,8 @@ struct OrtApiForVaip {
const std::function<bool(const Node*)>& leave,
const std::function<bool(const Node*, const Node*)>& comp,
const std::function<bool(const Node* from, const Node* to)>&
stop); // [103]
stop); // [103]
void (*graph_set_name)(Graph& graph, const char* name); // [104]
};

#ifndef USE_VITISAI
Expand Down
1 change: 1 addition & 0 deletions onnxruntime/core/session/provider_bridge_ort.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,7 @@ struct ProviderHostImpl : ProviderHost {
const Graph* Graph__ParentGraph(const Graph* p) const override { return p->ParentGraph(); }
Graph* Graph__MutableParentGraph(Graph* p) override { return p->MutableParentGraph(); }
const std::string& Graph__Name(const Graph* p) const noexcept override { return p->Name(); }
void Graph__SetName(Graph* p, const std::string& name) const noexcept override { return p->SetName(name); }
const std::filesystem::path& Graph__ModelPath(const Graph* p) const override { return p->ModelPath(); }
const std::vector<const NodeArg*>& Graph__GetInputsIncludingInitializers(const Graph* p) const noexcept override { return p->GetInputsIncludingInitializers(); }
bool Graph__IsSubgraph(const Graph* p) override { return p->IsSubgraph(); }
Expand Down
Loading