Unverified Commit 1cbc1517 authored by Scott Cyphers's avatar Scott Cyphers Committed by GitHub

Remove remaining osx compiler warnings (#2925)

* Fix clang compiler warnings

* Remove unintended file.

* style

* Not part of PR

* Another extra closure ref

* More warnings from merges

* Lambda arg was used

* Remove remaining osx compiler warnings

* style

* Try to avoid compiler warning

* Same for the other test
parent af8e78e0
......@@ -1691,14 +1691,13 @@ NGRAPH_TEST(${BACKEND_NAME}, backwards_batch_norm_training)
const Shape input_shape{10, 4, 5, 5};
const Shape channel_shape{input_shape.at(1)};
const double eps = 1e-3;
const element::Type& et = element::f32;
using T = float;
// Need to keep the output elements for mean and variance from going out of scope
// and getting freed.
NodeVector goes;
auto make_graph = [&input_shape, &channel_shape, &eps, &et, &goes] {
auto make_graph = [&input_shape, &channel_shape, &eps, &goes] {
const element::Type& et = element::f32;
auto input = make_shared<op::Parameter>(et, input_shape);
auto gamma = make_shared<op::Parameter>(et, channel_shape);
auto beta = make_shared<op::Parameter>(et, channel_shape);
......@@ -1715,6 +1714,7 @@ NGRAPH_TEST(${BACKEND_NAME}, backwards_batch_norm_training)
};
auto backend = runtime::Backend::create("${BACKEND_NAME}");
using T = float;
test::Uniform<T> rng(-5.0, 2.0);
auto input = rng.initialize(backend->create_tensor<T>(input_shape));
auto gamma = rng.initialize(backend->create_tensor<T>(channel_shape));
......
......@@ -340,11 +340,11 @@ TEST(tracer, count_tracepoint)
ngraph::runtime::cpu::CPU_Debugger dbg(*cf);
const size_t num_iterations = 10;
const size_t offset = 5;
size_t num_iterations = 10;
size_t offset = 5;
std::function<void(void**, const std::string&)> callback =
[num_iterations, offset](void** values, const std::string& name) {
[&num_iterations, offset](void** values, const std::string& name) {
ASSERT_EQ(static_cast<int*>(values[0])[0], num_iterations - 1 + offset);
};
......@@ -381,11 +381,11 @@ TEST(tracer, conditional_tracepoint)
ngraph::runtime::cpu::CPU_Debugger dbg(*cf);
const size_t num_iterations = 10;
const size_t offset = 5;
size_t num_iterations = 10;
size_t offset = 5;
int countdown = num_iterations;
auto add_tracer = [offset, &countdown, num_iterations](void** values, const std::string& name) {
auto add_tracer = [&countdown, num_iterations, offset](void** values, const std::string& name) {
if (countdown-- == 0)
{
ASSERT_EQ(static_cast<int*>(values[0])[0], num_iterations - 1 + offset);
......
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