Skip to content

Commit

Permalink
[NPU] Add NF4 precision support in NPU plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Stefania Hergane <stefania-persida.hergane@intel.com>
  • Loading branch information
StefaniaHergane committed Dec 4, 2024
1 parent 571e98d commit 83d7867
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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 @@ -647,6 +647,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 @@ -670,8 +672,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 @@ -81,6 +81,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

0 comments on commit 83d7867

Please sign in to comment.