Skip to content

Commit

Permalink
[bugfix] Renamed variables in unittest of FC Layer
Browse files Browse the repository at this point in the history
Renamed global variables in unittest_layers_fully_connected_cl.cpp to fix duplicate declaration error

Signed-off-by: Debadri Samaddar <[email protected]>
  • Loading branch information
s-debadri committed May 15, 2024
1 parent 9c45213 commit 1268e89
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/unittest/layers/unittest_layers_fully_connected_cl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,44 +16,44 @@
#include <fc_layer_cl.h>
#include <layers_common_tests.h>

auto semantic_fc = LayerSemanticsParamType(
auto semantic_fc_gpu = LayerSemanticsParamType(
nntrainer::createLayer<nntrainer::FullyConnectedLayerCl>,
nntrainer::FullyConnectedLayerCl::type, {"unit=1"},
LayerCreateSetPropertyOptions::AVAILABLE_FROM_APP_CONTEXT, false, 1);

GTEST_PARAMETER_TEST(FullyConnectedGPU, LayerSemantics,
::testing::Values(semantic_fc));
::testing::Values(semantic_fc_gpu));

auto fc_basic_plain = LayerGoldenTestParamType(
auto fc_gpu_plain = LayerGoldenTestParamType(
nntrainer::createLayer<nntrainer::FullyConnectedLayerCl>, {"unit=5"},
"3:1:1:10", "fc_plain.nnlayergolden", LayerGoldenTestParamOptions::DEFAULT,
"nchw", "fp32", "fp32");
auto fc_basic_single_batch = LayerGoldenTestParamType(
auto fc_gpu_single_batch = LayerGoldenTestParamType(
nntrainer::createLayer<nntrainer::FullyConnectedLayerCl>, {"unit=4"},
"1:1:1:10", "fc_single_batch.nnlayergolden",
LayerGoldenTestParamOptions::DEFAULT, "nchw", "fp32", "fp32");
auto fc_basic_no_decay = LayerGoldenTestParamType(
auto fc_gpu_no_decay = LayerGoldenTestParamType(
nntrainer::createLayer<nntrainer::FullyConnectedLayerCl>,
{"unit=5", "weight_decay=0.0", "bias_decay=0.0"}, "3:1:1:10",
"fc_plain.nnlayergolden", LayerGoldenTestParamOptions::DEFAULT, "nchw",
"fp32", "fp32");

auto fc_basic_plain_nhwc = LayerGoldenTestParamType(
auto fc_gpu_plain_nhwc = LayerGoldenTestParamType(
nntrainer::createLayer<nntrainer::FullyConnectedLayerCl>, {"unit=5"},
"3:10:1:1", "fc_plain.nnlayergolden",
LayerGoldenTestParamOptions::SKIP_CALC_DERIV |
LayerGoldenTestParamOptions::SKIP_CALC_GRAD |
LayerGoldenTestParamOptions::USE_INC_FORWARD,
"nhwc", "fp32", "fp32");

auto fc_basic_single_batch_nhwc = LayerGoldenTestParamType(
auto fc_gpu_single_batch_nhwc = LayerGoldenTestParamType(
nntrainer::createLayer<nntrainer::FullyConnectedLayerCl>, {"unit=4"},
"1:10:1:1", "fc_single_batch.nnlayergolden",
LayerGoldenTestParamOptions::SKIP_CALC_DERIV |
LayerGoldenTestParamOptions::SKIP_CALC_GRAD,
"nhwc", "fp32", "fp32");

auto fc_basic_no_decay_nhwc = LayerGoldenTestParamType(
auto fc_gpu_no_decay_nhwc = LayerGoldenTestParamType(
nntrainer::createLayer<nntrainer::FullyConnectedLayerCl>,
{"unit=5", "weight_decay=0.0", "bias_decay=0.0"}, "3:10:1:1",
"fc_plain.nnlayergolden",
Expand All @@ -62,7 +62,7 @@ auto fc_basic_no_decay_nhwc = LayerGoldenTestParamType(
"nhwc", "fp32", "fp32");

GTEST_PARAMETER_TEST(FullyConnectedGPU, LayerGoldenTest,
::testing::Values(fc_basic_plain, fc_basic_single_batch,
fc_basic_no_decay, fc_basic_plain_nhwc,
fc_basic_single_batch_nhwc,
fc_basic_no_decay_nhwc));
::testing::Values(fc_gpu_plain, fc_gpu_single_batch,
fc_gpu_no_decay, fc_gpu_plain_nhwc,
fc_gpu_single_batch_nhwc,
fc_gpu_no_decay_nhwc));

0 comments on commit 1268e89

Please sign in to comment.