Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace undefined type with dynamic #945

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/java_api/src/main/cpp/jni_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ static const ov::element::Type_t& get_ov_type(int type)
{
static const std::vector<ov::element::Type_t> java_type_to_ov_type
{
ov::element::Type_t::undefined,
ov::element::Type_t::dynamic,
ov::element::Type_t::dynamic,
ov::element::Type_t::boolean,
ov::element::Type_t::bf16,
Expand Down
2 changes: 1 addition & 1 deletion modules/nvidia_plugin/src/cuda_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct Configuration {
ov::streams::Num num_streams = 0;
ov::hint::PerformanceMode performance_mode = ov::hint::PerformanceMode::LATENCY;
ov::hint::ExecutionMode execution_mode = ov::hint::ExecutionMode::PERFORMANCE;
ov::element::Type inference_precision = ov::element::undefined;
ov::element::Type inference_precision = ov::element::dynamic;
};

} // namespace nvidia_gpu
Expand Down
2 changes: 1 addition & 1 deletion modules/nvidia_plugin/src/cuda_operation_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class OperationBase : public IOperationExec, public IOperationMeta, public std::
protected:
std::string node_name_;
std::string type_name_;
ov::element::Type runtime_precision_ = ov::element::undefined;
ov::element::Type runtime_precision_ = ov::element::dynamic;
const IndexCollection input_ids_;
const IndexCollection output_ids_;
WorkbufferIds workbuffer_ids_;
Expand Down
1 change: 0 additions & 1 deletion modules/nvidia_plugin/src/ops/gather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ GatherOp::GatherOp(const CreationContext& context,

const ov::element::Type_t element_type = node.get_input_element_type(0);
switch (element_type) {
case ov::element::Type_t::undefined:
case ov::element::Type_t::dynamic:
case ov::element::Type_t::u1:
throw_ov_exception(fmt::format("Params element type = {} is not supported by Gather operation!",
Expand Down
1 change: 0 additions & 1 deletion modules/nvidia_plugin/src/ops/scatter_nd_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ ScatterNDUpdateOp::ScatterNDUpdateOp(const CreationContext& context,

const ov::element::Type_t input_type = node.get_input_element_type(0);
switch (input_type) {
case ov::element::Type_t::undefined:
case ov::element::Type_t::dynamic:
case ov::element::Type_t::u1:
throw_ov_exception(fmt::format("Params element type = {} is not supported by ScatterNDUpdate operation!",
Expand Down
1 change: 0 additions & 1 deletion modules/nvidia_plugin/src/ops/split.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ SplitOp::SplitOp(const CreationContext& context,
OPENVINO_ASSERT(splitOp->get_output_size() == num_splits_, "Node name: ", GetName());
OPENVINO_ASSERT(input_element_type == output_element_type, "Node name: ", GetName());
switch (input_element_type) {
case ov::element::Type_t::undefined:
case ov::element::Type_t::dynamic:
case ov::element::Type_t::u1:
throw_ov_exception(
Expand Down
1 change: 0 additions & 1 deletion modules/nvidia_plugin/src/ops/variadic_split.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ VariadicSplitOp::VariadicSplitOp(const CreationContext& context,
OPENVINO_ASSERT(variadic_split_node->get_input_size() == 3, "Node name: ", GetName());
OPENVINO_ASSERT(input_element_type == output_element_type, "Node name: ", GetName());
switch (input_element_type) {
case ov::element::Type_t::undefined:
case ov::element::Type_t::dynamic:
case ov::element::Type_t::u1:
throw_ov_exception(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ inline void call_compare(const ov::Tensor& expected,
expected.data<ov::bfloat16>(), actual_buffer, size, threshold, to_check_nans, infinity_value);
break;
case ov::element::Type_t::dynamic:
case ov::element::Type_t::undefined:
FiniteLayerComparer::compare<T_IE, T_IE>(
expected.data<T_IE>(), actual_buffer, size, threshold, to_check_nans, infinity_value);
break;
Expand All @@ -98,8 +97,7 @@ void FiniteLayerComparer::compare(const ov::Tensor& expected,
if (expected.get_element_type() == ov::element::Type_t::u4 ||
expected.get_element_type() == ov::element::Type_t::i4) {
k /= 2;
} else if (expected.get_element_type() == ov::element::Type_t::undefined ||
expected.get_element_type() == ov::element::Type_t::dynamic) {
} else if (expected.get_element_type() == ov::element::Type_t::dynamic) {
k = 1;
}
ASSERT_EQ(expected.get_byte_size(), actual.get_byte_size() * k);
Expand Down Expand Up @@ -149,4 +147,4 @@ void ov::test::FiniteLayerComparer::compare(const std::vector<ov::Tensor>& expec
const std::vector<ov::Tensor>& actual_outputs) {
FiniteLayerComparer::compare(
expected_outputs, actual_outputs, abs_threshold, this->to_check_nans, this->infinity_value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class MemoryManagerTest : public testing::Test, public ov::nvidia_gpu::IOperatio
static constexpr std::string_view empty{""};
return empty;
}
const ov::element::Type& GetRuntimePrecision() const override { return ov::element::undefined; }
const ov::element::Type& GetRuntimePrecision() const override { return ov::element::dynamic; }
gsl::span<const ov::nvidia_gpu::TensorID> GetInputIds() const override { return inputIds_; }
gsl::span<const ov::nvidia_gpu::TensorID> GetOutputIds() const override { return outputIds_; }
};
Expand Down
Loading