Skip to content

Commit 6be1e94

Browse files
committed
Initial commit for OpenVINO Windows support
1 parent c00d726 commit 6be1e94

File tree

3 files changed

+27
-11
lines changed

3 files changed

+27
-11
lines changed

backends/openvino/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,20 @@ Before you begin, ensure you have openvino installed and configured on your syst
5353

5454
2. Extract the release package from the archive and set the environment variables.
5555

56+
For Linux
5657
```bash
5758
tar -zxf openvino_toolkit_<your_release_configuration>.tgz
5859
cd openvino_toolkit_<your_release_configuration>
5960
source setupvars.sh
6061
```
6162

63+
For Windows (Powershell)
64+
```powershell
65+
tar -zxf openvino_toolkit_<your_release_configuration>.zip
66+
cd openvino_toolkit_<your_release_configuration>
67+
. ./setupvars.ps1
68+
```
69+
6270
### (Optional) Build OpenVINO from Source
6371

6472
```bash
@@ -85,10 +93,18 @@ Follow the steps below to setup your build environment:
8593

8694
1. **Create a Virtual Environment**
8795
- Create a virtual environment and activate it by executing the commands below.
96+
For Linux
8897
```bash
8998
python -m venv env
9099
source env/bin/activate
91100
```
101+
102+
For Windows (Powershell)
103+
```powershell
104+
python -m venv env
105+
env/Scripts/activate
106+
```
107+
92108
2. **Clone ExecuTorch Repository from Github**
93109
- Clone Executorch repository by executing the command below.
94110
```bash

backends/openvino/runtime/OpenvinoBackend.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,21 +181,21 @@ void OpenvinoBackend::destroy(exr::DelegateHandle* handle) const {
181181
}
182182

183183
ov::element::Type OpenvinoBackend::convert_to_openvino_type(
184-
exa::ScalarType scalar_type) const {
184+
exat::ScalarType scalar_type) const {
185185
switch (scalar_type) {
186-
case exa::ScalarType::Float:
186+
case exat::ScalarType::Float:
187187
return ov::element::f32;
188-
case exa::ScalarType::Half:
188+
case exat::ScalarType::Half:
189189
return ov::element::f16;
190-
case exa::ScalarType::Int:
190+
case exat::ScalarType::Int:
191191
return ov::element::i32;
192-
case exa::ScalarType::Char:
192+
case exat::ScalarType::Char:
193193
return ov::element::i8;
194-
case exa::ScalarType::Byte:
194+
case exat::ScalarType::Byte:
195195
return ov::element::u8;
196-
case exa::ScalarType::Long:
196+
case exat::ScalarType::Long:
197197
return ov::element::i64;
198-
case exa::ScalarType::Bool:
198+
case exat::ScalarType::Bool:
199199
return ov::element::boolean;
200200
default:
201201
throw std::runtime_error("Unsupported scalar type");

backends/openvino/runtime/OpenvinoBackend.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
#include <executorch/runtime/core/exec_aten/util/dim_order_util.h>
1919
#include <executorch/runtime/core/exec_aten/util/scalar_type_util.h>
2020

21+
using namespace std;
2122
namespace exr = executorch::runtime;
22-
namespace exa = executorch::aten;
23+
namespace exat = executorch::aten;
2324

24-
using namespace std;
2525

2626
namespace executorch {
2727
namespace backends {
@@ -49,7 +49,7 @@ class OpenvinoBackend final : public ::exr::BackendInterface {
4949
void destroy(exr::DelegateHandle* handle) const override;
5050

5151
private:
52-
ov::element::Type convert_to_openvino_type(exa::ScalarType scalar_type) const;
52+
ov::element::Type convert_to_openvino_type(exat::ScalarType scalar_type) const;
5353
};
5454

5555
} // namespace openvino

0 commit comments

Comments
 (0)