Skip to content

Commit

Permalink
Revert "[CPU] CACHE_DIR hash optimization (openvinotoolkit#25624)"
Browse files Browse the repository at this point in the history
This reverts commit 5f4a445.
  • Loading branch information
a-sidorova committed Oct 23, 2024
1 parent 791003b commit c71bd14
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 1,410 deletions.
5 changes: 1 addition & 4 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ target_include_directories(openvino_core_dev INTERFACE
$<BUILD_INTERFACE:${OpenVINO_SOURCE_DIR}/src/common/transformations/include>
$<BUILD_INTERFACE:${OpenVINO_SOURCE_DIR}/src/common/low_precision_transformations/include>)

target_include_directories(openvino_core_dev SYSTEM INTERFACE
$<BUILD_INTERFACE:$<$<TARGET_EXISTS:xbyak::xbyak>:$<TARGET_PROPERTY:xbyak::xbyak,INTERFACE_INCLUDE_DIRECTORIES>>>)

target_link_libraries(openvino_core_dev INTERFACE openvino::itt openvino::util)

set_target_properties(openvino_core_dev PROPERTIES EXPORT_NAME core::dev)
Expand Down Expand Up @@ -84,7 +81,7 @@ if(ENABLE_SYSTEM_PUGIXML)
set_target_properties(openvino_core_obj PROPERTIES NO_SYSTEM_FROM_IMPORTED ON)
endif()

target_compile_definitions(openvino_core_obj PRIVATE IMPLEMENT_OPENVINO_API XBYAK_NO_OP_NAMES XBYAK64)
target_compile_definitions(openvino_core_obj PRIVATE IMPLEMENT_OPENVINO_API)

ov_build_target_faster(openvino_core_obj
UNITY
Expand Down
20 changes: 0 additions & 20 deletions src/core/dev_api/openvino/runtime/compute_hash.hpp

This file was deleted.

3 changes: 3 additions & 0 deletions src/core/reference/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ target_include_directories(${TARGET_NAME} PUBLIC
$<BUILD_INTERFACE:${OV_CORE_DEV_API_PATH}>
$<BUILD_INTERFACE:${OV_CORE_INCLUDE_PATH}>)

target_include_directories(${TARGET_NAME} SYSTEM PRIVATE
$<BUILD_INTERFACE:$<$<TARGET_EXISTS:xbyak::xbyak>:$<TARGET_PROPERTY:xbyak::xbyak,INTERFACE_INCLUDE_DIRECTORIES>>>)

find_package(Threads REQUIRED)
target_link_libraries(${TARGET_NAME} PRIVATE Threads::Threads openvino::core::dev)

Expand Down
247 changes: 0 additions & 247 deletions src/core/reference/include/openvino/reference/utils/registers_pool.hpp

This file was deleted.

6 changes: 3 additions & 3 deletions src/core/reference/src/op/convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "openvino/reference/utils/convert_util.hpp"

#ifdef OV_CORE_USE_XBYAK_JIT
# include "openvino/reference/utils/jit_generator.hpp"
# include "jit_generator.hpp"
#endif

#ifdef OV_CORE_USE_INTRINSICS
Expand Down Expand Up @@ -256,7 +256,7 @@ class jit_convert_array : public jit::Generator {

template <typename src_t, typename dst_t, bool clamp = false>
static fn_t get() {
if (is_x64() && mayiuse(jit::avx) && mayiuse(jit::avx2) && mayiuse(jit::fp16)) {
if (is_x64() && mayiuse(avx) && mayiuse(avx2) && mayiuse(fp16)) {
static const jit_convert_array::context_t context{{sizeof(src_t), &jit::Generator::copy<src_t>},
{sizeof(dst_t), &jit::Generator::copy<dst_t>},
jit_convert_vec<src_t, dst_t, clamp>,
Expand Down Expand Up @@ -460,7 +460,7 @@ class jit_count_out_of_range : public jit::Generator {

template <typename data_t, typename range_t>
static fn_t get() {
if (is_x64() && mayiuse(jit::avx2)) {
if (is_x64() && mayiuse(avx2)) {
static const jit_count_out_of_range::context_t context{
{sizeof(data_t), &jit::Generator::copy<data_t>},
jit_count_out_of_range_vec_prepare<data_t, range_t>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
# endif
# include <xbyak/xbyak_util.h>

# include "openvino/core/except.hpp"
# include "jit_generator.hpp"
# include "openvino/core/type/bfloat16.hpp"
# include "openvino/core/type/float16.hpp"
# include "openvino/reference/utils/jit_generator.hpp"

namespace ov {
namespace reference {
Expand Down Expand Up @@ -52,10 +51,6 @@ bool Generator::mayiuse(const cpu_isa_t cpu_isa) {
return true && cpu.has(Cpu::tAVX512_VPOPCNTDQ);
case fp16:
return cpu.has(Cpu::tF16C);
case cpu_isa_t::pclmulqdq:
return cpu.has(Cpu::tPCLMULQDQ);
case cpu_isa_t::vpclmulqdq:
return cpu.has(Cpu::tVPCLMULQDQ);
case isa_any:
return true;
}
Expand All @@ -65,18 +60,10 @@ bool Generator::mayiuse(const cpu_isa_t cpu_isa) {
bool Generator::is_x64() {
return sizeof(void*) == 8;
}
Generator::Generator(cpu_isa_t isa, void* code_ptr, size_t code_size)
Generator::Generator(void* code_ptr, size_t code_size)
: Xbyak::CodeGenerator(code_size, code_ptr),
size_of_abi_save_regs(num_abi_save_gpr_regs * rax.getBit() / 8 + xmm_to_preserve * xmm_len),
reg_EVEX_max_8b_offt(rbp) {
if (isa == avx512_core) {
m_vlen = zmm_len;
} else if (isa == avx2) {
m_vlen = ymm_len;
} else {
OPENVINO_THROW("Unsupported isa: ", isa);
}
}
reg_EVEX_max_8b_offt(rbp) {}

void Generator::preamble() {
if (xmm_to_preserve) {
Expand Down
Loading

0 comments on commit c71bd14

Please sign in to comment.