Skip to content

Commit 263da19

Browse files
committed
Remove parts that aren't implemented yet in the driver, add extra checks
Signed-off-by: Bogdan Pereanu <[email protected]>
1 parent 289fc85 commit 263da19

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,10 @@ ov::Strides Pipeline::get_strides(const std::shared_ptr<ZeroTensor>& tensor) {
283283
return ov::Strides{};
284284
}
285285

286-
if (!_graph->is_strided_tensor_supported()) {
287-
OPENVINO_THROW("Strides are not supported by the current driver version.");
288-
}
286+
// TODO: not implemented yet, review it after a decision is taken.
287+
// if (!_graph->is_strided_tensor_supported()) {
288+
// OPENVINO_THROW("Strides are not supported by the current driver version.");
289+
// }
289290

290291
return tensor->get_strides();
291292
};

src/plugins/intel_npu/src/common/src/sync_infer_request.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@ void SyncInferRequest::check_tensor(const ov::Output<const ov::Node>& port,
172172
bool is_input = ov::op::util::is_parameter(port.get_node());
173173
std::string tensor_type = is_input ? "input" : "output";
174174

175-
OPENVINO_ASSERT(tensor->is_continuous(), "The tensor is not continuous");
176-
177175
if ((port.get_element_type() == ov::element::Type_t::boolean ||
178176
tensor->get_element_type() == ov::element::Type_t::boolean) &&
179177
port.get_element_type() != tensor->get_element_type()) {

src/plugins/intel_npu/src/compiler_adapter/src/ze_graph_ext_wrappers.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,15 @@ void ZeGraphExtWrappers::setGraphArgumentValue(const GraphDescriptor& graphDescr
215215
auto result = _zeroInitStruct->getGraphDdiTable().pfnSetArgumentValue2(graphDescriptor._handle,
216216
id,
217217
static_cast<const void*>(&tensorValue));
218-
THROW_ON_FAIL_FOR_LEVELZERO_EXT("pfnSetArgumentValue2", result, _zeroInitStruct->getGraphDdiTable());
218+
THROW_ON_FAIL_FOR_LEVELZERO_EXT("pfnSetArgumentValue2 for data", result, _zeroInitStruct->getGraphDdiTable());
219219

220220
if (!strides.empty()) {
221+
if (strides.size() > ZE_MAX_GRAPH_ARGUMENT_DIMENSIONS_SIZE) {
222+
OPENVINO_THROW("The driver does not support strides with more than",
223+
ZE_MAX_GRAPH_ARGUMENT_DIMENSIONS_SIZE,
224+
"dimensions.");
225+
}
226+
221227
ze_graph_argument_value_strides_t stridesValue = {};
222228
stridesValue.stype = ZE_STRUCTURE_TYPE_GRAPH_ARGUMENT_STRIDES;
223229
for (size_t i = 0; i < strides.size(); ++i) {
@@ -232,7 +238,9 @@ void ZeGraphExtWrappers::setGraphArgumentValue(const GraphDescriptor& graphDescr
232238
_zeroInitStruct->getGraphDdiTable().pfnSetArgumentValue2(graphDescriptor._handle,
233239
id,
234240
static_cast<const void*>(&stridesValue));
235-
THROW_ON_FAIL_FOR_LEVELZERO_EXT("pfnSetArgumentValue2", result, _zeroInitStruct->getGraphDdiTable());
241+
THROW_ON_FAIL_FOR_LEVELZERO_EXT("pfnSetArgumentValue2 for strides",
242+
result,
243+
_zeroInitStruct->getGraphDdiTable());
236244
}
237245
}
238246
}

src/plugins/intel_npu/src/utils/src/zero/zero_wrappers.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ void CommandList::updateMutableCommandList(uint32_t index, const void* data, con
144144
OPENVINO_THROW("Strides are not supported by the current driver version.");
145145
}
146146

147+
if (strides.size() > ZE_MAX_GRAPH_ARGUMENT_DIMENSIONS_SIZE) {
148+
OPENVINO_THROW("The driver does not support strides with more than",
149+
ZE_MAX_GRAPH_ARGUMENT_DIMENSIONS_SIZE,
150+
"dimensions.");
151+
}
152+
147153
ze_graph_argument_value_strides_t strides_value = {};
148154
strides_value.stype = ZE_STRUCTURE_TYPE_GRAPH_ARGUMENT_STRIDES;
149155
for (size_t i = 0; i < strides.size(); ++i) {

0 commit comments

Comments
 (0)