[Test] move softmax.hpp from single_layer_tests/ to single_op/ (#21824)
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
This commit is contained in:
parent
6b1d2f8978
commit
670824fe2c
|
@ -4,7 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "shared_test_classes/single_layer/softmax.hpp"
|
||||
#include "shared_test_classes/single_op/softmax.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
|
|
@ -4,12 +4,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "ov_models/builders.hpp"
|
||||
|
||||
#include "common_test_utils/common_utils.hpp"
|
||||
|
||||
#include "openvino/op/result.hpp"
|
||||
#include "openvino/op/softmax.hpp"
|
||||
#include "ov_models/builders.hpp"
|
||||
#include "shared_test_classes/base/ov_subgraph.hpp"
|
||||
|
||||
namespace ov {
|
||||
|
@ -32,7 +30,7 @@ template <class AxisType, class SoftmaxOpType>
|
|||
class SoftMaxLayerTestBase : public testing::WithParamInterface<SoftMaxTestParams<AxisType>>,
|
||||
virtual public ov::test::SubgraphBaseTest {
|
||||
public:
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<SoftMaxTestParams<AxisType>> &obj) {
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<SoftMaxTestParams<AxisType>>& obj) {
|
||||
ElementType netType, inType, outType;
|
||||
InputShape shapes;
|
||||
AxisType axis;
|
||||
|
@ -69,18 +67,18 @@ protected:
|
|||
params.push_back(std::make_shared<ov::op::v0::Parameter>(ngPrc, shape));
|
||||
|
||||
const auto softMax = std::make_shared<SoftmaxOpType>(params.at(0), axis);
|
||||
const ngraph::ResultVector results{std::make_shared<ov::op::v0::Result>(softMax)};
|
||||
const ov::ResultVector results{std::make_shared<ov::op::v0::Result>(softMax)};
|
||||
|
||||
// TODO: This workaround is needed as there is no full support for f16 type in the reference implementation
|
||||
if (ngPrc == element::Type_t::f16) {
|
||||
abs_threshold = 0.005;
|
||||
}
|
||||
|
||||
function = std::make_shared<ngraph::Function>(results, params, "softMax");
|
||||
function = std::make_shared<ov::Model>(results, params, "softMax");
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
} // namespace aux
|
||||
|
||||
using SoftMax1LayerTest = aux::SoftMaxLayerTestBase<size_t, ov::op::v1::Softmax>;
|
||||
using SoftMax8LayerTest = aux::SoftMaxLayerTestBase<int64_t, ov::op::v8::Softmax>;
|
Loading…
Reference in New Issue
Block a user