Skip to content

Commit

Permalink
Linker fixes part #2
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-gorokhov committed Jan 10, 2023
1 parent 7198441 commit b64c661
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
14 changes: 10 additions & 4 deletions src/plugins/intel_cpu/src/nodes/color_convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ std::tuple<T, T, T> Converter::yuv_to_rgb(float y, float u, float v) {
return std::make_tuple(r, g, b);
}

#if defined(OV_CPU_X64)
struct jit_uni_converter : public jit_kernel {
DECLARE_CPU_JIT_AUX_FUNCTIONS(jit_uni_converter)

Expand Down Expand Up @@ -263,6 +264,7 @@ void jit_uni_converter::store_tail(const variable<T*> & dst,

copy<T>(ptr[dst], s.pointer(), copy_size);
}
#endif

namespace nv12 {

Expand Down Expand Up @@ -393,6 +395,7 @@ class TwoPlaneConvert<T, impl_desc_type::ref> : public RefConverter {
}
};

#if defined(OV_CPU_X64)
template<typename T>
class JitConverter;

Expand Down Expand Up @@ -610,7 +613,7 @@ class TwoPlaneConvert<T, impl_desc_type::jit_uni> : public Converter {
});
}
};

#endif
} // namespace nv12

namespace i420 {
Expand Down Expand Up @@ -747,6 +750,7 @@ class ThreePlaneConvert<T, impl_desc_type::ref> : public RefConverter {
}
};

#if defined(OV_CPU_X64)
template<typename T>
class JitConverter;

Expand Down Expand Up @@ -963,7 +967,7 @@ class ThreePlaneConvert<T, impl_desc_type::jit_uni> : public Converter {
});
}
};

#endif
} // namespace i420

