Skip to content

Commit

Permalink
[NPU] Add datatype NF4 support (#27903)
Browse files Browse the repository at this point in the history
### Details:
 - Add datatype NF4 support in NPU plugin
 - *...*

---------

Signed-off-by: Stefania Hergane <[email protected]>
Co-authored-by: Stepan <[email protected]>
  • Loading branch information
StefaniaHergane and PatrikStepan authored Feb 14, 2025
1 parent 9d92d9c commit d7ecf52
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/plugins/intel_npu/src/backend/src/zero_infer_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,8 @@ void ZeroInferRequest::check_network_precision(const ov::element::Type_t precisi
break;
case ov::element::Type_t::bf16:
break;
case ov::element::Type_t::nf4:
break;
case ov::element::Type_t::u4:
break;
case ov::element::Type_t::i4:
Expand All @@ -749,8 +751,9 @@ void ZeroInferRequest::check_network_precision(const ov::element::Type_t precisi
case ov::element::Type_t::f64:
break;
default:
OPENVINO_THROW("Unsupported tensor precision: " + ov::element::Type(precision).get_type_name() +
"! Supported precisions: FP32, FP16, BF16, U4, I4, U8, I8, U16, I16, U32, I32, U64, I64, FP64");
OPENVINO_THROW(
"Unsupported tensor precision: " + ov::element::Type(precision).get_type_name() +
"! Supported precisions: FP32, FP16, BF16, NF4, U4, I4, U8, I8, U16, I16, U32, I32, U64, I64, FP64");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ std::string ovPrecisionToLegacyPrecisionString(const ov::element::Type& precisio
return "FP64";
case ov::element::Type_t::bf16:
return "BF16";
case ov::element::Type_t::nf4:
return "NF4";
case ov::element::Type_t::i4:
return "I4";
case ov::element::Type_t::i8:
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_npu/src/utils/src/zero/zero_wrappers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ CommandList::CommandList(const std::shared_ptr<ZeroInitStructsHolder>& initStruc
if (mtci_is_supported) {
ze_mutable_command_id_exp_desc_t mutableCmdIdDesc = {ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_ID_EXP_DESC,
nullptr,
ZE_MUTABLE_COMMAND_EXP_FLAG_GRAPH_ARGUMENT};
ZE_MUTABLE_COMMAND_EXP_FLAG_GRAPH_ARGUMENT_DEPRECATED};
THROW_ON_FAIL_FOR_LEVELZERO("zeCommandListGetNextCommandIdExp",
zeCommandListGetNextCommandIdExp(_handle, &mutableCmdIdDesc, &_command_id));
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_npu/thirdparty/level-zero-ext
Submodule level-zero-ext updated 1 files
+31 −17 ze_graph_ext.h

0 comments on commit d7ecf52

Please sign in to comment.