Skip to content

Commit

Permalink
[JAVA_API] Add f4e2m1 to Java API (#921)
Browse files Browse the repository at this point in the history
* Add f4e2m1 to Java API

* Fix type name
  • Loading branch information
praasz authored Jun 13, 2024
1 parent 7239f82 commit a508f97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion modules/java_api/src/main/cpp/jni_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ static const ov::element::Type_t& get_ov_type(int type)
ov::element::Type_t::nf4,
ov::element::Type_t::f8e4m3,
ov::element::Type_t::f8e5m2,
ov::element::Type_t::string
ov::element::Type_t::string,
ov::element::Type_t::f4e2m1
};

return java_type_to_ov_type.at(type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public enum ElementType {
nf4(21),
f8e4m3(22),
f8e5m2(23),
string(24);
string(24),
f4e2m1(25);

private int value;
private static Map<Integer, ElementType> map = new HashMap<Integer, ElementType>();
Expand Down

0 comments on commit a508f97

Please sign in to comment.