Skip to content

Commit

Permalink
Fixes as per comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nshchego committed Oct 17, 2024
1 parent 0f991a1 commit d69c029
Show file tree
Hide file tree
Showing 11 changed files with 974 additions and 807 deletions.
5 changes: 5 additions & 0 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ 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 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 @@ -104,6 +107,8 @@ ov_ncc_naming_style(FOR_TARGET openvino_core_obj

ov_add_clang_format_target(openvino_core_clang FOR_SOURCES ${LIBRARY_SRC} ${PUBLIC_HEADERS} ${DEV_HEADERS})

target_compile_definitions(openvino_core_obj PRIVATE XBYAK_NO_OP_NAMES XBYAK64)

if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(openvino_core_obj PUBLIC OPENVINO_STATIC_LIBRARY)
endif()
Expand Down
20 changes: 20 additions & 0 deletions src/core/dev_api/openvino/runtime/compute_hash.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (C) 2018-2024 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

#pragma once

#include <cstddef>

namespace ov {
namespace runtime {

/**
* @brief Computes the hash value for the input data
* @param src A pointer to the input data
* @param size The length of the input data in bytes
*/
size_t compute_hash(const void* src, size_t size);

} // namespace reference
} // namespace ov
5 changes: 0 additions & 5 deletions src/core/reference/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ ov_build_target_faster(${TARGET_NAME}

ov_set_threading_interface_for(${TARGET_NAME})

target_compile_definitions(${TARGET_NAME} PRIVATE XBYAK_NO_OP_NAMES XBYAK64)

if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(${TARGET_NAME} PUBLIC OPENVINO_STATIC_LIBRARY)
endif()
Expand All @@ -50,9 +48,6 @@ 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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ namespace jit {

const Xbyak::Reg64 reg_EVEX_max_8b_offt;
static constexpr int EVEX_max_8b_offt = 0x200;
size_t m_vlen = ymm_len;

public:
static constexpr size_t xmm_len = 16;
Expand All @@ -78,7 +79,7 @@ namespace jit {
static bool mayiuse(const cpu_isa_t cpu_isa);
static bool is_x64();

Generator(void* code_ptr = nullptr, size_t code_size = 16 * 1024);
Generator(cpu_isa_t isa = avx2, void* code_ptr = nullptr, size_t code_size = 16 * 1024);
void preamble();
void postamble();

Expand All @@ -91,8 +92,12 @@ namespace jit {
void copy(const Xbyak::Reg64& dst,
const Xbyak::Reg64& src,
const Xbyak::Reg64& size);

size_t get_vlen() {
return m_vlen;
}
};

} // namespace jit
} // namespace reference
} // namespace reference
} // namespace ov
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <vector>

namespace ov {
namespace runtime {
namespace reference {
namespace jit {

class RegistersPool {
Expand Down Expand Up @@ -74,7 +74,7 @@ class RegistersPool {
checkUniqueAndUpdate(false);
}

template <ov::runtime::jit::cpu_isa_t isa>
template <ov::reference::jit::cpu_isa_t isa>
static Ptr create(std::initializer_list<Xbyak::Reg> regsToExclude);

static Ptr create(cpu_isa_t isa, std::initializer_list<Xbyak::Reg> regsToExclude);
Expand Down Expand Up @@ -303,10 +303,9 @@ RegistersPool::Ptr RegistersPool::create(cpu_isa_t isa, std::initializer_list<Xb
default:
OPENVINO_THROW("Invalid isa argument in RegistersPool::create(): ", isa);
}
OPENVINO_THROW("Invalid isa argument in RegistersPool::create()");
#undef ISA_SWITCH_CASE
}

} // namespace jit
} // namespace runtime
} // namespace reference
} // namespace ov
91 changes: 0 additions & 91 deletions src/core/reference/src/op/jit_generator.hpp

This file was deleted.

Loading

0 comments on commit d69c029

Please sign in to comment.