Skip to content

Commit 4bff223

Browse files
committed
Address part of review comments
1 parent e691b62 commit 4bff223

File tree

13 files changed

+32
-33
lines changed

13 files changed

+32
-33
lines changed

src/plugins/intel_cpu/CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,8 @@ if(NOT (AARCH64 OR ARM))
215215
${CMAKE_CURRENT_SOURCE_DIR}/src/nodes/kernels/aarch64/*)
216216
endif()
217217

218-
# For RISC-V, compile RISCV64 executors; exclude AArch64 ones to avoid symbol clashes
219-
if(RISCV64)
218+
if(NOT (AARCH64 OR ARM))
220219
list(APPEND EXCLUDE_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/src/nodes/executors/aarch64/*)
221-
else()
222-
if(NOT (AARCH64 OR ARM))
223-
list(APPEND EXCLUDE_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/src/nodes/executors/aarch64/*)
224-
endif()
225220
endif()
226221

227222
if(NOT AARCH64)

src/plugins/intel_cpu/src/emitters/snippets/riscv64/cpu_generator.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2025 Intel Corporation
1+
// Copyright (C) 2018-2025 Intel Corporation
22
// SPDX-License-Identifier: Apache-2.0
33
//
44

@@ -23,7 +23,6 @@
2323
#include "openvino/core/except.hpp"
2424
#include "openvino/core/node.hpp"
2525
#include "openvino/core/node_output.hpp"
26-
#include "openvino/core/type.hpp"
2726
#include "openvino/core/type/element_type.hpp"
2827
#include "openvino/op/add.hpp"
2928
#include "openvino/op/parameter.hpp"
@@ -32,14 +31,14 @@
3231
#include "snippets/generator.hpp"
3332
#include "snippets/lowered/expression.hpp"
3433
#include "snippets/op/broadcastload.hpp"
35-
#include "snippets/op/buffer.hpp"
3634
#include "snippets/op/kernel.hpp"
3735
#include "snippets/op/load.hpp"
3836
#include "snippets/op/loop.hpp"
3937
#include "snippets/op/scalar.hpp"
4038
#include "snippets/op/store.hpp"
41-
#include "snippets/op/vector_buffer.hpp"
4239
#include "snippets/target_machine.hpp"
40+
#include "utils/general_utils.h"
41+
#include "xbyak_riscv/xbyak_riscv.hpp"
4342

4443
namespace ov {
4544

@@ -97,8 +96,6 @@ CPUTargetMachine::CPUTargetMachine(ov::intel_cpu::riscv64::cpu_isa_t host_isa, o
9796
// data movement
9897
jitters[op::v0::Parameter::get_type_info_static()] = CREATE_SNIPPETS_EMITTER(jit_nop_emitter);
9998
jitters[op::v0::Result::get_type_info_static()] = CREATE_SNIPPETS_EMITTER(jit_nop_emitter);
100-
jitters[snippets::op::Buffer::get_type_info_static()] = CREATE_SNIPPETS_EMITTER(jit_nop_emitter);
101-
jitters[snippets::op::VectorBuffer::get_type_info_static()] = CREATE_SNIPPETS_EMITTER(jit_nop_emitter);
10299
jitters[snippets::op::Scalar::get_type_info_static()] = CREATE_SNIPPETS_EMITTER(jit_scalar_emitter);
103100

104101
// memory access
@@ -157,11 +154,17 @@ std::vector<snippets::Reg> CPUTargetMachine::get_abi_arg_regs() const {
157154
}
158155

159156
std::vector<snippets::Reg> CPUTargetMachine::get_gp_reg_pool() const {
157+
using Xbyak_riscv::Reg;
160158
const auto num_gp_regs = 32;
161159
std::vector<snippets::Reg> reg_pool;
162-
for (size_t i = 0; i < num_gp_regs; i++) {
160+
for (size_t i = 1; i < num_gp_regs; i++) {
163161
// Reserve: x0 (zero), x1 (ra), x2 (sp), x3 (gp), x4 (tp), x8 (s0/fp)
164-
if (i != 0 && i != 1 && i != 2 && i != 3 && i != 4 && i != 8) {
162+
if (none_of(i,
163+
Xbyak_riscv::ra.getIdx(),
164+
Xbyak_riscv::sp.getIdx(),
165+
Xbyak_riscv::gp.getIdx(),
166+
Xbyak_riscv::tp.getIdx(),
167+
Xbyak_riscv::s0.getIdx())) {
165168
reg_pool.emplace_back(snippets::RegType::gpr, i);
166169
}
167170
}
@@ -196,16 +199,13 @@ std::shared_ptr<snippets::Generator> CPUGenerator::clone() const {
196199
return std::make_shared<CPUGenerator>(cpu_target_machine);
197200
}
198201

199-
ov::snippets::RegType CPUGenerator::get_specific_op_out_reg_type(const ov::Output<ov::Node>& out) const {
200-
// For basic Add operation, use vector register
201-
const auto op = out.get_node_shared_ptr();
202-
if (ov::is_type<op::v1::Add>(op)) {
203-
return ov::snippets::RegType::vec;
204-
}
202+
ov::snippets::RegType CPUGenerator::get_specific_op_out_reg_type(
203+
[[maybe_unused]] const ov::Output<ov::Node>& out) const {
205204
return ov::snippets::RegType::undefined;
206205
}
207206

208207
bool CPUGenerator::uses_precompiled_kernel([[maybe_unused]] const std::shared_ptr<snippets::Emitter>& e) const {
208+
// RISC-V platform doesn't currently use precompiled kernels
209209
return false;
210210
}
211211

src/plugins/intel_cpu/src/emitters/snippets/riscv64/cpu_generator.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2025 Intel Corporation
1+
// Copyright (C) 2018-2025 Intel Corporation
22
// SPDX-License-Identifier: Apache-2.0
33
//
44

src/plugins/intel_cpu/src/emitters/snippets/riscv64/jit_kernel_emitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2025 Intel Corporation
1+
// Copyright (C) 2018-2025 Intel Corporation
22
// SPDX-License-Identifier: Apache-2.0
33
//
44

src/plugins/intel_cpu/src/emitters/snippets/riscv64/jit_kernel_emitter.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2025 Intel Corporation
1+
// Copyright (C) 2018-2025 Intel Corporation
22
// SPDX-License-Identifier: Apache-2.0
33
//
44

src/plugins/intel_cpu/src/emitters/snippets/riscv64/jit_memory_emitters.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2025 Intel Corporation
1+
// Copyright (C) 2018-2025 Intel Corporation
22
// SPDX-License-Identifier: Apache-2.0
33
//
44

src/plugins/intel_cpu/src/emitters/snippets/riscv64/jit_memory_emitters.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2025 Intel Corporation
1+
// Copyright (C) 2018-2025 Intel Corporation
22
// SPDX-License-Identifier: Apache-2.0
33
//
44

src/plugins/intel_cpu/src/emitters/snippets/riscv64/jit_snippets_emitters.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2025 Intel Corporation
1+
// Copyright (C) 2018-2025 Intel Corporation
22
// SPDX-License-Identifier: Apache-2.0
33
//
44

src/plugins/intel_cpu/src/emitters/snippets/riscv64/jit_snippets_emitters.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2025 Intel Corporation
1+
// Copyright (C) 2018-2025 Intel Corporation
22
// SPDX-License-Identifier: Apache-2.0
33
//
44

src/plugins/intel_cpu/src/emitters/snippets/riscv64/utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2025 Intel Corporation
1+
// Copyright (C) 2018-2025 Intel Corporation
22
// SPDX-License-Identifier: Apache-2.0
33
//
44

0 commit comments

Comments
 (0)