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

Fix logic for selecting alternate name for blob #572

Open
wants to merge 3 commits into
base: ovep-develop
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
34 changes: 34 additions & 0 deletions .github/workflows/internal_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name : Internal CI

on:
pull_request:
branches:
- '**' # Triggers on a PR to any Branch

jobs:
build:

runs-on: [self-hosted, Linux, X64] # Runs on a Lunar lake
env:
BUILD_SOURCESDIRECTORY: ${{ github.workspace }}
BUILD_BINARIESDIRECTORY: ${{ github.workspace }}/build
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }} # checkout the pr branch

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Create build directory
run: |
mkdir -p ${{ env.BUILD_BINARIESDIRECTORY }}
chmod -R 777 ${{ env.BUILD_BINARIESDIRECTORY }}
- name: Running Internal CI # Trigger Internal CI on the pr branch
run: |
cd tools/ci_build/github/linux/
dir
./run_dockerbuild.sh -o ubuntu22.04 -p 3.10 -d openvino -v 2024.5.0 -x "--config Release --use_openvino CPU --build_wheel --build_shared_lib --parallel "
8 changes: 3 additions & 5 deletions onnxruntime/core/providers/openvino/backend_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,11 @@ Status BackendManager::ExportCompiledBlobAsEPCtxNode(const onnxruntime::GraphVie
// Build name by combining EpCtx model name (if available) and subgraph name. Model
// name is not available in when creating a session from memory
auto name = session_context_.so_context_file_path.stem().string();
if (!name.empty() && !graph_body_viewer.ModelPath().empty()) {
if (name.empty() && !graph_body_viewer.ModelPath().empty()) {
name = graph_body_viewer.ModelPath().stem().string();
}
if (!name.empty()) {
name += "_";
}
name += subgraph_context_.subgraph_name;
ORT_ENFORCE(!name.empty());
name += "_" + subgraph_context_.subgraph_name;

std::filesystem::path blob_filename = session_context_.so_context_file_path;
if (blob_filename.empty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ std::string ParsePrecision(const ProviderOptions& provider_options, std::string&
<< "Update the 'device_type' to specified types 'CPU', 'GPU', 'GPU.0', "
<< "'GPU.1', 'NPU' or from"
<< " HETERO/MULTI/AUTO options and set 'precision' separately. \n";
int delimit = device_type.find("_");
auto delimit = device_type.find("_");
device_type = device_type.substr(0, delimit);
return device_type.substr(delimit + 1);
}
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/openvino/ov_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ void OVInferRequest::SetTensor(const std::string& name, OVTensorPtr& blob) {
}

uint32_t OVInferRequest::GetNumInputs() {
return ovInfReq.get_compiled_model().inputs().size();
return static_cast<uint32_t>(ovInfReq.get_compiled_model().inputs().size());
}

void OVInferRequest::StartAsync() {
Expand Down
Loading