Unverified Commit 7042165a authored by Fenglei's avatar Fenglei Committed by GitHub

Merge branch 'master' into tfl/gpu_broadcast

parents c82cb3f7 5d973a6e
......@@ -263,7 +263,7 @@ if (NGRAPH_CPU_ENABLE AND LLVM_INCLUDE_DIR AND MKLDNN_INCLUDE_DIR)
BYPRODUCTS
)
add_dependencies(ngraph header_resource ext_json)
include_directories(${CMAKE_BINARY_DIR})
include_directories(SYSTEM ${CMAKE_BINARY_DIR})
include_directories(SYSTEM ${JSON_INCLUDE_DIR})
endif()
......
......@@ -150,9 +150,12 @@ string ngraph::file_util::make_temp_directory(const string& path)
string tmp_template = file_util::path_join(fname, "ngraph_XXXXXX");
char* tmpname = strdup(tmp_template.c_str());
mkdtemp(tmpname);
string rc;
if (mkdtemp(tmpname))
{
rc = tmpname;
}
string rc = tmpname;
free(tmpname);
return rc;
}
......
......@@ -76,5 +76,4 @@ namespace ngraph
inline bool is_scalar(const Shape& shape) { return 0 == shape.size(); }
inline bool is_vector(const Shape& shape) { return 1 == shape.size(); }
Shape project_shape(const Shape& shape, const AxisSet& deleted_axes);
}
......@@ -28,13 +28,10 @@ static int tensor_volume(const mkldnn::memory::dims& t)
return x;
}
TEST(mkldnn, engine)
void test()
{
using namespace mkldnn;
#pragma GCC diagnostic ignored "-Wgnu-statement-expression"
EXPECT_NO_THROW(({
auto cpu_engine = engine(engine::cpu, 0);
const int mb = 2;
......@@ -67,8 +64,8 @@ TEST(mkldnn, engine)
auto c3_bias = memory({c3_bias_desc, cpu_engine}, bias.data());
auto c3_dst = memory({c3_dst_desc, cpu_engine}, output.data());
auto c3 = convolution_forward(convolution_forward::primitive_desc(
convolution_forward::desc(prop_kind::forward,
auto c3 = convolution_forward(
convolution_forward::primitive_desc(convolution_forward::desc(prop_kind::forward,
algorithm::convolution_direct,
c3_src_desc,
c3_weights_desc,
......@@ -85,5 +82,9 @@ TEST(mkldnn, engine)
c3_dst);
stream(stream::kind::eager).submit({c3}).wait();
}));
}
TEST(mkldnn, engine)
{
EXPECT_NO_THROW(test());
}
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