Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openvinotoolkit/oneDNN
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3ab1dd895b5c842b10bd53b5fe6a73fe2dcc3319
Choose a base ref
...
head repository: openvinotoolkit/oneDNN
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 740795e2ec21b1149e878ecd4424ae03a3544bf3
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Mar 9, 2024

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    59cab32 View commit details
  2. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    740795e View commit details
Showing with 12 additions and 8 deletions.
  1. +2 −2 include/oneapi/dnnl/dnnl.hpp
  2. +2 −0 src/common/CMakeLists.txt
  3. +8 −6 src/common/cpp_compat.hpp
4 changes: 2 additions & 2 deletions include/oneapi/dnnl/dnnl.hpp
Original file line number Diff line number Diff line change
@@ -3902,7 +3902,7 @@ struct primitive_attr : public handle<dnnl_primitive_attr_t> {
"could not set scales primitive attribute");
}
void set_scales_dims(int arg, const memory::dims& dims) {
error::wrap_c_api(dnnl_primitive_attr_set_scales_dims(get(), arg, dims.data(), dims.size()),
error::wrap_c_api(dnnl_primitive_attr_set_scales_dims(get(), arg, dims.data(), static_cast<int>(dims.size())),
"could not set scales primitive attribute");
}

@@ -3926,7 +3926,7 @@ struct primitive_attr : public handle<dnnl_primitive_attr_t> {
}
void set_zero_points_dims(int arg, const memory::dims& dims, memory::data_type dt) {
error::wrap_c_api(
dnnl_primitive_attr_set_zero_points_dims(get(), arg, dims.data(), dims.size(), memory::convert_to_c(dt)),
dnnl_primitive_attr_set_zero_points_dims(get(), arg, dims.data(), static_cast<int>(dims.size()), memory::convert_to_c(dt)),
"could not set zero points primitive attribute");
}

2 changes: 2 additions & 0 deletions src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -40,6 +40,8 @@ if(DNNL_ENABLE_JIT_PROFILING OR DNNL_ENABLE_ITT_TASKS)
endif()
list(APPEND SOURCES ${ITT_PT})
endif()

set_property(GLOBAL APPEND PROPERTY DNNL_SUBDIR_EXTRA_SHARED_LIBS ${CMAKE_DL_LIBS})
endif()
endif()

14 changes: 8 additions & 6 deletions src/common/cpp_compat.hpp
Original file line number Diff line number Diff line change
@@ -29,22 +29,24 @@ namespace cpp_compat {
// been deprecated in C++17, which triggers deprecations warnings. This file
// contains a compatibility layer for such C++ features.

// Older than C++17.
#if defined(__cplusplus) && __cplusplus < 201703L || defined(_MSVC_LANG) && _MSVC_LANG < 201703L
// Newer than C++17.
#if defined(__cplusplus) && __cplusplus >= 201703L || defined(_MSVC_LANG) && _MSVC_LANG >= 201703L

inline int uncaught_exceptions() {
return (int)std::uncaught_exception();
return std::uncaught_exceptions();
}

template <class F, class... ArgTypes>
using invoke_result = typename std::result_of<F(ArgTypes...)>;
using invoke_result = std::invoke_result<F, ArgTypes...>;

#else

inline int uncaught_exceptions() {
return std::uncaught_exceptions();
return (int)std::uncaught_exception();
}

template <class F, class... ArgTypes>
using invoke_result = std::invoke_result<F, ArgTypes...>;
using invoke_result = typename std::result_of<F(ArgTypes...)>;

#endif
} // namespace cpp_compat