/**
Expand Down Expand Up @@ -1096,6 +1100,7 @@ void ColorConvert::initSupportedNV12Impls() {
impls[Precision::FP32][false] = SUPPORTED_IMPL(TwoPlaneConvert, float, ref);
}

#if defined(OV_CPU_X64)
// jit_uni
{
auto &impls = _supportedImpls[impl_desc_type::jit_uni][algorithm];
Expand All @@ -1104,7 +1109,7 @@ void ColorConvert::initSupportedNV12Impls() {
impls[Precision::FP32][true] = SUPPORTED_IMPL(SinglePlaneConvert, float, jit_uni);
impls[Precision::FP32][false] = SUPPORTED_IMPL(TwoPlaneConvert, float, jit_uni);
}

#endif
#undef SUPPORTED_IMPL
}

Expand All @@ -1123,6 +1128,7 @@ void ColorConvert::initSupportedI420Impls() {
impls[Precision::FP32][false] = SUPPORTED_IMPL(ThreePlaneConvert, float, ref);
}

#if defined(OV_CPU_X64)
// jit_uni
{
auto &impls = _supportedImpls[impl_desc_type::jit_uni][algorithm];
Expand All @@ -1131,7 +1137,7 @@ void ColorConvert::initSupportedI420Impls() {
impls[Precision::FP32][true] = SUPPORTED_IMPL(SinglePlaneConvert, float, jit_uni);
impls[Precision::FP32][false] = SUPPORTED_IMPL(ThreePlaneConvert, float, jit_uni);
}

#endif
#undef SUPPORTED_IMPL
}

Expand Down
6 changes: 5 additions & 1 deletion src/plugins/intel_cpu/src/nodes/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ using namespace Xbyak;
namespace ov {
namespace intel_cpu {
namespace node {
namespace {

#if defined(OV_CPU_X64)
namespace {
struct jit_has_subnormals_base : public jit_generator {
DECLARE_CPU_JIT_AUX_FUNCTIONS(jit_has_subnormals_base)

Expand Down Expand Up @@ -229,6 +230,7 @@ jit_has_subnormals_base::fn_t jit_has_subnormals_function() {
}

} // namespace
#endif

Input::Input(const std::shared_ptr<ngraph::Node>& op, const GraphContext::CPtr context)
: Node(op, context, PassThroughShapeInferFactory()) {
Expand Down Expand Up @@ -283,6 +285,7 @@ void Input::cloneBlobIfRequired() {

// The presence of subnormals is better to determined at IR read time.
auto hasSubnormals = [&, this] () {
#if defined(OV_CPU_X64)
if (prec == InferenceEngine::Precision::FP32) {
uint32_t const *u32data = constOp->get_data_ptr<uint32_t>();

Expand Down Expand Up @@ -318,6 +321,7 @@ void Input::cloneBlobIfRequired() {
}
}
}
#endif
return false;
};

Expand Down
16 changes: 8 additions & 8 deletions src/plugins/intel_cpu/src/nodes_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ Node::NodesFactory::NodesFactory()
INTEL_CPU_NODE(Lrn, Type::Lrn);
INTEL_CPU_NODE(BatchToSpace, Type::BatchToSpace);
INTEL_CPU_NODE(If, Type::If);
INTEL_CPU_NODE(Proposal, Type::Proposal);
INTEL_CPU_NODE(Broadcast, Type::Broadcast);
INTEL_CPU_NODE(ExperimentalDetectronTopKROIs, Type::ExperimentalDetectronTopKROIs);
INTEL_CPU_NODE(Reorder, Type::Reorder);
Expand All @@ -125,19 +124,16 @@ Node::NodesFactory::NodesFactory()
INTEL_CPU_NODE(MemoryOutput, Type::MemoryOutput);
INTEL_CPU_NODE(Tile, Type::Tile);
INTEL_CPU_NODE(GatherTree, Type::GatherTree);
INTEL_CPU_NODE(SpaceToDepth, Type::SpaceToDepth);
INTEL_CPU_NODE(FullyConnected, Type::FullyConnected);
INTEL_CPU_NODE(CTCGreedyDecoder, Type::CTCGreedyDecoder);
INTEL_CPU_NODE(Transpose, Type::Transpose);
INTEL_CPU_NODE(DeformableConvolution, Type::DeformableConvolution);
INTEL_CPU_NODE(ReorgYolo, Type::ReorgYolo);
INTEL_CPU_NODE(EmbeddingSegmentsSum, Type::EmbeddingSegmentsSum);
INTEL_CPU_NODE(Select, Type::Select);
INTEL_CPU_NODE(ShapeOf, Type::ShapeOf);
INTEL_CPU_NODE(ExperimentalDetectronGenerateProposalsSingleImage, Type::ExperimentalDetectronGenerateProposalsSingleImage);
INTEL_CPU_NODE(GenerateProposals, Type::GenerateProposals);
INTEL_CPU_NODE(ReverseSequence, Type::ReverseSequence);
INTEL_CPU_NODE(FakeQuantize, Type::FakeQuantize);
INTEL_CPU_NODE(ExperimentalDetectronPriorGridGenerator, Type::ExperimentalDetectronPriorGridGenerator);
INTEL_CPU_NODE(GatherND, Type::GatherND);
INTEL_CPU_NODE(LogSoftmax, Type::LogSoftmax);
Expand Down Expand Up @@ -165,24 +161,22 @@ Node::NodesFactory::NodesFactory()
INTEL_CPU_NODE(ScatterUpdate, Type::ScatterNDUpdate);
INTEL_CPU_NODE(TensorIterator, Type::TensorIterator);
INTEL_CPU_NODE(Concat, Type::Concatenation);
INTEL_CPU_NODE(ExtractImagePatches, Type::ExtractImagePatches);
INTEL_CPU_NODE(OneHot, Type::OneHot);
INTEL_CPU_NODE(ExperimentalDetectronDetectionOutput, Type::ExperimentalDetectronDetectionOutput);
INTEL_CPU_NODE(ShuffleChannels, Type::ShuffleChannels);
INTEL_CPU_NODE(DepthToSpace, Type::DepthToSpace);
INTEL_CPU_NODE(Deconvolution, Type::Deconvolution);
INTEL_CPU_NODE(Range, Type::Range);
INTEL_CPU_NODE(StridedSlice, Type::StridedSlice);
INTEL_CPU_NODE(GRN, Type::GRN);
INTEL_CPU_NODE(NonZero, Type::NonZero);
INTEL_CPU_NODE(Snippet, Type::Subgraph);
INTEL_CPU_NODE(PriorBox, Type::PriorBox);
INTEL_CPU_NODE(PriorBoxClustered, Type::PriorBoxClustered);
INTEL_CPU_NODE(Eye, Type::Eye);
INTEL_CPU_NODE(Unique, Type::Unique);
#if defined(OV_CPU_X64)
INTEL_CPU_NODE(Gather, Type::Gather);
INTEL_CPU_NODE(GridSample, Type::GridSample);
INTEL_CPU_NODE(DeformableConvolution, Type::DeformableConvolution);
INTEL_CPU_NODE(DepthToSpace, Type::DepthToSpace);
INTEL_CPU_NODE(DFT, Type::DFT);
INTEL_CPU_NODE(RDFT, Type::RDFT);
INTEL_CPU_NODE(ColorConvert, Type::ColorConvert);
Expand All @@ -197,6 +191,12 @@ Node::NodesFactory::NodesFactory()
INTEL_CPU_NODE(TopK, Type::TopK);
INTEL_CPU_NODE(Interaction, Type::Interaction);
INTEL_CPU_NODE(MHA, Type::MHA);
INTEL_CPU_NODE(ExtractImagePatches, Type::ExtractImagePatches);
INTEL_CPU_NODE(FakeQuantize, Type::FakeQuantize);
INTEL_CPU_NODE(Proposal, Type::Proposal);
INTEL_CPU_NODE(ShuffleChannels, Type::ShuffleChannels);
INTEL_CPU_NODE(SpaceToDepth, Type::SpaceToDepth);
INTEL_CPU_NODE(Snippet, Type::Subgraph);
#endif
}

Expand Down

0 comments on commit b64c661

Please sign in to comment.