Commit 02909e48 authored by Ashok Emani's avatar Ashok Emani Committed by Scott Cyphers

resolve compiler warnings for undefined-func-template & float-conversion (#3627)

* resolve compiler warnings for undefined-func-template & float-conversion

* resolve compiler warnings for undefined-func-template & float-conversion

* resolve undefined-func-template warn for test

* remove no-sign-compare and no-double-promotion

* fix gather compile issue
parent b8b66de6
...@@ -266,6 +266,9 @@ NORMALIZE_BOOL(NGRAPH_INTERPRETER_STATIC_LIB_ENABLE) ...@@ -266,6 +266,9 @@ NORMALIZE_BOOL(NGRAPH_INTERPRETER_STATIC_LIB_ENABLE)
NORMALIZE_BOOL(NGRAPH_CPU_STATIC_LIB_ENABLE) NORMALIZE_BOOL(NGRAPH_CPU_STATIC_LIB_ENABLE)
NORMALIZE_BOOL(NGRAPH_DYNAMIC_COMPONENTS_ENABLE) NORMALIZE_BOOL(NGRAPH_DYNAMIC_COMPONENTS_ENABLE)
# Turn off GPU build in 0.25.1
set(NGRAPH_GPU_ENABLE FALSE)
message(STATUS "NGRAPH_UNIT_TEST_ENABLE: ${NGRAPH_UNIT_TEST_ENABLE}") message(STATUS "NGRAPH_UNIT_TEST_ENABLE: ${NGRAPH_UNIT_TEST_ENABLE}")
message(STATUS "NGRAPH_TOOLS_ENABLE: ${NGRAPH_TOOLS_ENABLE}") message(STATUS "NGRAPH_TOOLS_ENABLE: ${NGRAPH_TOOLS_ENABLE}")
message(STATUS "NGRAPH_CPU_ENABLE: ${NGRAPH_CPU_ENABLE}") message(STATUS "NGRAPH_CPU_ENABLE: ${NGRAPH_CPU_ENABLE}")
......
...@@ -37,9 +37,6 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") ...@@ -37,9 +37,6 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
endif() endif()
# should remove these # should remove these
add_compile_options(-Wno-float-conversion)
add_compile_options(-Wno-padded) add_compile_options(-Wno-padded)
add_compile_options(-Wno-sign-compare)
add_compile_options(-Wno-conversion) add_compile_options(-Wno-conversion)
add_compile_options(-Wno-double-promotion) add_compile_options(-Wno-double-promotion)
add_compile_options(-Wno-undefined-func-template)
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
extern template ngraph::PartialShape
ngraph::apply_permutation<ngraph::PartialShape>(ngraph::PartialShape input,
ngraph::AxisVector order);
const string op::Transpose::type_name{"Transpose"}; const string op::Transpose::type_name{"Transpose"};
op::Transpose::Transpose(const shared_ptr<Node>& arg, const shared_ptr<Node>& input_order) op::Transpose::Transpose(const shared_ptr<Node>& arg, const shared_ptr<Node>& input_order)
......
...@@ -50,6 +50,9 @@ ...@@ -50,6 +50,9 @@
using namespace ngraph; using namespace ngraph;
using namespace std; using namespace std;
extern template ngraph::Shape ngraph::apply_permutation<ngraph::Shape>(ngraph::Shape input,
ngraph::AxisVector order);
static shared_ptr<Node> construct_constant_node(int n) static shared_ptr<Node> construct_constant_node(int n)
{ {
return op::Constant::create(element::f32, Shape{}, {n}); return op::Constant::create(element::f32, Shape{}, {n});
......
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
extern template ngraph::Shape ngraph::apply_permutation<ngraph::Shape>(ngraph::Shape input,
ngraph::AxisVector order);
pass::DynElimination::DynElimination() pass::DynElimination::DynElimination()
: GraphRewrite() : GraphRewrite()
{ {
......
...@@ -37,6 +37,8 @@ using namespace ngraph; ...@@ -37,6 +37,8 @@ using namespace ngraph;
extern template AxisVector ngraph::apply_permutation<AxisVector>(AxisVector input, extern template AxisVector ngraph::apply_permutation<AxisVector>(AxisVector input,
AxisVector order); AxisVector order);
extern template ngraph::Shape ngraph::apply_permutation<ngraph::Shape>(ngraph::Shape input,
ngraph::AxisVector order);
void pass::ReshapeElimination::construct_identity_reshape_pattern() void pass::ReshapeElimination::construct_identity_reshape_pattern()
{ {
......
...@@ -44,6 +44,12 @@ using namespace ngraph; ...@@ -44,6 +44,12 @@ using namespace ngraph;
using ReshapeMap = unordered_map<shared_ptr<Node>, shared_ptr<op::Reshape>>; using ReshapeMap = unordered_map<shared_ptr<Node>, shared_ptr<op::Reshape>>;
extern template ngraph::Shape ngraph::apply_permutation<ngraph::Shape>(ngraph::Shape input,
ngraph::AxisVector order);
extern template ngraph::CoordinateDiff
ngraph::apply_permutation<ngraph::CoordinateDiff>(ngraph::CoordinateDiff input,
ngraph::AxisVector order);
static string describe_reshape(shared_ptr<Node> node) static string describe_reshape(shared_ptr<Node> node)
{ {
stringstream ss; stringstream ss;
......
...@@ -154,7 +154,8 @@ namespace ngraph ...@@ -154,7 +154,8 @@ namespace ngraph
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp parallel for #pragma omp parallel for
#endif #endif
for (int64_t i = 0; i < outer_loop_num * num_indices; i++) for (int64_t i = 0; i < static_cast<int64_t>(outer_loop_num * num_indices);
i++)
{ {
Eigen::array<Eigen::Index, Rank1> in_extents, in_offsets; Eigen::array<Eigen::Index, Rank1> in_extents, in_offsets;
Eigen::array<Eigen::Index, Rank2> out_extents, out_offsets; Eigen::array<Eigen::Index, Rank2> out_extents, out_offsets;
......
...@@ -35,6 +35,12 @@ ...@@ -35,6 +35,12 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
extern template ngraph::Shape ngraph::apply_permutation<ngraph::Shape>(ngraph::Shape input,
ngraph::AxisVector order);
extern template ngraph::PartialShape
ngraph::apply_permutation<ngraph::PartialShape>(ngraph::PartialShape input,
ngraph::AxisVector order);
TEST(util, split) TEST(util, split)
{ {
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment