Skip to content

Commit

Permalink
Apply review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnick committed Oct 28, 2024
1 parent 4fa352d commit 2ade414
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/plugins/intel_cpu/src/nodes/lora.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,12 @@ void LoRA::selectOptimalPrimitiveDescriptor() {

const auto& desc = outputDescriptors.front();

if (!desc->isCompatible(*(inConfs.front().getMemDesc()))) {
// just a sanity check
THROW_CPU_NODE_ERR("Unexpected input/output descriptor mismatch");
}
// just a sanity check
CPU_NODE_ASSERT(desc->isCompatible(*(inConfs.front().getMemDesc())), "Unexpected input/output descriptor mismatch");

std::vector<PortConfig> outConfs;
outConfs.emplace_back(desc);
outConfs.front().inPlace(0); // use the memory from the first input inPlace

outConfs.emplace_back(desc, BlockedMemoryDesc::FULL_MASK, 0); // use the memory from the first input inPlace

const NodeConfig config(inConfs, outConfs);

Expand All @@ -84,15 +82,15 @@ void LoRA::selectOptimalPrimitiveDescriptor() {

// @todo add ascii diagram for memory mapping / reuse
void LoRA::createPrimitive() {
OPENVINO_ASSERT(getOriginalInputsNumber() == m_graph.GetInputNodesMap().size(),
CPU_NODE_ASSERT(getOriginalInputsNumber() == m_graph.GetInputNodesMap().size(),
"Number of node inputs must be equal the number of inner graph's inputs");

std::vector<MemoryPtr> inputMemory;
for (size_t i = 0; i < getOriginalInputsNumber(); i++) {
inputMemory.emplace_back(getSrcMemoryAtPort(i));
}

OPENVINO_ASSERT(getOriginalOutputsNumber() == m_graph.GetOutputNodesMap().size(),
CPU_NODE_ASSERT(getOriginalOutputsNumber() == m_graph.GetOutputNodesMap().size(),
"Number of node outputs must be equal the number of inner graph's outputs");

std::vector<MemoryPtr> outputMemory{getDstMemoryAtPort(0)};
Expand Down

0 comments on commit 2ade414

Please sign in to comment.