[VITISAI] nested subgraph is unsupported for now (#17067)

### Description
<!-- Describe your changes. -->
return empty ComputeCapability when a graph contains nested subgraph.


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
For now, our architecture does not support nested subgraph. So, we
return empty ComputeCapability for this case.
This commit is contained in:
BoarQing 2023-08-11 00:45:13 +08:00 committed by GitHub
parent 1b081d51dc
commit 87285323e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,6 +92,10 @@ std::shared_ptr<KernelRegistry> VitisAIExecutionProvider::GetKernelRegistry() co
std::vector<std::unique_ptr<ComputeCapability>>
VitisAIExecutionProvider::GetCapability(const onnxruntime::GraphViewer& graph,
const IKernelLookup& /*kernel_lookup*/) const {
if (graph.IsSubgraph()) {
// VITIS AI EP not support sungraph. Assigned to CPU.
return {};
}
auto opt_str = info_.get_json_config_str(); // String
execution_providers_ =
std::make_unique<my_ep_t>(compile_onnx_model(graph, *GetLogger(), opt_str));