mirror of
https://github.com/uxlfoundation/oneDNN.git
synced 2025-10-20 18:43:49 +08:00
dnnl: grand rename. part 1: general
This commit is contained in:
2
.github/issue_template.md
vendored
2
.github/issue_template.md
vendored
@ -6,7 +6,7 @@ below the line.
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
### Environment
|
||||
Intel MKL-DNN includes hardware-specific optimizations and may behave
|
||||
DNNL includes hardware-specific optimizations and may behave
|
||||
differently on depending on the compiler and build environment. Include
|
||||
the following information to help reproduce the issue:
|
||||
* CPU make and model (try `lscpu`; if your `lscpu` does not list CPU flags,
|
||||
|
@ -42,11 +42,11 @@ if(POLICY CMP0066)
|
||||
cmake_policy(SET CMP0066 NEW)
|
||||
endif()
|
||||
|
||||
set(PROJECT_NAME "Intel(R) MKL-DNN")
|
||||
set(PROJECT_FULL_NAME "Intel(R) Math Kernel Library for Deep Neural Networks (Intel(R) MKL-DNN)")
|
||||
set(PROJECT_NAME "DNNL")
|
||||
set(PROJECT_FULL_NAME "Deep Neural Network Library (DNNL)")
|
||||
set(PROJECT_VERSION "1.0.0")
|
||||
|
||||
set(LIB_NAME mkldnn)
|
||||
set(LIB_NAME dnnl)
|
||||
|
||||
if (CMAKE_VERSION VERSION_LESS 3.0)
|
||||
project(${PROJECT_NAME} C CXX)
|
||||
@ -56,7 +56,7 @@ else()
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
message(FATAL_ERROR "Intel(R) MKL-DNN supports 64 bit platforms only")
|
||||
message(FATAL_ERROR "DNNL supports 64 bit platforms only")
|
||||
endif()
|
||||
|
||||
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||
@ -78,27 +78,27 @@ endif()
|
||||
# Tentative remapping of old options to the new one.
|
||||
# CAUTION: The old options will soon be removed.
|
||||
|
||||
if(MKLDNN_THREADING)
|
||||
set(MKLDNN_CPU_RUNTIME "${MKLDNN_THREADING}" CACHE STRING "" FORCE)
|
||||
if(DNNL_THREADING)
|
||||
set(DNNL_CPU_RUNTIME "${DNNL_THREADING}" CACHE STRING "" FORCE)
|
||||
message(STATUS "Using the obsolete way to specify the CPU runtime. "
|
||||
"Use MKLDNN_CPU_RUNTIME=${MKLDNN_CPU_RUNTIME} instead.")
|
||||
"Use DNNL_CPU_RUNTIME=${DNNL_CPU_RUNTIME} instead.")
|
||||
endif()
|
||||
|
||||
if(MKLDNN_GPU_BACKEND)
|
||||
if (MKLDNN_GPU_BACKEND STREQUAL "OPENCL")
|
||||
set(MKLDNN_GPU_BACKEND "OCL" CACHE STRING "" FORCE)
|
||||
if(DNNL_GPU_BACKEND)
|
||||
if (DNNL_GPU_BACKEND STREQUAL "OPENCL")
|
||||
set(DNNL_GPU_BACKEND "OCL" CACHE STRING "" FORCE)
|
||||
message(STATUS "Using the obsolete way to specify the OpenCL runtime. "
|
||||
"Use MKLDNN_GPU_RUNTIME=OCL instead.")
|
||||
"Use DNNL_GPU_RUNTIME=OCL instead.")
|
||||
endif()
|
||||
set(MKLDNN_GPU_RUNTIME "${MKLDNN_GPU_BACKEND}" CACHE STRING "" FORCE)
|
||||
set(DNNL_GPU_RUNTIME "${DNNL_GPU_BACKEND}" CACHE STRING "" FORCE)
|
||||
message(STATUS "Using the obsolete way to specify the GPU runtime. "
|
||||
"Use MKLDNN_GPU_RUNTME=${MKLDNN_GPU_RUNTIME} instead.")
|
||||
"Use DNNL_GPU_RUNTME=${DNNL_GPU_RUNTIME} instead.")
|
||||
endif()
|
||||
|
||||
if (MKLDNN_GPU_RUNTIME STREQUAL "OPENCL")
|
||||
set(MKLDNN_GPU_RUNTIME "OCL" CACHE STRING "" FORCE)
|
||||
if (DNNL_GPU_RUNTIME STREQUAL "OPENCL")
|
||||
set(DNNL_GPU_RUNTIME "OCL" CACHE STRING "" FORCE)
|
||||
message(STATUS "Using the obsolete way to specify the OpenCL runtime. "
|
||||
"Use MKLDNN_GPU_RUNTIME=OCL instead.")
|
||||
"Use DNNL_GPU_RUNTIME=OCL instead.")
|
||||
endif()
|
||||
|
||||
include("cmake/utils.cmake")
|
||||
@ -117,12 +117,12 @@ enable_testing()
|
||||
include_directories(include)
|
||||
|
||||
configure_file(
|
||||
"${PROJECT_SOURCE_DIR}/include/mkldnn_config.h.in"
|
||||
"${PROJECT_BINARY_DIR}/include/mkldnn_config.h"
|
||||
"${PROJECT_SOURCE_DIR}/include/dnnl_config.h.in"
|
||||
"${PROJECT_BINARY_DIR}/include/dnnl_config.h"
|
||||
)
|
||||
include_directories(${PROJECT_BINARY_DIR}/include)
|
||||
|
||||
if(MKLDNN_INSTALL_MODE STREQUAL "BUNDLE" AND NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
if(DNNL_INSTALL_MODE STREQUAL "BUNDLE" AND NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
# define CMAKE_INSTALL_LIBDIR as "lib" in the case of bundle
|
||||
set(CMAKE_INSTALL_LIBDIR "lib")
|
||||
endif()
|
||||
@ -132,9 +132,9 @@ include(CMakePackageConfigHelpers)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(examples)
|
||||
add_subdirectory(tests)
|
||||
# add_subdirectory(tests)
|
||||
|
||||
if(MKLDNN_INSTALL_MODE STREQUAL "BUNDLE")
|
||||
if(DNNL_INSTALL_MODE STREQUAL "BUNDLE")
|
||||
install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(FILES README.md DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
else()
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Contributing guidelines
|
||||
|
||||
If you have improvements to the Intel MKL-DNN code, please send us your pull
|
||||
If you have improvements to the DNNL code, please send us your pull
|
||||
requests! For getting started, see GitHub
|
||||
[howto](https://help.github.com/en/articles/about-pull-requests).
|
||||
|
||||
@ -27,7 +27,7 @@ list.
|
||||
|
||||
## Library functionality guidelines
|
||||
|
||||
Intel MKL-DNN focuses on functionality that satisfies all of the following
|
||||
DNNL focuses on functionality that satisfies all of the following
|
||||
criteria:
|
||||
|
||||
1. *Performance*: the functionality has material impact on a workload level.
|
||||
@ -53,27 +53,27 @@ primitives. In the RFC, please provide the following details:
|
||||
significant percentage of the total time and thus is a good optimization
|
||||
candidate.
|
||||
|
||||
* The definition of the operation as an MKL-DNN primitive including interface
|
||||
* The definition of the operation as an DNNL primitive including interface
|
||||
and semantics. It is OK to have sketches for the interface, but the
|
||||
semantics should be fairly well defined.
|
||||
|
||||
* If possible, provide information about similar compute operations. Sometimes
|
||||
Intel MKL-DNN primitives are super-sets of operations available in the
|
||||
DNNL primitives are super-sets of operations available in the
|
||||
deep learning applications for the sake of greater portability across them.
|
||||
|
||||
## Code contribution guidelines
|
||||
|
||||
The code must be:
|
||||
|
||||
* *Tested*: Intel MKL-DNN uses gtests for lightweight functional testing and
|
||||
* *Tested*: DNNL uses gtests for lightweight functional testing and
|
||||
benchdnn for functionality that requires both performance and functional
|
||||
testing.
|
||||
|
||||
* *Documented*: Intel MKL-DNN uses Doxygen for inline comments in public header
|
||||
* *Documented*: DNNL uses Doxygen for inline comments in public header
|
||||
files that is used to build reference manual and markdown (also processed by
|
||||
Doxygen) for user guide.
|
||||
|
||||
* *Portable*: Intel MKL-DNN supports different operating systems, CPU and GPU
|
||||
* *Portable*: DNNL supports different operating systems, CPU and GPU
|
||||
architectures, compilers, and run-times. The new code should be complaint
|
||||
with the [System Requirements](README.md#system-requirements).
|
||||
|
||||
@ -97,13 +97,13 @@ If in doubt, use the `clang-format`:
|
||||
clang-format -style=file -i foo.cpp
|
||||
```
|
||||
This will format code using the `_clang_format` file found in the Intel
|
||||
MKL-DNN top level directory.
|
||||
DNNL top level directory.
|
||||
|
||||
Coding style is secondary to the general code design.
|
||||
|
||||
## Unit tests
|
||||
|
||||
Intel MKL-DNN uses gtests for lightweight functional testing and benchdnn for
|
||||
DNNL uses gtests for lightweight functional testing and benchdnn for
|
||||
performance and functional testing.
|
||||
|
||||
Be sure to extend the existing tests when fixing an issue.
|
||||
|
2
LICENSE
2
LICENSE
@ -202,7 +202,7 @@
|
||||
|
||||
============================================================================
|
||||
|
||||
Intel MKL-DNN includes components with separate copyright
|
||||
DNNL includes components with separate copyright
|
||||
notices and license terms.
|
||||
|
||||
XByak, 3-clause BSD license
|
||||
|
54
README.md
54
README.md
@ -1,4 +1,4 @@
|
||||
Intel(R) Math Kernel Library for Deep Neural Networks (Intel(R) MKL-DNN)
|
||||
Deep Neural Network Library (DNNL)
|
||||
========================================================================
|
||||
|
||||
> **Note**
|
||||
@ -6,19 +6,19 @@ Intel(R) Math Kernel Library for Deep Neural Networks (Intel(R) MKL-DNN)
|
||||
> Version 1.0 brings incompatible changes to the 0.20 version. Please read
|
||||
> [Version 1.0 Transition Guide](https://intel.github.io/mkl-dnn/dev_guide_transition_to_v1.html).
|
||||
|
||||
Intel(R) Math Kernel Library for Deep Neural Networks (Intel(R) MKL-DNN) is an
|
||||
Deep Neural Network Library (DNNL) is an
|
||||
open-source performance library for deep learning applications. The library
|
||||
includes basic building blocks for neural networks optimized
|
||||
for Intel Architecture Processors and Intel Processor Graphics.
|
||||
|
||||
> **Note**
|
||||
> Intel MKL-DNN is distinct from Intel MKL, which is general math
|
||||
> DNNL is distinct from Intel MKL, which is general math
|
||||
> performance library.
|
||||
|
||||
Intel MKL-DNN is intended for deep learning applications and framework
|
||||
DNNL is intended for deep learning applications and framework
|
||||
developers interested in improving application performance
|
||||
on Intel CPUs and GPUs. Deep learning practitioners should use one of the
|
||||
applications enabled with Intel MKL-DNN:
|
||||
applications enabled with DNNL:
|
||||
* [Apache\* MXNet](https://mxnet.apache.org)
|
||||
* [BigDL](https://github.com/intel-analytics/BigDL)
|
||||
* [Caffe\* Optimized for Intel Architecture](https://github.com/intel/caffe)
|
||||
@ -42,9 +42,9 @@ names use the following convention:
|
||||
|
||||
| OS | Package name
|
||||
| :------ | :-----------
|
||||
| Linux | `mkldnn_lnx_<version>_cpu_<cpu runtime>[_gpu_<gpu runtime>].tgz`
|
||||
| Windows | `mkldnn_win_<version>_cpu_<cpu runtime>[_gpu_<gpu runtime>].zip`
|
||||
| macOS | `mkldnn_mac_<version>_cpu_<cpu runtime>.tgz`
|
||||
| Linux | `dnnl_lnx_<version>_cpu_<cpu runtime>[_gpu_<gpu runtime>].tgz`
|
||||
| Windows | `dnnl_win_<version>_cpu_<cpu runtime>[_gpu_<gpu runtime>].zip`
|
||||
| macOS | `dnnl_mac_<version>_cpu_<cpu runtime>.tgz`
|
||||
|
||||
Several packages are available for each operating system to ensure
|
||||
interoperability with CPU or GPU runtime libraries used by the application.
|
||||
@ -67,7 +67,7 @@ If the configuration you need is not available, you can
|
||||
[build the library from source](http://intel.github.io/mkl-dnn/dev_guide_build.html).
|
||||
|
||||
# Contributing
|
||||
We welcome community contributions to Intel MKL-DNN. If you have an idea on how
|
||||
We welcome community contributions to DNNL. If you have an idea on how
|
||||
to improve the library:
|
||||
|
||||
* For changes impacting the public API, submit
|
||||
@ -86,7 +86,7 @@ Please submit your questions, feature requests, and bug reports on the
|
||||
[GitHub issues](https://github.com/intel/mkl-dnn/issues) page.
|
||||
|
||||
# License
|
||||
Intel MKL-DNN is licensed under
|
||||
DNNL is licensed under
|
||||
[Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0). This
|
||||
software includes the following third-party components:
|
||||
* [Xbyak](https://github.com/herumi/xbyak) distributed under
|
||||
@ -104,7 +104,7 @@ includes annotated examples.
|
||||
comprehensive reference of the library API.
|
||||
|
||||
# System Requirements
|
||||
Intel MKL-DNN supports systems based on Intel 64 architecture or
|
||||
DNNL supports systems based on Intel 64 architecture or
|
||||
compatible processors.
|
||||
|
||||
The library is optimized for the following CPUs:
|
||||
@ -116,7 +116,7 @@ The library is optimized for the following CPUs:
|
||||
* Intel Xeon Scalable processor (formerly Skylake and Cascade Lake)
|
||||
* future Intel Xeon Scalable processor (code name Cooper Lake)
|
||||
|
||||
Intel MKL-DNN detects instruction set architecture (ISA) in the runtime and uses
|
||||
DNNL detects instruction set architecture (ISA) in the runtime and uses
|
||||
just-in-time (JIT) code generation to deploy the code optimized
|
||||
for the latest supported ISA.
|
||||
|
||||
@ -126,7 +126,7 @@ The library is optimized for the following GPUs:
|
||||
* Intel Iris Plus Graphics
|
||||
|
||||
## Requirements for Building from Source
|
||||
Intel MKL-DNN supports systems meeting the following requirements:
|
||||
DNNL supports systems meeting the following requirements:
|
||||
* Operating sytem with Intel 64 architecture support
|
||||
* C++ compiler with C++11 standard support
|
||||
* [CMake](https://cmake.org/download/) 2.8.11 or later
|
||||
@ -138,7 +138,7 @@ dependencies.
|
||||
|
||||
### CPU Engine
|
||||
Intel Architecture Processors and compatible devices are supported by the
|
||||
Intel MKL-DNN CPU engine. The CPU engine is built by default and cannot
|
||||
DNNL CPU engine. The CPU engine is built by default and cannot
|
||||
be disabled at build time. The engine can be configured to use the OpenMP or
|
||||
TBB threading runtime. The following additional requirements apply:
|
||||
* OpenMP runtime requires C++ compiler with OpenMP 2.0 or later standard support
|
||||
@ -150,7 +150,7 @@ Some implementations rely on OpenMP 4.0 SIMD extensions, and we recommend using
|
||||
the Intel C++ Compiler for the best performance results.
|
||||
|
||||
### GPU Engine
|
||||
Intel Processor Graphics is supported by the Intel MKL-DNN GPU engine. The GPU
|
||||
Intel Processor Graphics is supported by the DNNL GPU engine. The GPU
|
||||
engine is disabled in the default build configuration. The following
|
||||
additional requirements apply when GPU engine is enabled:
|
||||
* OpenCL\* runtime library (OpenCL version 1.2 or later)
|
||||
@ -158,7 +158,7 @@ additional requirements apply when GPU engine is enabled:
|
||||
with Intel subgroups extension support
|
||||
|
||||
### Runtime Dependencies
|
||||
When Intel MKL-DNN is built from source, the library runtime dependencies
|
||||
When DNNL is built from source, the library runtime dependencies
|
||||
and specific versions are defined by the build environment.
|
||||
|
||||
#### Linux
|
||||
@ -172,11 +172,11 @@ Runtime specific dependencies:
|
||||
|
||||
| Runtime configuration | Compiler | Dependency
|
||||
| :----------------------- | :---------------------------- | :---------
|
||||
| `MKLDNN_CPU_RUNTIME=OMP` | GCC | GNU OpenMP runtime (libgomp.so)
|
||||
| `MKLDNN_CPU_RUNTIME=OMP` | Intel C/C++ Compiler | Intel OpenMP runtime (libiomp5.so)
|
||||
| `MKLDNN_CPU_RUNTIME=OMP` | Clang | Intel OpenMP runtime (libiomp5.so)
|
||||
| `MKLDNN_CPU_RUNTIME=TBB` | any | Threading Building Blocks (libtbb.so)
|
||||
| `MKLDNN_GPU_RUNTIME=OCL` | any | Intel Graphics Compute Runtime for OpenCL (libOpenCL.so)
|
||||
| `DNNL_CPU_RUNTIME=OMP` | GCC | GNU OpenMP runtime (libgomp.so)
|
||||
| `DNNL_CPU_RUNTIME=OMP` | Intel C/C++ Compiler | Intel OpenMP runtime (libiomp5.so)
|
||||
| `DNNL_CPU_RUNTIME=OMP` | Clang | Intel OpenMP runtime (libiomp5.so)
|
||||
| `DNNL_CPU_RUNTIME=TBB` | any | Threading Building Blocks (libtbb.so)
|
||||
| `DNNL_GPU_RUNTIME=OCL` | any | Intel Graphics Compute Runtime for OpenCL (libOpenCL.so)
|
||||
|
||||
#### Windows
|
||||
Common dependencies:
|
||||
@ -186,10 +186,10 @@ Runtime specific dependencies:
|
||||
|
||||
| Runtime configuration | Compiler | Dependency
|
||||
| :----------------------- | :---------------------------- | :---------
|
||||
| `MKLDNN_CPU_RUNTIME=OMP` | Microsoft Visual C++ Compiler | No additional requirements
|
||||
| `MKLDNN_CPU_RUNTIME=OMP` | Intel C/C++ Compiler | Intel OpenMP runtime (iomp5.dll)
|
||||
| `MKLDNN_CPU_RUNTIME=TBB` | any | Threading Building Blocks (tbb.dll)
|
||||
| `MKLDNN_GPU_RUNTIME=OCL` | any | Intel Graphics Driver (OpenCL.dll)
|
||||
| `DNNL_CPU_RUNTIME=OMP` | Microsoft Visual C++ Compiler | No additional requirements
|
||||
| `DNNL_CPU_RUNTIME=OMP` | Intel C/C++ Compiler | Intel OpenMP runtime (iomp5.dll)
|
||||
| `DNNL_CPU_RUNTIME=TBB` | any | Threading Building Blocks (tbb.dll)
|
||||
| `DNNL_GPU_RUNTIME=OCL` | any | Intel Graphics Driver (OpenCL.dll)
|
||||
|
||||
#### macOS
|
||||
Common dependencies:
|
||||
@ -199,8 +199,8 @@ Runtime specific dependencies:
|
||||
|
||||
| Runtime configuration | Compiler | Dependency
|
||||
| :----------------------- | :---------------------------- | :---------
|
||||
| `MKLDNN_CPU_RUNTIME=OMP` | Intel C/C++ Compiler | Intel OpenMP runtime (libiomp5.dylib)
|
||||
| `MKLDNN_CPU_RUNTIME=TBB` | any | Threading Building Blocks (libtbb.dylib)
|
||||
| `DNNL_CPU_RUNTIME=OMP` | Intel C/C++ Compiler | Intel OpenMP runtime (libiomp5.dylib)
|
||||
| `DNNL_CPU_RUNTIME=TBB` | any | Threading Building Blocks (libtbb.dylib)
|
||||
|
||||
### Validated Configurations
|
||||
CPU engine was validated on RedHat\* Enterprise Linux 7 with
|
||||
|
@ -58,7 +58,7 @@ if(DOXYGEN_FOUND)
|
||||
COMMENT "Generating API documentation with Doxygen" VERBATIM)
|
||||
add_custom_target(doc DEPENDS ${DOXYGEN_STAMP_FILE})
|
||||
|
||||
if(NOT MKLDNN_INSTALL_MODE STREQUAL "BUNDLE")
|
||||
if(NOT DNNL_INSTALL_MODE STREQUAL "BUNDLE")
|
||||
install(
|
||||
DIRECTORY ${DOXYGEN_OUTPUT_DIR}
|
||||
DESTINATION share/doc/${LIB_NAME} OPTIONAL)
|
||||
|
@ -24,7 +24,7 @@ set(MKL_cmake_included true)
|
||||
include("cmake/utils.cmake")
|
||||
include("cmake/options.cmake")
|
||||
|
||||
if (NOT _MKLDNN_USE_MKL)
|
||||
if (NOT _DNNL_USE_MKL)
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
@ -22,7 +22,7 @@ if(OpenCL_cmake_included)
|
||||
endif()
|
||||
set(OpenCL_cmake_included true)
|
||||
|
||||
if(MKLDNN_GPU_RUNTIME STREQUAL "OCL")
|
||||
if(DNNL_GPU_RUNTIME STREQUAL "OCL")
|
||||
message(STATUS "GPU support is enabled (OpenCL)")
|
||||
else()
|
||||
message(STATUS "GPU support is disabled")
|
||||
@ -31,6 +31,6 @@ endif()
|
||||
|
||||
find_package(OpenCL REQUIRED)
|
||||
|
||||
set(MKLDNN_GPU_RUNTIME_CURRENT ${MKLDNN_GPU_RUNTIME})
|
||||
set(DNNL_GPU_RUNTIME_CURRENT ${DNNL_GPU_RUNTIME})
|
||||
include_directories(${OpenCL_INCLUDE_DIRS})
|
||||
list(APPEND EXTRA_SHARED_LIBS OpenCL::OpenCL)
|
||||
|
@ -69,9 +69,9 @@ else()
|
||||
append_if(OpenMP_C_FOUND CMAKE_SRC_CCXX_FLAGS "${OpenMP_C_FLAGS}")
|
||||
endif()
|
||||
|
||||
if (MKLDNN_CPU_RUNTIME MATCHES "OMP")
|
||||
if (DNNL_CPU_RUNTIME MATCHES "OMP")
|
||||
if (OpenMP_CXX_FOUND)
|
||||
set(MKLDNN_CPU_RUNTIME_CURRENT "OMP")
|
||||
set(DNNL_CPU_RUNTIME_CURRENT "OMP")
|
||||
append(CMAKE_TEST_CCXX_FLAGS "${OpenMP_CXX_FLAGS}")
|
||||
append(CMAKE_EXAMPLE_CCXX_FLAGS "${OpenMP_CXX_FLAGS}")
|
||||
else()
|
||||
|
@ -23,7 +23,7 @@ endif()
|
||||
set(TBB_cmake_included true)
|
||||
include("cmake/Threading.cmake")
|
||||
|
||||
if(NOT MKLDNN_CPU_RUNTIME STREQUAL "TBB")
|
||||
if(NOT DNNL_CPU_RUNTIME STREQUAL "TBB")
|
||||
return()
|
||||
endif()
|
||||
|
||||
@ -35,7 +35,7 @@ elseif(UNIX)
|
||||
find_package(TBB REQUIRED tbb HINTS cmake/lnx)
|
||||
endif()
|
||||
|
||||
set(MKLDNN_CPU_RUNTIME_CURRENT "TBB")
|
||||
set(DNNL_CPU_RUNTIME_CURRENT "TBB")
|
||||
include_directories(${TBB_INCLUDE_DIRS})
|
||||
list(APPEND EXTRA_SHARED_LIBS ${TBB_IMPORTED_TARGETS})
|
||||
|
||||
|
@ -27,8 +27,8 @@ set(Threading_cmake_included true)
|
||||
find_package(Threads REQUIRED)
|
||||
list(APPEND EXTRA_SHARED_LIBS "${CMAKE_THREAD_LIBS_INIT}")
|
||||
|
||||
# While MKL-DNN defaults to OpenMP (if _OPENMP is defined) without CMake, here
|
||||
# While DNNL defaults to OpenMP (if _OPENMP is defined) without CMake, here
|
||||
# we default to sequential threading and let OpenMP.cmake and TBB.cmake to
|
||||
# figure things out. This is especially important because OpenMP is used both
|
||||
# for threading and vectorization via #pragma omp simd
|
||||
set(MKLDNN_CPU_RUNTIME_CURRENT "SEQ")
|
||||
set(DNNL_CPU_RUNTIME_CURRENT "SEQ")
|
||||
|
@ -1,21 +1,21 @@
|
||||
@PACKAGE_INIT@
|
||||
set(MKLDNN_CPU_RUNTIME "@MKLDNN_CPU_RUNTIME@")
|
||||
set(MKLDNN_GPU_RUNTIME "@MKLDNN_GPU_RUNTIME@")
|
||||
set(DNNL_CPU_RUNTIME "@DNNL_CPU_RUNTIME@")
|
||||
set(DNNL_GPU_RUNTIME "@DNNL_GPU_RUNTIME@")
|
||||
|
||||
# Use a custom find module for transitive dependencies
|
||||
set(MKLDNN_ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
|
||||
set(DNNL_ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
|
||||
list(APPEND CMAKE_MODULE_PATH ${PACKAGE_PREFIX_DIR}/@LIB_CONFIG_INSTALL_DIR@)
|
||||
|
||||
if(MKLDNN_CPU_RUNTIME STREQUAL "TBB")
|
||||
if(DNNL_CPU_RUNTIME STREQUAL "TBB")
|
||||
find_package(TBB REQUIRED)
|
||||
endif()
|
||||
|
||||
if(MKLDNN_GPU_RUNTIME STREQUAL "OCL")
|
||||
if(DNNL_GPU_RUNTIME STREQUAL "OCL")
|
||||
find_package(OpenCL REQUIRED)
|
||||
endif()
|
||||
|
||||
# Reverting the CMAKE_MODULE_PATH to its original state
|
||||
set(CMAKE_MODULE_PATH ${MKLDNN_ORIGINAL_CMAKE_MODULE_PATH})
|
||||
set(CMAKE_MODULE_PATH ${DNNL_ORIGINAL_CMAKE_MODULE_PATH})
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@LIB_EXPORT_NAME@.cmake")
|
||||
check_required_components("@LIB_NAME@")
|
||||
|
@ -36,7 +36,7 @@ if (NOT _tbbmalloc_proxy_ix EQUAL -1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Intel MKL-DNN changes: use TBBROOT to locate Intel TBB
|
||||
# DNNL changes: use TBBROOT to locate Intel TBB
|
||||
# get_filename_component(_tbb_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
# get_filename_component(_tbb_root "${_tbb_root}" PATH)
|
||||
if (NOT TBBROOT)
|
||||
@ -95,7 +95,7 @@ unset(_tbb_compiler_ver)
|
||||
file(READ "${_tbb_root}/include/tbb/tbb_stddef.h" _tbb_stddef)
|
||||
string(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_tbb_stddef}")
|
||||
if (${TBB_INTERFACE_VERSION} VERSION_LESS 9100)
|
||||
message(FATAL_ERROR "MKL-DNN requires TBB version 2017 or above")
|
||||
message(FATAL_ERROR "DNNL requires TBB version 2017 or above")
|
||||
endif()
|
||||
|
||||
# Now we check that all the needed component are present
|
||||
@ -118,7 +118,7 @@ foreach (_tbb_component ${TBB_FIND_COMPONENTS})
|
||||
IMPORTED_LOCATION_DEBUG "${_tbb_debug_lib}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_tbb_root}/include")
|
||||
|
||||
# Intel MKL-DNN changes: set TBB_INCLUDE_DIRS to use it for include_directories()
|
||||
# DNNL changes: set TBB_INCLUDE_DIRS to use it for include_directories()
|
||||
if (_tbb_component STREQUAL tbb)
|
||||
set(TBB_INCLUDE_DIRS "${_tbb_root}/include")
|
||||
endif()
|
||||
|
@ -36,7 +36,7 @@ if (NOT _tbbmalloc_proxy_ix EQUAL -1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Intel MKL-DNN changes: use TBBROOT to locate Intel TBB
|
||||
# DNNL changes: use TBBROOT to locate Intel TBB
|
||||
# get_filename_component(_tbb_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
# get_filename_component(_tbb_root "${_tbb_root}" PATH)
|
||||
if (NOT TBBROOT)
|
||||
@ -64,7 +64,7 @@ set(_tbb_compiler_subdir .)
|
||||
file(READ "${_tbb_root}/include/tbb/tbb_stddef.h" _tbb_stddef)
|
||||
string(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_tbb_stddef}")
|
||||
if (${TBB_INTERFACE_VERSION} VERSION_LESS 9100)
|
||||
message(FATAL_ERROR "MKL-DNN requires TBB version 2017 or above")
|
||||
message(FATAL_ERROR "DNNL requires TBB version 2017 or above")
|
||||
endif()
|
||||
|
||||
get_filename_component(_tbb_lib_path "${_tbb_root}/lib/${_tbb_arch_subdir}/${_tbb_compiler_subdir}" ABSOLUTE)
|
||||
@ -86,7 +86,7 @@ foreach (_tbb_component ${TBB_FIND_COMPONENTS})
|
||||
IMPORTED_LOCATION_DEBUG "${_tbb_debug_lib}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_tbb_root}/include")
|
||||
|
||||
# Intel MKL-DNN changes: set TBB_INCLUDE_DIRS to use it for include_directories()
|
||||
# DNNL changes: set TBB_INCLUDE_DIRS to use it for include_directories()
|
||||
if (_tbb_component STREQUAL tbb)
|
||||
set(TBB_INCLUDE_DIRS "${_tbb_root}/include")
|
||||
endif()
|
||||
|
@ -26,11 +26,11 @@ set(options_cmake_included true)
|
||||
# Features
|
||||
# ========
|
||||
|
||||
option(MKLDNN_VERBOSE
|
||||
"allows Intel(R) MKL-DNN be verbose whenever MKLDNN_VERBOSE
|
||||
option(DNNL_VERBOSE
|
||||
"allows DNNL be verbose whenever DNNL_VERBOSE
|
||||
environment variable set to 1" ON) # enabled by default
|
||||
|
||||
option(MKLDNN_ENABLE_CONCURRENT_EXEC
|
||||
option(DNNL_ENABLE_CONCURRENT_EXEC
|
||||
"disables sharing a common scratchpad between primitives.
|
||||
This option must be turned on if there is a possibility of concurrent
|
||||
execution of primitives that were created in the same thread.
|
||||
@ -41,24 +41,24 @@ option(MKLDNN_ENABLE_CONCURRENT_EXEC
|
||||
# Building properties and scope
|
||||
# =============================
|
||||
|
||||
set(MKLDNN_LIBRARY_TYPE "SHARED" CACHE STRING
|
||||
"specifies whether Intel(R) MKL-DNN library should be SHARED or STATIC")
|
||||
option(MKLDNN_BUILD_EXAMPLES "builds examples" ON)
|
||||
option(MKLDNN_BUILD_TESTS "builds tests" ON)
|
||||
option(MKLDNN_BUILD_FOR_CI "specifies whether Intel(R) MKL-DNN library should be built for CI" OFF)
|
||||
option(MKLDNN_WERROR "treat warnings as errors" OFF)
|
||||
set(DNNL_LIBRARY_TYPE "SHARED" CACHE STRING
|
||||
"specifies whether DNNL library should be SHARED or STATIC")
|
||||
option(DNNL_BUILD_EXAMPLES "builds examples" ON)
|
||||
option(DNNL_BUILD_TESTS "builds tests" ON)
|
||||
option(DNNL_BUILD_FOR_CI "specifies whether DNNL library should be built for CI" OFF)
|
||||
option(DNNL_WERROR "treat warnings as errors" OFF)
|
||||
|
||||
set(MKLDNN_INSTALL_MODE "DEFAULT" CACHE STRING
|
||||
set(DNNL_INSTALL_MODE "DEFAULT" CACHE STRING
|
||||
"specifies installation mode; supports DEFAULT or BUNDLE.
|
||||
|
||||
When BUNDLE option is set MKL-DNN will be installed as a bundle
|
||||
When BUNDLE option is set DNNL will be installed as a bundle
|
||||
which contains examples and benchdnn.")
|
||||
|
||||
# =============
|
||||
# Optimizations
|
||||
# =============
|
||||
|
||||
set(MKLDNN_ARCH_OPT_FLAGS "HostOpts" CACHE STRING
|
||||
set(DNNL_ARCH_OPT_FLAGS "HostOpts" CACHE STRING
|
||||
"specifies compiler optimization flags (see below for more information).
|
||||
If empty default optimization level would be applied which depends on the
|
||||
compiler being used.
|
||||
@ -75,15 +75,15 @@ set(MKLDNN_ARCH_OPT_FLAGS "HostOpts" CACHE STRING
|
||||
- For all other cases there are no special optimizations flags.
|
||||
|
||||
If the library is to be built for generic architecture (e.g. built by a
|
||||
Linux distributive maintainer) one may want to specify MKLDNN_ARCH_OPT_FLAGS=\"\"
|
||||
Linux distributive maintainer) one may want to specify DNNL_ARCH_OPT_FLAGS=\"\"
|
||||
to not use any host specific instructions")
|
||||
|
||||
# ======================
|
||||
# Profiling capabilities
|
||||
# ======================
|
||||
|
||||
option(MKLDNN_ENABLE_JIT_PROFILING
|
||||
"Enable registration of Intel(R) MKL-DNN kernels that are generated at
|
||||
option(DNNL_ENABLE_JIT_PROFILING
|
||||
"Enable registration of DNNL kernels that are generated at
|
||||
runtime with Intel VTune Amplifier (on by default). Without the
|
||||
registrations, Intel VTune Amplifier would report data collected inside
|
||||
the kernels as `outside any known module`."
|
||||
@ -93,7 +93,7 @@ option(MKLDNN_ENABLE_JIT_PROFILING
|
||||
# Engine capabilities
|
||||
# ===================
|
||||
|
||||
set(MKLDNN_CPU_RUNTIME "OMP" CACHE STRING
|
||||
set(DNNL_CPU_RUNTIME "OMP" CACHE STRING
|
||||
"specifies the threading runtime for CPU engines;
|
||||
supports OMP (default) or TBB.
|
||||
|
||||
@ -105,7 +105,7 @@ set(TBBROOT "" CACHE STRING
|
||||
"path to Intel(R) Thread Building Blocks (Intel(R) TBB).
|
||||
Use this option to specify Intel(R) TBB installation locaton.")
|
||||
|
||||
set(MKLDNN_GPU_RUNTIME "NONE" CACHE STRING
|
||||
set(DNNL_GPU_RUNTIME "NONE" CACHE STRING
|
||||
"specifies the runtime to use for GPU engines.
|
||||
Can be NONE (default; no GPU engines) or OCL (OpenCL GPU engines).
|
||||
|
||||
@ -129,7 +129,7 @@ option(BENCHDNN_USE_RDPMC
|
||||
# Developer and debug flags
|
||||
# =========================
|
||||
|
||||
set(MKLDNN_USE_CLANG_SANITIZER "" CACHE STRING
|
||||
set(DNNL_USE_CLANG_SANITIZER "" CACHE STRING
|
||||
"instructs build system to use a Clang sanitizer. Possible values:
|
||||
Address: enables AddressSanitizer
|
||||
Memory: enables MemorySanitizer
|
||||
@ -137,4 +137,4 @@ set(MKLDNN_USE_CLANG_SANITIZER "" CACHE STRING
|
||||
Undefined: enables UndefinedBehaviourSanitizer
|
||||
This feature is experimental and is only available on Linux.")
|
||||
|
||||
option(_MKLDNN_USE_MKL "use BLAS functions from Intel MKL" OFF)
|
||||
option(_DNNL_USE_MKL "use BLAS functions from Intel MKL" OFF)
|
||||
|
@ -24,7 +24,7 @@ set(platform_cmake_included true)
|
||||
|
||||
include("cmake/utils.cmake")
|
||||
|
||||
add_definitions(-DMKLDNN_DLL -DMKLDNN_DLL_EXPORTS)
|
||||
add_definitions(-DDNNL_DLL -DDNNL_DLL_EXPORTS)
|
||||
|
||||
# UNIT8_MAX-like macros are a part of the C99 standard and not a part of the
|
||||
# C++ standard (see C99 standard 7.18.2 and 7.18.4)
|
||||
@ -34,13 +34,13 @@ set(CMAKE_CCXX_FLAGS)
|
||||
set(CMAKE_CCXX_NOWARN_FLAGS)
|
||||
set(DEF_ARCH_OPT_FLAGS)
|
||||
|
||||
if($ENV{MKLDNN_WERROR})
|
||||
set(MKLDNN_WERROR $ENV{MKLDNN_WERROR})
|
||||
if($ENV{DNNL_WERROR})
|
||||
set(DNNL_WERROR $ENV{DNNL_WERROR})
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set(USERCONFIG_PLATFORM "x64")
|
||||
append_if(MKLDNN_WERROR CMAKE_CCXX_FLAGS "/WX")
|
||||
append_if(DNNL_WERROR CMAKE_CCXX_FLAGS "/WX")
|
||||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
|
||||
append(CMAKE_CCXX_FLAGS "/MP")
|
||||
# int -> bool
|
||||
@ -74,7 +74,7 @@ if(MSVC)
|
||||
endif()
|
||||
elseif(UNIX OR MINGW)
|
||||
append(CMAKE_CCXX_FLAGS "-Wall -Wno-unknown-pragmas")
|
||||
append_if(MKLDNN_WERROR CMAKE_CCXX_FLAGS "-Werror")
|
||||
append_if(DNNL_WERROR CMAKE_CCXX_FLAGS "-Werror")
|
||||
append(CMAKE_CCXX_FLAGS "-fvisibility=internal")
|
||||
append(CMAKE_CXX_FLAGS "-fvisibility-inlines-hidden")
|
||||
# compiler specific settings
|
||||
@ -83,41 +83,41 @@ elseif(UNIX OR MINGW)
|
||||
# very upset. Tell it that it's okay and that we love it
|
||||
# unconditionally.
|
||||
append(CMAKE_CCXX_NOWARN_FLAGS "-Wno-pass-failed")
|
||||
if(MKLDNN_USE_CLANG_SANITIZER MATCHES "Memory(WithOrigin)?")
|
||||
if(NOT MKLDNN_CPU_RUNTIME STREQUAL "SEQ")
|
||||
if(DNNL_USE_CLANG_SANITIZER MATCHES "Memory(WithOrigin)?")
|
||||
if(NOT DNNL_CPU_RUNTIME STREQUAL "SEQ")
|
||||
message(WARNING "Clang OpenMP is not compatible with MSan! "
|
||||
"Expect a lot of false positives!")
|
||||
endif()
|
||||
append(CMAKE_CCXX_SANITIZER_FLAGS "-fsanitize=memory")
|
||||
if(MKLDNN_USE_CLANG_SANITIZER STREQUAL "MemoryWithOrigin")
|
||||
if(DNNL_USE_CLANG_SANITIZER STREQUAL "MemoryWithOrigin")
|
||||
append(CMAKE_CCXX_SANITIZER_FLAGS
|
||||
"-fsanitize-memory-track-origins=2")
|
||||
append(CMAKE_CCXX_SANITIZER_FLAGS
|
||||
"-fno-omit-frame-pointer")
|
||||
endif()
|
||||
set(MKLDNN_ENABLED_CLANG_SANITIZER "${MKLDNN_USE_CLANG_SANITIZER}")
|
||||
elseif(MKLDNN_USE_CLANG_SANITIZER STREQUAL "Undefined")
|
||||
set(DNNL_ENABLED_CLANG_SANITIZER "${DNNL_USE_CLANG_SANITIZER}")
|
||||
elseif(DNNL_USE_CLANG_SANITIZER STREQUAL "Undefined")
|
||||
append(CMAKE_CCXX_SANITIZER_FLAGS "-fsanitize=undefined")
|
||||
append(CMAKE_CCXX_SANITIZER_FLAGS
|
||||
"-fno-sanitize=function,vptr") # work around linking problems
|
||||
append(CMAKE_CCXX_SANITIZER_FLAGS "-fno-omit-frame-pointer")
|
||||
set(MKLDNN_ENABLED_CLANG_SANITIZER "${MKLDNN_USE_CLANG_SANITIZER}")
|
||||
elseif(MKLDNN_USE_CLANG_SANITIZER STREQUAL "Address")
|
||||
set(DNNL_ENABLED_CLANG_SANITIZER "${DNNL_USE_CLANG_SANITIZER}")
|
||||
elseif(DNNL_USE_CLANG_SANITIZER STREQUAL "Address")
|
||||
append(CMAKE_CCXX_SANITIZER_FLAGS "-fsanitize=address")
|
||||
set(MKLDNN_ENABLED_CLANG_SANITIZER "${MKLDNN_USE_CLANG_SANITIZER}")
|
||||
elseif(MKLDNN_USE_CLANG_SANITIZER STREQUAL "Thread")
|
||||
set(DNNL_ENABLED_CLANG_SANITIZER "${DNNL_USE_CLANG_SANITIZER}")
|
||||
elseif(DNNL_USE_CLANG_SANITIZER STREQUAL "Thread")
|
||||
append(CMAKE_CCXX_SANITIZER_FLAGS "-fsanitize=thread")
|
||||
set(MKLDNN_ENABLED_CLANG_SANITIZER "${MKLDNN_USE_CLANG_SANITIZER}")
|
||||
elseif(MKLDNN_USE_CLANG_SANITIZER STREQUAL "Leak")
|
||||
set(DNNL_ENABLED_CLANG_SANITIZER "${DNNL_USE_CLANG_SANITIZER}")
|
||||
elseif(DNNL_USE_CLANG_SANITIZER STREQUAL "Leak")
|
||||
append(CMAKE_CCXX_SANITIZER_FLAGS "-fsanitize=leak")
|
||||
set(MKLDNN_ENABLED_CLANG_SANITIZER "${MKLDNN_USE_CLANG_SANITIZER}")
|
||||
elseif(NOT MKLDNN_USE_CLANG_SANITIZER STREQUAL "")
|
||||
set(DNNL_ENABLED_CLANG_SANITIZER "${DNNL_USE_CLANG_SANITIZER}")
|
||||
elseif(NOT DNNL_USE_CLANG_SANITIZER STREQUAL "")
|
||||
message(FATAL_ERROR
|
||||
"Unsupported Clang sanitizer '${MKLDNN_USE_CLANG_SANITIZER}'")
|
||||
"Unsupported Clang sanitizer '${DNNL_USE_CLANG_SANITIZER}'")
|
||||
endif()
|
||||
if(MKLDNN_ENABLED_CLANG_SANITIZER)
|
||||
if(DNNL_ENABLED_CLANG_SANITIZER)
|
||||
message(STATUS
|
||||
"Using Clang ${MKLDNN_ENABLED_CLANG_SANITIZER} "
|
||||
"Using Clang ${DNNL_ENABLED_CLANG_SANITIZER} "
|
||||
"sanitizer (experimental!)")
|
||||
append(CMAKE_CCXX_SANITIZER_FLAGS "-g -fno-omit-frame-pointer")
|
||||
endif()
|
||||
@ -151,12 +151,12 @@ if(UNIX OR MINGW)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MKLDNN_ARCH_OPT_FLAGS STREQUAL "HostOpts")
|
||||
set(MKLDNN_ARCH_OPT_FLAGS "${DEF_ARCH_OPT_FLAGS}")
|
||||
if(DNNL_ARCH_OPT_FLAGS STREQUAL "HostOpts")
|
||||
set(DNNL_ARCH_OPT_FLAGS "${DEF_ARCH_OPT_FLAGS}")
|
||||
endif()
|
||||
|
||||
append(CMAKE_C_FLAGS "${CMAKE_CCXX_FLAGS} ${MKLDNN_ARCH_OPT_FLAGS}")
|
||||
append(CMAKE_CXX_FLAGS "${CMAKE_CCXX_FLAGS} ${MKLDNN_ARCH_OPT_FLAGS}")
|
||||
append(CMAKE_C_FLAGS "${CMAKE_CCXX_FLAGS} ${DNNL_ARCH_OPT_FLAGS}")
|
||||
append(CMAKE_CXX_FLAGS "${CMAKE_CCXX_FLAGS} ${DNNL_ARCH_OPT_FLAGS}")
|
||||
|
||||
if(APPLE)
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
@ -25,7 +25,7 @@ include("cmake/options.cmake")
|
||||
|
||||
# Common configuration for tests / test cases on Windows
|
||||
function(maybe_configure_windows_test name kind)
|
||||
if(WIN32 AND (NOT MKLDNN_BUILD_FOR_CI))
|
||||
if(WIN32 AND (NOT DNNL_BUILD_FOR_CI))
|
||||
string(REPLACE ";" "\;" PATH "${CTESTCONFIG_PATH};$ENV{PATH}")
|
||||
set_property(${kind} ${name} PROPERTY ENVIRONMENT "PATH=${PATH}")
|
||||
if(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
|
@ -23,24 +23,24 @@ endif()
|
||||
set(version_cmake_included true)
|
||||
|
||||
string(REPLACE "." ";" VERSION_LIST ${PROJECT_VERSION})
|
||||
list(GET VERSION_LIST 0 MKLDNN_VERSION_MAJOR)
|
||||
list(GET VERSION_LIST 1 MKLDNN_VERSION_MINOR)
|
||||
list(GET VERSION_LIST 2 MKLDNN_VERSION_PATCH)
|
||||
list(GET VERSION_LIST 0 DNNL_VERSION_MAJOR)
|
||||
list(GET VERSION_LIST 1 DNNL_VERSION_MINOR)
|
||||
list(GET VERSION_LIST 2 DNNL_VERSION_PATCH)
|
||||
|
||||
find_package(Git)
|
||||
if (GIT_FOUND)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --format=%H
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
RESULT_VARIABLE RESULT
|
||||
OUTPUT_VARIABLE MKLDNN_VERSION_HASH
|
||||
OUTPUT_VARIABLE DNNL_VERSION_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
|
||||
if(NOT GIT_FOUND OR RESULT)
|
||||
set(MKLDNN_VERSION_HASH "N/A")
|
||||
set(DNNL_VERSION_HASH "N/A")
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
"${PROJECT_SOURCE_DIR}/include/mkldnn_version.h.in"
|
||||
"${PROJECT_BINARY_DIR}/include/mkldnn_version.h"
|
||||
"${PROJECT_SOURCE_DIR}/include/dnnl_version.h.in"
|
||||
"${PROJECT_BINARY_DIR}/include/dnnl_version.h"
|
||||
)
|
||||
|
@ -36,7 +36,7 @@ if (NOT _tbbmalloc_proxy_ix EQUAL -1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Intel MKL-DNN changes: use TBBROOT to locate Intel TBB
|
||||
# DNNL changes: use TBBROOT to locate Intel TBB
|
||||
# get_filename_component(_tbb_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
# get_filename_component(_tbb_root "${_tbb_root}" PATH)
|
||||
if (NOT TBBROOT)
|
||||
@ -90,7 +90,7 @@ get_filename_component(_tbb_inc_path "${_tbb_root}/include/" ABSOLUTE)
|
||||
file(READ "${_tbb_inc_path}/tbb/tbb_stddef.h" _tbb_stddef)
|
||||
string(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_tbb_stddef}")
|
||||
if (${TBB_INTERFACE_VERSION} VERSION_LESS 9100)
|
||||
message(FATAL_ERROR "MKL-DNN requires TBB version 2017 or above")
|
||||
message(FATAL_ERROR "DNNL requires TBB version 2017 or above")
|
||||
endif()
|
||||
|
||||
if (TBB_FOUND)
|
||||
@ -113,7 +113,7 @@ foreach (_tbb_component ${TBB_FIND_COMPONENTS})
|
||||
IMPORTED_IMPLIB_DEBUG "${_tbb_debug_lib}"
|
||||
INTERFACE_COMPILE_DEFINITIONS "__TBB_NO_IMPLICIT_LINKAGE=1")
|
||||
|
||||
# Intel MKL-DNN changes: set TBB_INCLUDE_DIRS to use it for include_directories()
|
||||
# DNNL changes: set TBB_INCLUDE_DIRS to use it for include_directories()
|
||||
if (_tbb_component STREQUAL tbb)
|
||||
set(TBB_INCLUDE_DIRS "${_tbb_inc_path}")
|
||||
endif()
|
||||
|
@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
#===============================================================================
|
||||
|
||||
if (NOT MKLDNN_BUILD_EXAMPLES)
|
||||
if (NOT DNNL_BUILD_EXAMPLES)
|
||||
return()
|
||||
endif()
|
||||
|
||||
@ -44,7 +44,7 @@ foreach(src ${sources})
|
||||
register_exe(${example_name} ${src} "test" ${LIBM})
|
||||
elseif(${example_name} MATCHES "^(cross-engine|gpu)")
|
||||
# Example name contains cross-engine or gpu-
|
||||
if (NOT MKLDNN_GPU_RUNTIME STREQUAL "NONE")
|
||||
if (NOT DNNL_GPU_RUNTIME STREQUAL "NONE")
|
||||
register_exe(${example_name} ${src} "test" ${LIBM})
|
||||
endif()
|
||||
else()
|
||||
@ -55,14 +55,14 @@ foreach(src ${sources})
|
||||
maybe_configure_windows_test("cpu-${example_name}" TEST)
|
||||
|
||||
# Adding test for GPU
|
||||
if (NOT MKLDNN_GPU_RUNTIME STREQUAL "NONE")
|
||||
if (NOT DNNL_GPU_RUNTIME STREQUAL "NONE")
|
||||
add_test("gpu-${example_name}" "${example_name}" gpu)
|
||||
maybe_configure_windows_test("gpu-${example_name}" TEST)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (MKLDNN_INSTALL_MODE STREQUAL "BUNDLE")
|
||||
if (DNNL_INSTALL_MODE STREQUAL "BUNDLE")
|
||||
file(GLOB example_sources
|
||||
"cpu_*.cpp" "c_*.c" "cnn_*.c" "cnn_*.cpp" "rnn_*.cpp" "*.h*")
|
||||
configure_file(CMakeLists.txt.in CMakeLists.txt @ONLY)
|
||||
|
@ -15,13 +15,13 @@
|
||||
#===============================================================================
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
project (MKLDNN_EXAMPLES)
|
||||
project (DNNL_EXAMPLES)
|
||||
|
||||
if(POLICY CMP0015)
|
||||
cmake_policy(SET CMP0015 NEW)
|
||||
endif()
|
||||
|
||||
set(MKLDNNROOT "${PROJECT_SOURCE_DIR}/.." CACHE STRING "")
|
||||
set(DNNLROOT "${PROJECT_SOURCE_DIR}/.." CACHE STRING "")
|
||||
|
||||
enable_testing()
|
||||
|
||||
@ -59,9 +59,9 @@ else()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(CTESTCONFIG_PATH "${MKLDNNROOT}/bin")
|
||||
set(CTESTCONFIG_PATH "${DNNLROOT}/bin")
|
||||
elseif(APPLE)
|
||||
set(CTESTCONFIG_PATH "${MKLDNNROOT}/lib")
|
||||
set(CTESTCONFIG_PATH "${DNNLROOT}/lib")
|
||||
endif()
|
||||
|
||||
# Common configuration for tests / test cases on Windows and Apple
|
||||
@ -84,7 +84,7 @@ endfunction()
|
||||
# test -- "test" to mark executable as a test, "" otherwise
|
||||
function(register_example name srcs test)
|
||||
add_executable(${name} ${srcs})
|
||||
find_package(mkldnn @PROJECT_VERSION@ CONFIG REQUIRED HINTS ${MKLDNNROOT})
|
||||
find_package(mkldnn @PROJECT_VERSION@ CONFIG REQUIRED HINTS ${DNNLROOT})
|
||||
target_link_libraries(${name} MKLDNN::mkldnn ${LIBM})
|
||||
if("x${test}" STREQUAL "xtest")
|
||||
add_test(${name} ${name})
|
||||
@ -102,7 +102,7 @@ foreach(src ${sources})
|
||||
register_example(${example_name} ${src} "test" ${LIBM})
|
||||
elseif(${example_name} MATCHES "^(cross-engine|gpu)")
|
||||
# Example Name contains cross-engine or gpu-
|
||||
if (NOT MKLDNN_GPU_RUNTIME STREQUAL "NONE")
|
||||
if (NOT DNNL_GPU_RUNTIME STREQUAL "NONE")
|
||||
register_example(${example_name} ${src} "test" ${LIBM})
|
||||
endif()
|
||||
else()
|
||||
@ -113,7 +113,7 @@ foreach(src ${sources})
|
||||
maybe_configure_test("cpu-${example_name}" TEST)
|
||||
|
||||
# Adding test for GPU
|
||||
if (NOT MKLDNN_GPU_RUNTIME STREQUAL "NONE")
|
||||
if (NOT DNNL_GPU_RUNTIME STREQUAL "NONE")
|
||||
add_test("gpu-${example_name}" "${example_name}" gpu)
|
||||
maybe_configure_test("gpu-${example_name}" TEST)
|
||||
endif()
|
||||
|
2052
include/dnnl.h
Normal file
2052
include/dnnl.h
Normal file
File diff suppressed because it is too large
Load Diff
5164
include/dnnl.hpp
Normal file
5164
include/dnnl.hpp
Normal file
File diff suppressed because it is too large
Load Diff
90
include/dnnl_config.h.in
Normal file
90
include/dnnl_config.h.in
Normal file
@ -0,0 +1,90 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2019 Intel Corporation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
#ifndef DNNL_CONFIG_H
|
||||
#define DNNL_CONFIG_H
|
||||
|
||||
/// @cond DO_NOT_DOCUMENT_THIS
|
||||
|
||||
// All symbols shall be internal unless marked as DNNL_API
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#define DNNL_HELPER_DLL_IMPORT __declspec(dllimport)
|
||||
#define DNNL_HELPER_DLL_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#if __GNUC__ >= 4
|
||||
#define DNNL_HELPER_DLL_IMPORT __attribute__((visibility("default")))
|
||||
#define DNNL_HELPER_DLL_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define DNNL_HELPER_DLL_IMPORT
|
||||
#define DNNL_HELPER_DLL_EXPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DNNL_DLL
|
||||
#ifdef DNNL_DLL_EXPORTS
|
||||
#define DNNL_API DNNL_HELPER_DLL_EXPORT
|
||||
#else
|
||||
#define DNNL_API DNNL_HELPER_DLL_IMPORT
|
||||
#endif
|
||||
#else
|
||||
#define DNNL_API
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define DNNL_DEPRECATED __attribute__((deprecated))
|
||||
#elif defined(_MSC_VER)
|
||||
#define DNNL_DEPRECATED __declspec(deprecated)
|
||||
#else
|
||||
#define DNNL_DEPRECATED
|
||||
#endif
|
||||
|
||||
/// @endcond
|
||||
|
||||
// No runtime (disabled)
|
||||
#define DNNL_RUNTIME_NONE 0u
|
||||
// Sequential runtime (CPU only)
|
||||
#define DNNL_RUNTIME_SEQ 1u
|
||||
// OpenMP runtime (CPU only)
|
||||
#define DNNL_RUNTIME_OMP 2u
|
||||
// TBB runtime (CPU only)
|
||||
#define DNNL_RUNTIME_TBB 4u
|
||||
// OpenCL runtime
|
||||
#define DNNL_RUNTIME_OCL 256u
|
||||
|
||||
// clang-format off
|
||||
|
||||
// DNNL CPU engine runtime
|
||||
#cmakedefine DNNL_CPU_RUNTIME DNNL_RUNTIME_${DNNL_CPU_RUNTIME_CURRENT}
|
||||
|
||||
// DNNL GPU engine runtime
|
||||
#cmakedefine DNNL_GPU_RUNTIME DNNL_RUNTIME_${DNNL_GPU_RUNTIME}
|
||||
|
||||
// clang-format on
|
||||
|
||||
#if defined(DNNL_CPU_RUNTIME) && defined(DNNL_GPU_RUNTIME)
|
||||
#if (DNNL_CPU_RUNTIME == DNNL_RUNTIME_NONE) \
|
||||
|| (DNNL_CPU_RUNTIME == DNNL_RUNTIME_OCL)
|
||||
#error "Unexpected DNNL_CPU_RUNTIME"
|
||||
#endif
|
||||
#if (DNNL_GPU_RUNTIME != DNNL_RUNTIME_NONE) \
|
||||
&& (DNNL_GPU_RUNTIME != DNNL_RUNTIME_OCL)
|
||||
#error "Unexpected DNNL_GPU_RUNTIME"
|
||||
#endif
|
||||
#else
|
||||
#error "BOTH DNNL_CPU_RUNTIME and DNNL_GPU_RUNTIME must be defined"
|
||||
#endif
|
||||
|
||||
#endif
|
71
include/dnnl_debug.h
Normal file
71
include/dnnl_debug.h
Normal file
@ -0,0 +1,71 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2018-2019 Intel Corporation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
// DO NOT EDIT, AUTO-GENERATED
|
||||
|
||||
// clang-format off
|
||||
|
||||
#ifndef DNNL_DEBUG_H
|
||||
#define DNNL_DEBUG_H
|
||||
|
||||
/// @file
|
||||
/// Debug capabilities
|
||||
|
||||
#include "dnnl_config.h"
|
||||
#include "dnnl_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
const char DNNL_API *dnnl_status2str(dnnl_status_t v);
|
||||
const char DNNL_API *dnnl_dt2str(dnnl_data_type_t v);
|
||||
const char DNNL_API *dnnl_fmt_kind2str(dnnl_format_kind_t v);
|
||||
const char DNNL_API *dnnl_fmt_tag2str(dnnl_format_tag_t v);
|
||||
const char DNNL_API *dnnl_prop_kind2str(dnnl_prop_kind_t v);
|
||||
const char DNNL_API *dnnl_prim_kind2str(dnnl_primitive_kind_t v);
|
||||
const char DNNL_API *dnnl_alg_kind2str(dnnl_alg_kind_t v);
|
||||
const char DNNL_API *dnnl_normalization_flags2str(dnnl_normalization_flags_t v);
|
||||
const char DNNL_API *dnnl_rnn_flags2str(dnnl_rnn_flags_t v);
|
||||
const char DNNL_API *dnnl_rnn_direction2str(dnnl_rnn_direction_t v);
|
||||
const char DNNL_API *dnnl_engine_kind2str(dnnl_engine_kind_t v);
|
||||
const char DNNL_API *dnnl_scratchpad_mode2str(dnnl_scratchpad_mode_t v);
|
||||
|
||||
/// Forms a format string for a given memory descriptor.
|
||||
///
|
||||
/// The format is defined as: 'dt:[p|o|0]:fmt_kind:fmt:extra'.
|
||||
/// Here:
|
||||
/// - dt -- data type
|
||||
/// - p -- indicates there is non-trivial padding
|
||||
/// - o -- indicates there is non-trivial padding offset
|
||||
/// - 0 -- indicates there is non-trivial offset0
|
||||
/// - fmt_kind -- format kind (blocked, wino, etc...)
|
||||
/// - fmt -- extended format string (format_kind specific)
|
||||
/// - extra -- shows extra fields (underspecified)
|
||||
int DNNL_API dnnl_md2fmt_str(char *fmt_str, size_t fmt_str_len,
|
||||
const dnnl_memory_desc_t *md);
|
||||
|
||||
/// Forms a dimension string for a given memory descriptor.
|
||||
///
|
||||
/// The format is defined as: 'dim0xdim1x...xdimN
|
||||
int DNNL_API dnnl_md2dim_str(char *dim_str, size_t dim_str_len,
|
||||
const dnnl_memory_desc_t *md);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
1615
include/dnnl_types.h
Normal file
1615
include/dnnl_types.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -14,22 +14,22 @@
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
#ifndef MKLDNN_VERSION_H
|
||||
#define MKLDNN_VERSION_H
|
||||
#ifndef DNNL_VERSION_H
|
||||
#define DNNL_VERSION_H
|
||||
|
||||
// clang-format off
|
||||
|
||||
/// Major version
|
||||
#define MKLDNN_VERSION_MAJOR @MKLDNN_VERSION_MAJOR@
|
||||
#define DNNL_VERSION_MAJOR @DNNL_VERSION_MAJOR@
|
||||
|
||||
/// Minor version
|
||||
#define MKLDNN_VERSION_MINOR @MKLDNN_VERSION_MINOR@
|
||||
#define DNNL_VERSION_MINOR @DNNL_VERSION_MINOR@
|
||||
|
||||
/// Patch version
|
||||
#define MKLDNN_VERSION_PATCH @MKLDNN_VERSION_PATCH@
|
||||
#define DNNL_VERSION_PATCH @DNNL_VERSION_PATCH@
|
||||
|
||||
/// Git commit hash
|
||||
#define MKLDNN_VERSION_HASH "@MKLDNN_VERSION_HASH@"
|
||||
#define DNNL_VERSION_HASH "@DNNL_VERSION_HASH@"
|
||||
|
||||
// clang-format on
|
||||
|
2065
include/mkldnn.h
2065
include/mkldnn.h
File diff suppressed because it is too large
Load Diff
5173
include/mkldnn.hpp
5173
include/mkldnn.hpp
File diff suppressed because it is too large
Load Diff
26
include/mkldnn_config.h
Normal file
26
include/mkldnn_config.h
Normal file
@ -0,0 +1,26 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2019 Intel Corporation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
// Header file ensures the backwards compatibility with previous namings.
|
||||
|
||||
#ifndef MKLDNN_CONFIG_H
|
||||
#define MKLDNN_CONFIG_H
|
||||
|
||||
#include "mkldnn_dnnl_mangling.h"
|
||||
|
||||
#include "dnnl_config.h"
|
||||
|
||||
#endif /* MKLDNN_CONFIG_H */
|
@ -1,90 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2019 Intel Corporation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
#ifndef MKLDNN_CONFIG_H
|
||||
#define MKLDNN_CONFIG_H
|
||||
|
||||
/// @cond DO_NOT_DOCUMENT_THIS
|
||||
|
||||
// All symbols shall be internal unless marked as MKLDNN_API
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#define MKLDNN_HELPER_DLL_IMPORT __declspec(dllimport)
|
||||
#define MKLDNN_HELPER_DLL_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#if __GNUC__ >= 4
|
||||
#define MKLDNN_HELPER_DLL_IMPORT __attribute__((visibility("default")))
|
||||
#define MKLDNN_HELPER_DLL_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define MKLDNN_HELPER_DLL_IMPORT
|
||||
#define MKLDNN_HELPER_DLL_EXPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MKLDNN_DLL
|
||||
#ifdef MKLDNN_DLL_EXPORTS
|
||||
#define MKLDNN_API MKLDNN_HELPER_DLL_EXPORT
|
||||
#else
|
||||
#define MKLDNN_API MKLDNN_HELPER_DLL_IMPORT
|
||||
#endif
|
||||
#else
|
||||
#define MKLDNN_API
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define MKLDNN_DEPRECATED __attribute__((deprecated))
|
||||
#elif defined(_MSC_VER)
|
||||
#define MKLDNN_DEPRECATED __declspec(deprecated)
|
||||
#else
|
||||
#define MKLDNN_DEPRECATED
|
||||
#endif
|
||||
|
||||
/// @endcond
|
||||
|
||||
// No runtime (disabled)
|
||||
#define MKLDNN_RUNTIME_NONE 0u
|
||||
// Sequential runtime (CPU only)
|
||||
#define MKLDNN_RUNTIME_SEQ 1u
|
||||
// OpenMP runtime (CPU only)
|
||||
#define MKLDNN_RUNTIME_OMP 2u
|
||||
// TBB runtime (CPU only)
|
||||
#define MKLDNN_RUNTIME_TBB 4u
|
||||
// OpenCL runtime
|
||||
#define MKLDNN_RUNTIME_OCL 256u
|
||||
|
||||
// clang-format off
|
||||
|
||||
// MKL-DNN CPU engine runtime
|
||||
#cmakedefine MKLDNN_CPU_RUNTIME MKLDNN_RUNTIME_${MKLDNN_CPU_RUNTIME_CURRENT}
|
||||
|
||||
// MKL-DNN GPU engine runtime
|
||||
#cmakedefine MKLDNN_GPU_RUNTIME MKLDNN_RUNTIME_${MKLDNN_GPU_RUNTIME}
|
||||
|
||||
// clang-format on
|
||||
|
||||
#if defined(MKLDNN_CPU_RUNTIME) && defined(MKLDNN_GPU_RUNTIME)
|
||||
#if (MKLDNN_CPU_RUNTIME == MKLDNN_RUNTIME_NONE) \
|
||||
|| (MKLDNN_CPU_RUNTIME == MKLDNN_RUNTIME_OCL)
|
||||
#error "Unexpected MKLDNN_CPU_RUNTIME"
|
||||
#endif
|
||||
#if (MKLDNN_GPU_RUNTIME != MKLDNN_RUNTIME_NONE) \
|
||||
&& (MKLDNN_GPU_RUNTIME != MKLDNN_RUNTIME_OCL)
|
||||
#error "Unexpected MKLDNN_GPU_RUNTIME"
|
||||
#endif
|
||||
#else
|
||||
#error "BOTH MKLDNN_CPU_RUNTIME and MKLDNN_GPU_RUNTIME must be defined"
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2018-2019 Intel Corporation
|
||||
* Copyright 2019 Intel Corporation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -14,58 +14,13 @@
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
// DO NOT EDIT, AUTO-GENERATED
|
||||
|
||||
// clang-format off
|
||||
// Header file ensures the backwards compatibility with previous namings.
|
||||
|
||||
#ifndef MKLDNN_DEBUG_H
|
||||
#define MKLDNN_DEBUG_H
|
||||
|
||||
/// @file
|
||||
/// Debug capabilities
|
||||
#include "mkldnn_dnnl_mangling.h"
|
||||
|
||||
#include "mkldnn_config.h"
|
||||
#include "mkldnn_types.h"
|
||||
#include "dnnl_debug.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
const char MKLDNN_API *mkldnn_status2str(mkldnn_status_t v);
|
||||
const char MKLDNN_API *mkldnn_dt2str(mkldnn_data_type_t v);
|
||||
const char MKLDNN_API *mkldnn_fmt_kind2str(mkldnn_format_kind_t v);
|
||||
const char MKLDNN_API *mkldnn_fmt_tag2str(mkldnn_format_tag_t v);
|
||||
const char MKLDNN_API *mkldnn_prop_kind2str(mkldnn_prop_kind_t v);
|
||||
const char MKLDNN_API *mkldnn_prim_kind2str(mkldnn_primitive_kind_t v);
|
||||
const char MKLDNN_API *mkldnn_alg_kind2str(mkldnn_alg_kind_t v);
|
||||
const char MKLDNN_API *mkldnn_normalization_flags2str(mkldnn_normalization_flags_t v);
|
||||
const char MKLDNN_API *mkldnn_rnn_flags2str(mkldnn_rnn_flags_t v);
|
||||
const char MKLDNN_API *mkldnn_rnn_direction2str(mkldnn_rnn_direction_t v);
|
||||
const char MKLDNN_API *mkldnn_engine_kind2str(mkldnn_engine_kind_t v);
|
||||
const char MKLDNN_API *mkldnn_scratchpad_mode2str(mkldnn_scratchpad_mode_t v);
|
||||
|
||||
/// Forms a format string for a given memory descriptor.
|
||||
///
|
||||
/// The format is defined as: 'dt:[p|o|0]:fmt_kind:fmt:extra'.
|
||||
/// Here:
|
||||
/// - dt -- data type
|
||||
/// - p -- indicates there is non-trivial padding
|
||||
/// - o -- indicates there is non-trivial padding offset
|
||||
/// - 0 -- indicates there is non-trivial offset0
|
||||
/// - fmt_kind -- format kind (blocked, wino, etc...)
|
||||
/// - fmt -- extended format string (format_kind specific)
|
||||
/// - extra -- shows extra fields (underspecified)
|
||||
int MKLDNN_API mkldnn_md2fmt_str(char *fmt_str, size_t fmt_str_len,
|
||||
const mkldnn_memory_desc_t *md);
|
||||
|
||||
/// Forms a dimension string for a given memory descriptor.
|
||||
///
|
||||
/// The format is defined as: 'dim0xdim1x...xdimN
|
||||
int MKLDNN_API mkldnn_md2dim_str(char *dim_str, size_t dim_str_len,
|
||||
const mkldnn_memory_desc_t *md);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* MKLDNN_DEBUG_H */
|
||||
|
734
include/mkldnn_dnnl_mangling.h
Normal file
734
include/mkldnn_dnnl_mangling.h
Normal file
@ -0,0 +1,734 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2019 Intel Corporation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
// Mangle mkldnn entities to dnnl ones to preserve source-code level backwards
|
||||
// compatibility. The compatibility will be dropped at DNNL 2.0.
|
||||
// Please switch to the new names as soon as possible.
|
||||
|
||||
#ifndef MKLDNN_DNNL_MANGLING_H
|
||||
#define MKLDNN_DNNL_MANGLING_H
|
||||
|
||||
#define MKLDNN_API DNNL_API
|
||||
#define MKLDNN_ARG_BIAS DNNL_ARG_BIAS
|
||||
#define MKLDNN_ARG_DIFF_BIAS DNNL_ARG_DIFF_BIAS
|
||||
#define MKLDNN_ARG_DIFF_DST DNNL_ARG_DIFF_DST
|
||||
#define MKLDNN_ARG_DIFF_DST_0 DNNL_ARG_DIFF_DST_0
|
||||
#define MKLDNN_ARG_DIFF_DST_1 DNNL_ARG_DIFF_DST_1
|
||||
#define MKLDNN_ARG_DIFF_DST_2 DNNL_ARG_DIFF_DST_2
|
||||
#define MKLDNN_ARG_DIFF_DST_ITER DNNL_ARG_DIFF_DST_ITER
|
||||
#define MKLDNN_ARG_DIFF_DST_ITER_C DNNL_ARG_DIFF_DST_ITER_C
|
||||
#define MKLDNN_ARG_DIFF_DST_LAYER DNNL_ARG_DIFF_DST_LAYER
|
||||
#define MKLDNN_ARG_DIFF_SCALE_SHIFT DNNL_ARG_DIFF_SCALE_SHIFT
|
||||
#define MKLDNN_ARG_DIFF_SRC DNNL_ARG_DIFF_SRC
|
||||
#define MKLDNN_ARG_DIFF_SRC_0 DNNL_ARG_DIFF_SRC_0
|
||||
#define MKLDNN_ARG_DIFF_SRC_1 DNNL_ARG_DIFF_SRC_1
|
||||
#define MKLDNN_ARG_DIFF_SRC_2 DNNL_ARG_DIFF_SRC_2
|
||||
#define MKLDNN_ARG_DIFF_SRC_ITER DNNL_ARG_DIFF_SRC_ITER
|
||||
#define MKLDNN_ARG_DIFF_SRC_ITER_C DNNL_ARG_DIFF_SRC_ITER_C
|
||||
#define MKLDNN_ARG_DIFF_SRC_LAYER DNNL_ARG_DIFF_SRC_LAYER
|
||||
#define MKLDNN_ARG_DIFF_WEIGHTS DNNL_ARG_DIFF_WEIGHTS
|
||||
#define MKLDNN_ARG_DIFF_WEIGHTS_0 DNNL_ARG_DIFF_WEIGHTS_0
|
||||
#define MKLDNN_ARG_DIFF_WEIGHTS_1 DNNL_ARG_DIFF_WEIGHTS_1
|
||||
#define MKLDNN_ARG_DIFF_WEIGHTS_ITER DNNL_ARG_DIFF_WEIGHTS_ITER
|
||||
#define MKLDNN_ARG_DIFF_WEIGHTS_LAYER DNNL_ARG_DIFF_WEIGHTS_LAYER
|
||||
#define MKLDNN_ARG_DST DNNL_ARG_DST
|
||||
#define MKLDNN_ARG_DST_0 DNNL_ARG_DST_0
|
||||
#define MKLDNN_ARG_DST_1 DNNL_ARG_DST_1
|
||||
#define MKLDNN_ARG_DST_2 DNNL_ARG_DST_2
|
||||
#define MKLDNN_ARG_DST_ITER DNNL_ARG_DST_ITER
|
||||
#define MKLDNN_ARG_DST_ITER_C DNNL_ARG_DST_ITER_C
|
||||
#define MKLDNN_ARG_DST_LAYER DNNL_ARG_DST_LAYER
|
||||
#define MKLDNN_ARG_FROM DNNL_ARG_FROM
|
||||
#define MKLDNN_ARG_MEAN DNNL_ARG_MEAN
|
||||
#define MKLDNN_ARG_MULTIPLE_DST DNNL_ARG_MULTIPLE_DST
|
||||
#define MKLDNN_ARG_MULTIPLE_SRC DNNL_ARG_MULTIPLE_SRC
|
||||
#define MKLDNN_ARG_SCALE_SHIFT DNNL_ARG_SCALE_SHIFT
|
||||
#define MKLDNN_ARG_SCRATCHPAD DNNL_ARG_SCRATCHPAD
|
||||
#define MKLDNN_ARG_SRC DNNL_ARG_SRC
|
||||
#define MKLDNN_ARG_SRC_0 DNNL_ARG_SRC_0
|
||||
#define MKLDNN_ARG_SRC_1 DNNL_ARG_SRC_1
|
||||
#define MKLDNN_ARG_SRC_2 DNNL_ARG_SRC_2
|
||||
#define MKLDNN_ARG_SRC_ITER DNNL_ARG_SRC_ITER
|
||||
#define MKLDNN_ARG_SRC_ITER_C DNNL_ARG_SRC_ITER_C
|
||||
#define MKLDNN_ARG_SRC_LAYER DNNL_ARG_SRC_LAYER
|
||||
#define MKLDNN_ARG_TO DNNL_ARG_TO
|
||||
#define MKLDNN_ARG_VARIANCE DNNL_ARG_VARIANCE
|
||||
#define MKLDNN_ARG_WEIGHTS DNNL_ARG_WEIGHTS
|
||||
#define MKLDNN_ARG_WEIGHTS_0 DNNL_ARG_WEIGHTS_0
|
||||
#define MKLDNN_ARG_WEIGHTS_1 DNNL_ARG_WEIGHTS_1
|
||||
#define MKLDNN_ARG_WEIGHTS_ITER DNNL_ARG_WEIGHTS_ITER
|
||||
#define MKLDNN_ARG_WEIGHTS_LAYER DNNL_ARG_WEIGHTS_LAYER
|
||||
#define MKLDNN_ARG_WORKSPACE DNNL_ARG_WORKSPACE
|
||||
#define MKLDNN_CPU_RUNTIME DNNL_CPU_RUNTIME
|
||||
#define MKLDNN_DEFINE_BITMASK_OPS DNNL_DEFINE_BITMASK_OPS
|
||||
#define MKLDNN_GPU_RUNTIME DNNL_GPU_RUNTIME
|
||||
#define MKLDNN_JIT_DUMP DNNL_JIT_DUMP
|
||||
#define MKLDNN_MAX_NDIMS DNNL_MAX_NDIMS
|
||||
#define MKLDNN_MEMORY_ALLOCATE DNNL_MEMORY_ALLOCATE
|
||||
#define MKLDNN_MEMORY_NONE DNNL_MEMORY_NONE
|
||||
#define MKLDNN_RNN_MAX_N_PARTS DNNL_RNN_MAX_N_PARTS
|
||||
#define MKLDNN_RUNTIME_NONE DNNL_RUNTIME_NONE
|
||||
#define MKLDNN_RUNTIME_OCL DNNL_RUNTIME_OCL
|
||||
#define MKLDNN_RUNTIME_OMP DNNL_RUNTIME_OMP
|
||||
#define MKLDNN_RUNTIME_SEQ DNNL_RUNTIME_SEQ
|
||||
#define MKLDNN_RUNTIME_TBB DNNL_RUNTIME_TBB
|
||||
#define MKLDNN_VERBOSE DNNL_VERBOSE
|
||||
#define MKLDNN_VERSION_HASH DNNL_VERSION_HASH
|
||||
#define MKLDNN_VERSION_MAJOR DNNL_VERSION_MAJOR
|
||||
#define MKLDNN_VERSION_MINOR DNNL_VERSION_MINOR
|
||||
#define MKLDNN_VERSION_PATCH DNNL_VERSION_PATCH
|
||||
#define const_mkldnn_engine_t const_dnnl_engine_t
|
||||
#define const_mkldnn_memory_t const_dnnl_memory_t
|
||||
#define const_mkldnn_op_desc_t const_dnnl_op_desc_t
|
||||
#define const_mkldnn_post_ops_t const_dnnl_post_ops_t
|
||||
#define const_mkldnn_primitive_attr_t const_dnnl_primitive_attr_t
|
||||
#define const_mkldnn_primitive_desc_iterator_t \
|
||||
const_dnnl_primitive_desc_iterator_t
|
||||
#define const_mkldnn_primitive_desc_t const_dnnl_primitive_desc_t
|
||||
#define const_mkldnn_primitive_t const_dnnl_primitive_t
|
||||
#define const_mkldnn_stream_t const_dnnl_stream_t
|
||||
#define mkldnn dnnl
|
||||
#define mkldnn_ dnnl_
|
||||
#define mkldnn_ABc16a16b dnnl_ABc16a16b
|
||||
#define mkldnn_ABc16b16a dnnl_ABc16b16a
|
||||
#define mkldnn_ABc4b16a4b dnnl_ABc4b16a4b
|
||||
#define mkldnn_ABc4b4a dnnl_ABc4b4a
|
||||
#define mkldnn_ABc8a16b2a dnnl_ABc8a16b2a
|
||||
#define mkldnn_ABc8a8b dnnl_ABc8a8b
|
||||
#define mkldnn_ABc8b16a2b dnnl_ABc8b16a2b
|
||||
#define mkldnn_ABc8b8a dnnl_ABc8b8a
|
||||
#define mkldnn_ABcd16a16b dnnl_ABcd16a16b
|
||||
#define mkldnn_ABcd16b16a dnnl_ABcd16b16a
|
||||
#define mkldnn_ABcd2a8b8a2b dnnl_ABcd2a8b8a2b
|
||||
#define mkldnn_ABcd32a32b dnnl_ABcd32a32b
|
||||
#define mkldnn_ABcd4a8b8a4b dnnl_ABcd4a8b8a4b
|
||||
#define mkldnn_ABcd4b16a4b dnnl_ABcd4b16a4b
|
||||
#define mkldnn_ABcd4b4a dnnl_ABcd4b4a
|
||||
#define mkldnn_ABcd8a16b2a dnnl_ABcd8a16b2a
|
||||
#define mkldnn_ABcd8a8b dnnl_ABcd8a8b
|
||||
#define mkldnn_ABcd8b16a2b dnnl_ABcd8b16a2b
|
||||
#define mkldnn_ABcd8b8a dnnl_ABcd8b8a
|
||||
#define mkldnn_ABcde16a16b dnnl_ABcde16a16b
|
||||
#define mkldnn_ABcde16b16a dnnl_ABcde16b16a
|
||||
#define mkldnn_ABcde4b4a dnnl_ABcde4b4a
|
||||
#define mkldnn_ABcde8a16b2a dnnl_ABcde8a16b2a
|
||||
#define mkldnn_ABcde8a8b dnnl_ABcde8a8b
|
||||
#define mkldnn_ABcde8b16a2b dnnl_ABcde8b16a2b
|
||||
#define mkldnn_ABcde8b8a dnnl_ABcde8b8a
|
||||
#define mkldnn_Abc16a dnnl_Abc16a
|
||||
#define mkldnn_Abc4a dnnl_Abc4a
|
||||
#define mkldnn_Abcd16a dnnl_Abcd16a
|
||||
#define mkldnn_Abcd4a dnnl_Abcd4a
|
||||
#define mkldnn_Abcde16a dnnl_Abcde16a
|
||||
#define mkldnn_Abcde4a dnnl_Abcde4a
|
||||
#define mkldnn_Abcde8a dnnl_Abcde8a
|
||||
#define mkldnn_Abcdef16a dnnl_Abcdef16a
|
||||
#define mkldnn_Acb16a dnnl_Acb16a
|
||||
#define mkldnn_Acb4a dnnl_Acb4a
|
||||
#define mkldnn_Acb8a dnnl_Acb8a
|
||||
#define mkldnn_Acdb16a dnnl_Acdb16a
|
||||
#define mkldnn_Acdb32a dnnl_Acdb32a
|
||||
#define mkldnn_Acdb4a dnnl_Acdb4a
|
||||
#define mkldnn_Acdb8a dnnl_Acdb8a
|
||||
#define mkldnn_Acdeb16a dnnl_Acdeb16a
|
||||
#define mkldnn_Acdeb4a dnnl_Acdeb4a
|
||||
#define mkldnn_Acdeb8a dnnl_Acdeb8a
|
||||
#define mkldnn_BAc16a16b dnnl_BAc16a16b
|
||||
#define mkldnn_BAc16b16a dnnl_BAc16b16a
|
||||
#define mkldnn_BAc8a16b2a dnnl_BAc8a16b2a
|
||||
#define mkldnn_BAcd16a16b dnnl_BAcd16a16b
|
||||
#define mkldnn_BAcd16b16a dnnl_BAcd16b16a
|
||||
#define mkldnn_BAcd8a16b2a dnnl_BAcd8a16b2a
|
||||
#define mkldnn_BAcde16b16a dnnl_BAcde16b16a
|
||||
#define mkldnn_BAcde8a16b2a dnnl_BAcde8a16b2a
|
||||
#define mkldnn_Goidhw16g dnnl_Goidhw16g
|
||||
#define mkldnn_Goihw16g dnnl_Goihw16g
|
||||
#define mkldnn_Goihw8g dnnl_Goihw8g
|
||||
#define mkldnn_Goiw16g dnnl_Goiw16g
|
||||
#define mkldnn_IOdhw16i16o dnnl_IOdhw16i16o
|
||||
#define mkldnn_IOdhw8o16i2o dnnl_IOdhw8o16i2o
|
||||
#define mkldnn_IOhw16i16o dnnl_IOhw16i16o
|
||||
#define mkldnn_IOhw16o16i dnnl_IOhw16o16i
|
||||
#define mkldnn_IOhw8o16i2o dnnl_IOhw8o16i2o
|
||||
#define mkldnn_IOw16i16o dnnl_IOw16i16o
|
||||
#define mkldnn_IOw16o16i dnnl_IOw16o16i
|
||||
#define mkldnn_IOw8o16i2o dnnl_IOw8o16i2o
|
||||
#define mkldnn_NCdhw16n16c dnnl_NCdhw16n16c
|
||||
#define mkldnn_NChw16n16c dnnl_NChw16n16c
|
||||
#define mkldnn_NChw32n32c dnnl_NChw32n32c
|
||||
#define mkldnn_NCw16n16c dnnl_NCw16n16c
|
||||
#define mkldnn_OIdhw16i16o dnnl_OIdhw16i16o
|
||||
#define mkldnn_OIdhw16o16i dnnl_OIdhw16o16i
|
||||
#define mkldnn_OIdhw4i4o dnnl_OIdhw4i4o
|
||||
#define mkldnn_OIdhw8i16o2i dnnl_OIdhw8i16o2i
|
||||
#define mkldnn_OIdhw8i8o dnnl_OIdhw8i8o
|
||||
#define mkldnn_OIdhw8o16i2o dnnl_OIdhw8o16i2o
|
||||
#define mkldnn_OIdhw8o8i dnnl_OIdhw8o8i
|
||||
#define mkldnn_OIhw16i16o dnnl_OIhw16i16o
|
||||
#define mkldnn_OIhw16o16i dnnl_OIhw16o16i
|
||||
#define mkldnn_OIhw2o8i8o2i dnnl_OIhw2o8i8o2i
|
||||
#define mkldnn_OIhw4i16o4i dnnl_OIhw4i16o4i
|
||||
#define mkldnn_OIhw4i4o dnnl_OIhw4i4o
|
||||
#define mkldnn_OIhw4o8i8o4i dnnl_OIhw4o8i8o4i
|
||||
#define mkldnn_OIhw8i16o2i dnnl_OIhw8i16o2i
|
||||
#define mkldnn_OIhw8i8o dnnl_OIhw8i8o
|
||||
#define mkldnn_OIhw8o16i2o dnnl_OIhw8o16i2o
|
||||
#define mkldnn_OIhw8o8i dnnl_OIhw8o8i
|
||||
#define mkldnn_OIw16i16o dnnl_OIw16i16o
|
||||
#define mkldnn_OIw16o16i dnnl_OIw16o16i
|
||||
#define mkldnn_OIw4i16o4i dnnl_OIw4i16o4i
|
||||
#define mkldnn_OIw4i4o dnnl_OIw4i4o
|
||||
#define mkldnn_OIw8i16o2i dnnl_OIw8i16o2i
|
||||
#define mkldnn_OIw8i8o dnnl_OIw8i8o
|
||||
#define mkldnn_OIw8o16i2o dnnl_OIw8o16i2o
|
||||
#define mkldnn_OIw8o8i dnnl_OIw8o8i
|
||||
#define mkldnn_Odhwi16o dnnl_Odhwi16o
|
||||
#define mkldnn_Odhwi4o dnnl_Odhwi4o
|
||||
#define mkldnn_Odhwi8o dnnl_Odhwi8o
|
||||
#define mkldnn_Ohwi16o dnnl_Ohwi16o
|
||||
#define mkldnn_Ohwi32o dnnl_Ohwi32o
|
||||
#define mkldnn_Ohwi4o dnnl_Ohwi4o
|
||||
#define mkldnn_Ohwi8o dnnl_Ohwi8o
|
||||
#define mkldnn_Oidhw16o dnnl_Oidhw16o
|
||||
#define mkldnn_Oidhw4o dnnl_Oidhw4o
|
||||
#define mkldnn_Oihw16o dnnl_Oihw16o
|
||||
#define mkldnn_Oihw4o dnnl_Oihw4o
|
||||
#define mkldnn_Oiw16o dnnl_Oiw16o
|
||||
#define mkldnn_Oiw4o dnnl_Oiw4o
|
||||
#define mkldnn_Owi16o dnnl_Owi16o
|
||||
#define mkldnn_Owi4o dnnl_Owi4o
|
||||
#define mkldnn_Owi8o dnnl_Owi8o
|
||||
#define mkldnn_a dnnl_a
|
||||
#define mkldnn_aBCd16b16c dnnl_aBCd16b16c
|
||||
#define mkldnn_aBCd16c16b dnnl_aBCd16c16b
|
||||
#define mkldnn_aBCd4c16b4c dnnl_aBCd4c16b4c
|
||||
#define mkldnn_aBCd4c4b dnnl_aBCd4c4b
|
||||
#define mkldnn_aBCd8b16c2b dnnl_aBCd8b16c2b
|
||||
#define mkldnn_aBCd8b8c dnnl_aBCd8b8c
|
||||
#define mkldnn_aBCd8c16b2c dnnl_aBCd8c16b2c
|
||||
#define mkldnn_aBCd8c8b dnnl_aBCd8c8b
|
||||
#define mkldnn_aBCde16b16c dnnl_aBCde16b16c
|
||||
#define mkldnn_aBCde16c16b dnnl_aBCde16c16b
|
||||
#define mkldnn_aBCde2b8c8b2c dnnl_aBCde2b8c8b2c
|
||||
#define mkldnn_aBCde2c8b4c dnnl_aBCde2c8b4c
|
||||
#define mkldnn_aBCde4b4c dnnl_aBCde4b4c
|
||||
#define mkldnn_aBCde4b8c8b4c dnnl_aBCde4b8c8b4c
|
||||
#define mkldnn_aBCde4c16b4c dnnl_aBCde4c16b4c
|
||||
#define mkldnn_aBCde4c4b dnnl_aBCde4c4b
|
||||
#define mkldnn_aBCde8b16c2b dnnl_aBCde8b16c2b
|
||||
#define mkldnn_aBCde8b8c dnnl_aBCde8b8c
|
||||
#define mkldnn_aBCde8c16b2c dnnl_aBCde8c16b2c
|
||||
#define mkldnn_aBCde8c8b dnnl_aBCde8c8b
|
||||
#define mkldnn_aBCdef16b16c dnnl_aBCdef16b16c
|
||||
#define mkldnn_aBCdef16c16b dnnl_aBCdef16c16b
|
||||
#define mkldnn_aBCdef4c4b dnnl_aBCdef4c4b
|
||||
#define mkldnn_aBCdef8b16c2b dnnl_aBCdef8b16c2b
|
||||
#define mkldnn_aBCdef8b8c dnnl_aBCdef8b8c
|
||||
#define mkldnn_aBCdef8c16b2c dnnl_aBCdef8c16b2c
|
||||
#define mkldnn_aBCdef8c8b dnnl_aBCdef8c8b
|
||||
#define mkldnn_aBc16b dnnl_aBc16b
|
||||
#define mkldnn_aBc4b dnnl_aBc4b
|
||||
#define mkldnn_aBc8b dnnl_aBc8b
|
||||
#define mkldnn_aBcd16b dnnl_aBcd16b
|
||||
#define mkldnn_aBcd4b dnnl_aBcd4b
|
||||
#define mkldnn_aBcd8b dnnl_aBcd8b
|
||||
#define mkldnn_aBcde16b dnnl_aBcde16b
|
||||
#define mkldnn_aBcde4b dnnl_aBcde4b
|
||||
#define mkldnn_aBcde8b dnnl_aBcde8b
|
||||
#define mkldnn_aBcdef16b dnnl_aBcdef16b
|
||||
#define mkldnn_aBcdef4b dnnl_aBcdef4b
|
||||
#define mkldnn_aBdc16b dnnl_aBdc16b
|
||||
#define mkldnn_aBdc4b dnnl_aBdc4b
|
||||
#define mkldnn_aBdc8b dnnl_aBdc8b
|
||||
#define mkldnn_aBdec16b dnnl_aBdec16b
|
||||
#define mkldnn_aBdec32b dnnl_aBdec32b
|
||||
#define mkldnn_aBdec4b dnnl_aBdec4b
|
||||
#define mkldnn_aBdec8b dnnl_aBdec8b
|
||||
#define mkldnn_aBdefc16b dnnl_aBdefc16b
|
||||
#define mkldnn_aBdefc4b dnnl_aBdefc4b
|
||||
#define mkldnn_aBdefc8b dnnl_aBdefc8b
|
||||
#define mkldnn_aCBd16b16c dnnl_aCBd16b16c
|
||||
#define mkldnn_aCBd16c16b dnnl_aCBd16c16b
|
||||
#define mkldnn_aCBd8b16c2b dnnl_aCBd8b16c2b
|
||||
#define mkldnn_aCBde16b16c dnnl_aCBde16b16c
|
||||
#define mkldnn_aCBde16c16b dnnl_aCBde16c16b
|
||||
#define mkldnn_aCBde8b16c2b dnnl_aCBde8b16c2b
|
||||
#define mkldnn_aCBdef16c16b dnnl_aCBdef16c16b
|
||||
#define mkldnn_aCBdef8b16c2b dnnl_aCBdef8b16c2b
|
||||
#define mkldnn_ab dnnl_ab
|
||||
#define mkldnn_abc dnnl_abc
|
||||
#define mkldnn_abcd dnnl_abcd
|
||||
#define mkldnn_abcde dnnl_abcde
|
||||
#define mkldnn_abcdef dnnl_abcdef
|
||||
#define mkldnn_abdec dnnl_abdec
|
||||
#define mkldnn_acb dnnl_acb
|
||||
#define mkldnn_acbde dnnl_acbde
|
||||
#define mkldnn_acdb dnnl_acdb
|
||||
#define mkldnn_acdeb dnnl_acdeb
|
||||
#define mkldnn_alg_kind2str dnnl_alg_kind2str
|
||||
#define mkldnn_alg_kind_t dnnl_alg_kind_t
|
||||
#define mkldnn_alg_kind_undef dnnl_alg_kind_undef
|
||||
#define mkldnn_any_engine dnnl_any_engine
|
||||
#define mkldnn_ba dnnl_ba
|
||||
#define mkldnn_bac dnnl_bac
|
||||
#define mkldnn_bacd dnnl_bacd
|
||||
#define mkldnn_backward dnnl_backward
|
||||
#define mkldnn_backward_bias dnnl_backward_bias
|
||||
#define mkldnn_backward_data dnnl_backward_data
|
||||
#define mkldnn_backward_weights dnnl_backward_weights
|
||||
#define mkldnn_batch_normalization dnnl_batch_normalization
|
||||
#define mkldnn_batch_normalization_backward_desc_init \
|
||||
dnnl_batch_normalization_backward_desc_init
|
||||
#define mkldnn_batch_normalization_desc_t dnnl_batch_normalization_desc_t
|
||||
#define mkldnn_batch_normalization_forward_desc_init \
|
||||
dnnl_batch_normalization_forward_desc_init
|
||||
#define mkldnn_bca dnnl_bca
|
||||
#define mkldnn_bcda dnnl_bcda
|
||||
#define mkldnn_bcdea dnnl_bcdea
|
||||
#define mkldnn_bf16 dnnl_bf16
|
||||
#define mkldnn_bidirectional_concat dnnl_bidirectional_concat
|
||||
#define mkldnn_bidirectional_sum dnnl_bidirectional_sum
|
||||
#define mkldnn_blocked dnnl_blocked
|
||||
#define mkldnn_blocking_desc_t dnnl_blocking_desc_t
|
||||
#define mkldnn_cba dnnl_cba
|
||||
#define mkldnn_cdba dnnl_cdba
|
||||
#define mkldnn_cdeba dnnl_cdeba
|
||||
#define mkldnn_chwn dnnl_chwn
|
||||
#define mkldnn_cn dnnl_cn
|
||||
#define mkldnn_concat dnnl_concat
|
||||
#define mkldnn_concat_primitive_desc_create dnnl_concat_primitive_desc_create
|
||||
#define mkldnn_config dnnl_config
|
||||
#define mkldnn_convolution dnnl_convolution
|
||||
#define mkldnn_convolution_auto dnnl_convolution_auto
|
||||
#define mkldnn_convolution_backward_data_desc_init \
|
||||
dnnl_convolution_backward_data_desc_init
|
||||
#define mkldnn_convolution_backward_weights_desc_init \
|
||||
dnnl_convolution_backward_weights_desc_init
|
||||
#define mkldnn_convolution_desc_t dnnl_convolution_desc_t
|
||||
#define mkldnn_convolution_direct dnnl_convolution_direct
|
||||
#define mkldnn_convolution_forward_desc_init dnnl_convolution_forward_desc_init
|
||||
#define mkldnn_convolution_winograd dnnl_convolution_winograd
|
||||
#define mkldnn_cpu dnnl_cpu
|
||||
#define mkldnn_data_type_t dnnl_data_type_t
|
||||
#define mkldnn_data_type_undef dnnl_data_type_undef
|
||||
#define mkldnn_decab dnnl_decab
|
||||
#define mkldnn_deconvolution dnnl_deconvolution
|
||||
#define mkldnn_deconvolution_backward_data_desc_init \
|
||||
dnnl_deconvolution_backward_data_desc_init
|
||||
#define mkldnn_deconvolution_backward_weights_desc_init \
|
||||
dnnl_deconvolution_backward_weights_desc_init
|
||||
#define mkldnn_deconvolution_desc_t dnnl_deconvolution_desc_t
|
||||
#define mkldnn_deconvolution_direct dnnl_deconvolution_direct
|
||||
#define mkldnn_deconvolution_forward_desc_init \
|
||||
dnnl_deconvolution_forward_desc_init
|
||||
#define mkldnn_deconvolution_winograd dnnl_deconvolution_winograd
|
||||
#define mkldnn_dhwio dnnl_dhwio
|
||||
#define mkldnn_dilated_convolution_backward_data_desc_init \
|
||||
dnnl_dilated_convolution_backward_data_desc_init
|
||||
#define mkldnn_dilated_convolution_backward_weights_desc_init \
|
||||
dnnl_dilated_convolution_backward_weights_desc_init
|
||||
#define mkldnn_dilated_convolution_forward_desc_init \
|
||||
dnnl_dilated_convolution_forward_desc_init
|
||||
#define mkldnn_dilated_deconvolution_backward_data_desc_init \
|
||||
dnnl_dilated_deconvolution_backward_data_desc_init
|
||||
#define mkldnn_dilated_deconvolution_backward_weights_desc_init \
|
||||
dnnl_dilated_deconvolution_backward_weights_desc_init
|
||||
#define mkldnn_dilated_deconvolution_forward_desc_init \
|
||||
dnnl_dilated_deconvolution_forward_desc_init
|
||||
#define mkldnn_dim_t dnnl_dim_t
|
||||
#define mkldnn_dims_t dnnl_dims_t
|
||||
#define mkldnn_dt2str dnnl_dt2str
|
||||
#define mkldnn_eltwise dnnl_eltwise
|
||||
#define mkldnn_eltwise_abs dnnl_eltwise_abs
|
||||
#define mkldnn_eltwise_backward_desc_init dnnl_eltwise_backward_desc_init
|
||||
#define mkldnn_eltwise_bounded_relu dnnl_eltwise_bounded_relu
|
||||
#define mkldnn_eltwise_desc_t dnnl_eltwise_desc_t
|
||||
#define mkldnn_eltwise_elu dnnl_eltwise_elu
|
||||
#define mkldnn_eltwise_exp dnnl_eltwise_exp
|
||||
#define mkldnn_eltwise_forward_desc_init dnnl_eltwise_forward_desc_init
|
||||
#define mkldnn_eltwise_gelu dnnl_eltwise_gelu
|
||||
#define mkldnn_eltwise_linear dnnl_eltwise_linear
|
||||
#define mkldnn_eltwise_logistic dnnl_eltwise_logistic
|
||||
#define mkldnn_eltwise_relu dnnl_eltwise_relu
|
||||
#define mkldnn_eltwise_soft_relu dnnl_eltwise_soft_relu
|
||||
#define mkldnn_eltwise_sqrt dnnl_eltwise_sqrt
|
||||
#define mkldnn_eltwise_square dnnl_eltwise_square
|
||||
#define mkldnn_eltwise_swish dnnl_eltwise_swish
|
||||
#define mkldnn_eltwise_tanh dnnl_eltwise_tanh
|
||||
#define mkldnn_engine dnnl_engine
|
||||
#define mkldnn_engine_create dnnl_engine_create
|
||||
#define mkldnn_engine_create_ocl dnnl_engine_create_ocl
|
||||
#define mkldnn_engine_destroy dnnl_engine_destroy
|
||||
#define mkldnn_engine_get_count dnnl_engine_get_count
|
||||
#define mkldnn_engine_get_kind dnnl_engine_get_kind
|
||||
#define mkldnn_engine_get_ocl_context dnnl_engine_get_ocl_context
|
||||
#define mkldnn_engine_get_ocl_device dnnl_engine_get_ocl_device
|
||||
#define mkldnn_engine_kind2str dnnl_engine_kind2str
|
||||
#define mkldnn_engine_kind_t dnnl_engine_kind_t
|
||||
#define mkldnn_engine_t dnnl_engine_t
|
||||
#define mkldnn_exec_arg_t dnnl_exec_arg_t
|
||||
#define mkldnn_f16 dnnl_f16
|
||||
#define mkldnn_f32 dnnl_f32
|
||||
#define mkldnn_fmt_kind2str dnnl_fmt_kind2str
|
||||
#define mkldnn_fmt_tag2str dnnl_fmt_tag2str
|
||||
#define mkldnn_format_kind_any dnnl_format_kind_any
|
||||
#define mkldnn_format_kind_rnn_packed dnnl_format_kind_rnn_packed
|
||||
#define mkldnn_format_kind_t dnnl_format_kind_t
|
||||
#define mkldnn_format_kind_undef dnnl_format_kind_undef
|
||||
#define mkldnn_format_kind_wino dnnl_format_kind_wino
|
||||
#define mkldnn_format_tag_any dnnl_format_tag_any
|
||||
#define mkldnn_format_tag_last dnnl_format_tag_last
|
||||
#define mkldnn_format_tag_t dnnl_format_tag_t
|
||||
#define mkldnn_format_tag_undef dnnl_format_tag_undef
|
||||
#define mkldnn_forward dnnl_forward
|
||||
#define mkldnn_forward_inference dnnl_forward_inference
|
||||
#define mkldnn_forward_scoring dnnl_forward_scoring
|
||||
#define mkldnn_forward_training dnnl_forward_training
|
||||
#define mkldnn_fuse_norm_relu dnnl_fuse_norm_relu
|
||||
#define mkldnn_gIOdhw16i16o dnnl_gIOdhw16i16o
|
||||
#define mkldnn_gIOdhw8o16i2o dnnl_gIOdhw8o16i2o
|
||||
#define mkldnn_gIOhw16i16o dnnl_gIOhw16i16o
|
||||
#define mkldnn_gIOhw16o16i dnnl_gIOhw16o16i
|
||||
#define mkldnn_gIOhw8o16i2o dnnl_gIOhw8o16i2o
|
||||
#define mkldnn_gIOw16i16o dnnl_gIOw16i16o
|
||||
#define mkldnn_gIOw16o16i dnnl_gIOw16o16i
|
||||
#define mkldnn_gIOw8o16i2o dnnl_gIOw8o16i2o
|
||||
#define mkldnn_gOIdhw16i16o dnnl_gOIdhw16i16o
|
||||
#define mkldnn_gOIdhw16o16i dnnl_gOIdhw16o16i
|
||||
#define mkldnn_gOIdhw4i4o dnnl_gOIdhw4i4o
|
||||
#define mkldnn_gOIdhw8i16o2i dnnl_gOIdhw8i16o2i
|
||||
#define mkldnn_gOIdhw8i8o dnnl_gOIdhw8i8o
|
||||
#define mkldnn_gOIdhw8o16i2o dnnl_gOIdhw8o16i2o
|
||||
#define mkldnn_gOIdhw8o8i dnnl_gOIdhw8o8i
|
||||
#define mkldnn_gOIhw16i16o dnnl_gOIhw16i16o
|
||||
#define mkldnn_gOIhw16o16i dnnl_gOIhw16o16i
|
||||
#define mkldnn_gOIhw2i8o4i dnnl_gOIhw2i8o4i
|
||||
#define mkldnn_gOIhw2o8i8o2i dnnl_gOIhw2o8i8o2i
|
||||
#define mkldnn_gOIhw4i16o4i dnnl_gOIhw4i16o4i
|
||||
#define mkldnn_gOIhw4i4o dnnl_gOIhw4i4o
|
||||
#define mkldnn_gOIhw4o4i dnnl_gOIhw4o4i
|
||||
#define mkldnn_gOIhw4o8i8o4i dnnl_gOIhw4o8i8o4i
|
||||
#define mkldnn_gOIhw8i16o2i dnnl_gOIhw8i16o2i
|
||||
#define mkldnn_gOIhw8i8o dnnl_gOIhw8i8o
|
||||
#define mkldnn_gOIhw8o16i2o dnnl_gOIhw8o16i2o
|
||||
#define mkldnn_gOIhw8o8i dnnl_gOIhw8o8i
|
||||
#define mkldnn_gOIw16i16o dnnl_gOIw16i16o
|
||||
#define mkldnn_gOIw16o16i dnnl_gOIw16o16i
|
||||
#define mkldnn_gOIw4i16o4i dnnl_gOIw4i16o4i
|
||||
#define mkldnn_gOIw4i4o dnnl_gOIw4i4o
|
||||
#define mkldnn_gOIw8i16o2i dnnl_gOIw8i16o2i
|
||||
#define mkldnn_gOIw8i8o dnnl_gOIw8i8o
|
||||
#define mkldnn_gOIw8o16i2o dnnl_gOIw8o16i2o
|
||||
#define mkldnn_gOIw8o8i dnnl_gOIw8o8i
|
||||
#define mkldnn_gOdhwi16o dnnl_gOdhwi16o
|
||||
#define mkldnn_gOdhwi4o dnnl_gOdhwi4o
|
||||
#define mkldnn_gOdhwi8o dnnl_gOdhwi8o
|
||||
#define mkldnn_gOhwi16o dnnl_gOhwi16o
|
||||
#define mkldnn_gOhwi32o dnnl_gOhwi32o
|
||||
#define mkldnn_gOhwi4o dnnl_gOhwi4o
|
||||
#define mkldnn_gOhwi8o dnnl_gOhwi8o
|
||||
#define mkldnn_gOidhw16o dnnl_gOidhw16o
|
||||
#define mkldnn_gOidhw4o dnnl_gOidhw4o
|
||||
#define mkldnn_gOihw16o dnnl_gOihw16o
|
||||
#define mkldnn_gOihw4o dnnl_gOihw4o
|
||||
#define mkldnn_gOiw16o dnnl_gOiw16o
|
||||
#define mkldnn_gOiw4o dnnl_gOiw4o
|
||||
#define mkldnn_gOwi16o dnnl_gOwi16o
|
||||
#define mkldnn_gOwi4o dnnl_gOwi4o
|
||||
#define mkldnn_gOwi8o dnnl_gOwi8o
|
||||
#define mkldnn_gemm dnnl_gemm
|
||||
#define mkldnn_gemm_s8s8s32 dnnl_gemm_s8s8s32
|
||||
#define mkldnn_gemm_u8s8s32 dnnl_gemm_u8s8s32
|
||||
#define mkldnn_giohw dnnl_giohw
|
||||
#define mkldnn_goidhw dnnl_goidhw
|
||||
#define mkldnn_goihw dnnl_goihw
|
||||
#define mkldnn_goiw dnnl_goiw
|
||||
#define mkldnn_gpu dnnl_gpu
|
||||
#define mkldnn_gru_backward_desc_init dnnl_gru_backward_desc_init
|
||||
#define mkldnn_gru_forward_desc_init dnnl_gru_forward_desc_init
|
||||
#define mkldnn_hwigo dnnl_hwigo
|
||||
#define mkldnn_hwio dnnl_hwio
|
||||
#define mkldnn_idhwo dnnl_idhwo
|
||||
#define mkldnn_ihwo dnnl_ihwo
|
||||
#define mkldnn_inner_product dnnl_inner_product
|
||||
#define mkldnn_inner_product_backward_data_desc_init \
|
||||
dnnl_inner_product_backward_data_desc_init
|
||||
#define mkldnn_inner_product_backward_weights_desc_init \
|
||||
dnnl_inner_product_backward_weights_desc_init
|
||||
#define mkldnn_inner_product_desc_t dnnl_inner_product_desc_t
|
||||
#define mkldnn_inner_product_forward_desc_init \
|
||||
dnnl_inner_product_forward_desc_init
|
||||
#define mkldnn_invalid_arguments dnnl_invalid_arguments
|
||||
#define mkldnn_io dnnl_io
|
||||
#define mkldnn_iohw dnnl_iohw
|
||||
#define mkldnn_iterator_ends dnnl_iterator_ends
|
||||
#define mkldnn_iwo dnnl_iwo
|
||||
#define mkldnn_layer_normalization dnnl_layer_normalization
|
||||
#define mkldnn_layer_normalization_backward_desc_init \
|
||||
dnnl_layer_normalization_backward_desc_init
|
||||
#define mkldnn_layer_normalization_desc_t dnnl_layer_normalization_desc_t
|
||||
#define mkldnn_layer_normalization_forward_desc_init \
|
||||
dnnl_layer_normalization_forward_desc_init
|
||||
#define mkldnn_lbr_gru dnnl_lbr_gru
|
||||
#define mkldnn_lbr_gru_backward_desc_init dnnl_lbr_gru_backward_desc_init
|
||||
#define mkldnn_lbr_gru_forward_desc_init dnnl_lbr_gru_forward_desc_init
|
||||
#define mkldnn_ldgo dnnl_ldgo
|
||||
#define mkldnn_ldgoi dnnl_ldgoi
|
||||
#define mkldnn_ldgoi_p dnnl_ldgoi_p
|
||||
#define mkldnn_ldigo dnnl_ldigo
|
||||
#define mkldnn_ldigo_p dnnl_ldigo_p
|
||||
#define mkldnn_ldnc dnnl_ldnc
|
||||
#define mkldnn_lrn dnnl_lrn
|
||||
#define mkldnn_lrn_across_channels dnnl_lrn_across_channels
|
||||
#define mkldnn_lrn_backward_desc_init dnnl_lrn_backward_desc_init
|
||||
#define mkldnn_lrn_desc_t dnnl_lrn_desc_t
|
||||
#define mkldnn_lrn_forward_desc_init dnnl_lrn_forward_desc_init
|
||||
#define mkldnn_lrn_within_channel dnnl_lrn_within_channel
|
||||
#define mkldnn_lstm_backward_desc_init dnnl_lstm_backward_desc_init
|
||||
#define mkldnn_lstm_forward_desc_init dnnl_lstm_forward_desc_init
|
||||
#define mkldnn_md2dim_str dnnl_md2dim_str
|
||||
#define mkldnn_md2fmt_str dnnl_md2fmt_str
|
||||
#define mkldnn_memory dnnl_memory
|
||||
#define mkldnn_memory_create dnnl_memory_create
|
||||
#define mkldnn_memory_desc_equal dnnl_memory_desc_equal
|
||||
#define mkldnn_memory_desc_get_size dnnl_memory_desc_get_size
|
||||
#define mkldnn_memory_desc_init_by_strides dnnl_memory_desc_init_by_strides
|
||||
#define mkldnn_memory_desc_init_by_tag dnnl_memory_desc_init_by_tag
|
||||
#define mkldnn_memory_desc_init_submemory dnnl_memory_desc_init_submemory
|
||||
#define mkldnn_memory_desc_t dnnl_memory_desc_t
|
||||
#define mkldnn_memory_destroy dnnl_memory_destroy
|
||||
#define mkldnn_memory_extra_desc_t dnnl_memory_extra_desc_t
|
||||
#define mkldnn_memory_extra_flag_compensation_conv_s8s8 \
|
||||
dnnl_memory_extra_flag_compensation_conv_s8s8
|
||||
#define mkldnn_memory_extra_flag_none dnnl_memory_extra_flag_none
|
||||
#define mkldnn_memory_extra_flag_scale_adjust \
|
||||
dnnl_memory_extra_flag_scale_adjust
|
||||
#define mkldnn_memory_extra_flags_t dnnl_memory_extra_flags_t
|
||||
#define mkldnn_memory_get_data_handle dnnl_memory_get_data_handle
|
||||
#define mkldnn_memory_get_engine dnnl_memory_get_engine
|
||||
#define mkldnn_memory_get_memory_desc dnnl_memory_get_memory_desc
|
||||
#define mkldnn_memory_get_ocl_mem_object dnnl_memory_get_ocl_mem_object
|
||||
#define mkldnn_memory_map_data dnnl_memory_map_data
|
||||
#define mkldnn_memory_set_data_handle dnnl_memory_set_data_handle
|
||||
#define mkldnn_memory_set_ocl_mem_object dnnl_memory_set_ocl_mem_object
|
||||
#define mkldnn_memory_t dnnl_memory_t
|
||||
#define mkldnn_memory_unmap_data dnnl_memory_unmap_data
|
||||
#define mkldnn_nCdhw16c dnnl_nCdhw16c
|
||||
#define mkldnn_nCdhw4c dnnl_nCdhw4c
|
||||
#define mkldnn_nCdhw8c dnnl_nCdhw8c
|
||||
#define mkldnn_nChw16c dnnl_nChw16c
|
||||
#define mkldnn_nChw4c dnnl_nChw4c
|
||||
#define mkldnn_nChw8c dnnl_nChw8c
|
||||
#define mkldnn_nCw16c dnnl_nCw16c
|
||||
#define mkldnn_nCw4c dnnl_nCw4c
|
||||
#define mkldnn_nCw8c dnnl_nCw8c
|
||||
#define mkldnn_nc dnnl_nc
|
||||
#define mkldnn_ncdhw dnnl_ncdhw
|
||||
#define mkldnn_nchw dnnl_nchw
|
||||
#define mkldnn_ncw dnnl_ncw
|
||||
#define mkldnn_ndhwc dnnl_ndhwc
|
||||
#define mkldnn_nhwc dnnl_nhwc
|
||||
#define mkldnn_normalization_flags2str dnnl_normalization_flags2str
|
||||
#define mkldnn_normalization_flags_t dnnl_normalization_flags_t
|
||||
#define mkldnn_not_required dnnl_not_required
|
||||
#define mkldnn_nt dnnl_nt
|
||||
#define mkldnn_ntc dnnl_ntc
|
||||
#define mkldnn_nwc dnnl_nwc
|
||||
#define mkldnn_odhwi dnnl_odhwi
|
||||
#define mkldnn_ohwi dnnl_ohwi
|
||||
#define mkldnn_oi dnnl_oi
|
||||
#define mkldnn_oidhw dnnl_oidhw
|
||||
#define mkldnn_oihw dnnl_oihw
|
||||
#define mkldnn_oiw dnnl_oiw
|
||||
#define mkldnn_op_desc_t dnnl_op_desc_t
|
||||
#define mkldnn_out_of_memory dnnl_out_of_memory
|
||||
#define mkldnn_owi dnnl_owi
|
||||
#define mkldnn_packed_format_undef dnnl_packed_format_undef
|
||||
#define mkldnn_pooling dnnl_pooling
|
||||
#define mkldnn_pooling_avg dnnl_pooling_avg
|
||||
#define mkldnn_pooling_avg_exclude_padding dnnl_pooling_avg_exclude_padding
|
||||
#define mkldnn_pooling_avg_include_padding dnnl_pooling_avg_include_padding
|
||||
#define mkldnn_pooling_backward_desc_init dnnl_pooling_backward_desc_init
|
||||
#define mkldnn_pooling_desc_t dnnl_pooling_desc_t
|
||||
#define mkldnn_pooling_forward_desc_init dnnl_pooling_forward_desc_init
|
||||
#define mkldnn_pooling_max dnnl_pooling_max
|
||||
#define mkldnn_post_ops dnnl_post_ops
|
||||
#define mkldnn_post_ops_append_eltwise dnnl_post_ops_append_eltwise
|
||||
#define mkldnn_post_ops_append_sum dnnl_post_ops_append_sum
|
||||
#define mkldnn_post_ops_create dnnl_post_ops_create
|
||||
#define mkldnn_post_ops_destroy dnnl_post_ops_destroy
|
||||
#define mkldnn_post_ops_get_kind dnnl_post_ops_get_kind
|
||||
#define mkldnn_post_ops_get_params_eltwise dnnl_post_ops_get_params_eltwise
|
||||
#define mkldnn_post_ops_get_params_sum dnnl_post_ops_get_params_sum
|
||||
#define mkldnn_post_ops_len dnnl_post_ops_len
|
||||
#define mkldnn_post_ops_t dnnl_post_ops_t
|
||||
#define mkldnn_prim_kind2str dnnl_prim_kind2str
|
||||
#define mkldnn_primitive dnnl_primitive
|
||||
#define mkldnn_primitive_attr dnnl_primitive_attr
|
||||
#define mkldnn_primitive_attr_clone dnnl_primitive_attr_clone
|
||||
#define mkldnn_primitive_attr_create dnnl_primitive_attr_create
|
||||
#define mkldnn_primitive_attr_destroy dnnl_primitive_attr_destroy
|
||||
#define mkldnn_primitive_attr_get_output_scales \
|
||||
dnnl_primitive_attr_get_output_scales
|
||||
#define mkldnn_primitive_attr_get_post_ops dnnl_primitive_attr_get_post_ops
|
||||
#define mkldnn_primitive_attr_get_scratchpad_mode \
|
||||
dnnl_primitive_attr_get_scratchpad_mode
|
||||
#define mkldnn_primitive_attr_set_output_scales \
|
||||
dnnl_primitive_attr_set_output_scales
|
||||
#define mkldnn_primitive_attr_set_post_ops dnnl_primitive_attr_set_post_ops
|
||||
#define mkldnn_primitive_attr_set_rnn_data_qparams \
|
||||
dnnl_primitive_attr_set_rnn_data_qparams
|
||||
#define mkldnn_primitive_attr_set_rnn_weights_qparams \
|
||||
dnnl_primitive_attr_set_rnn_weights_qparams
|
||||
#define mkldnn_primitive_attr_set_scratchpad_mode \
|
||||
dnnl_primitive_attr_set_scratchpad_mode
|
||||
#define mkldnn_primitive_attr_t dnnl_primitive_attr_t
|
||||
#define mkldnn_primitive_create dnnl_primitive_create
|
||||
#define mkldnn_primitive_desc dnnl_primitive_desc
|
||||
#define mkldnn_primitive_desc_clone dnnl_primitive_desc_clone
|
||||
#define mkldnn_primitive_desc_create dnnl_primitive_desc_create
|
||||
#define mkldnn_primitive_desc_destroy dnnl_primitive_desc_destroy
|
||||
#define mkldnn_primitive_desc_get_attr dnnl_primitive_desc_get_attr
|
||||
#define mkldnn_primitive_desc_iterator dnnl_primitive_desc_iterator
|
||||
#define mkldnn_primitive_desc_iterator_create \
|
||||
dnnl_primitive_desc_iterator_create
|
||||
#define mkldnn_primitive_desc_iterator_destroy \
|
||||
dnnl_primitive_desc_iterator_destroy
|
||||
#define mkldnn_primitive_desc_iterator_fetch dnnl_primitive_desc_iterator_fetch
|
||||
#define mkldnn_primitive_desc_iterator_next dnnl_primitive_desc_iterator_next
|
||||
#define mkldnn_primitive_desc_iterator_t dnnl_primitive_desc_iterator_t
|
||||
#define mkldnn_primitive_desc_query dnnl_primitive_desc_query
|
||||
#define mkldnn_primitive_desc_query_md dnnl_primitive_desc_query_md
|
||||
#define mkldnn_primitive_desc_query_pd dnnl_primitive_desc_query_pd
|
||||
#define mkldnn_primitive_desc_query_s32 dnnl_primitive_desc_query_s32
|
||||
#define mkldnn_primitive_desc_t dnnl_primitive_desc_t
|
||||
#define mkldnn_primitive_destroy dnnl_primitive_destroy
|
||||
#define mkldnn_primitive_execute dnnl_primitive_execute
|
||||
#define mkldnn_primitive_get_primitive_desc dnnl_primitive_get_primitive_desc
|
||||
#define mkldnn_primitive_kind_t dnnl_primitive_kind_t
|
||||
#define mkldnn_primitive_t dnnl_primitive_t
|
||||
#define mkldnn_prop_kind2str dnnl_prop_kind2str
|
||||
#define mkldnn_prop_kind_t dnnl_prop_kind_t
|
||||
#define mkldnn_prop_kind_undef dnnl_prop_kind_undef
|
||||
#define mkldnn_query_batch_normalization_d dnnl_query_batch_normalization_d
|
||||
#define mkldnn_query_convolution_d dnnl_query_convolution_d
|
||||
#define mkldnn_query_deconvolution_d dnnl_query_deconvolution_d
|
||||
#define mkldnn_query_diff_dst_md dnnl_query_diff_dst_md
|
||||
#define mkldnn_query_diff_src_md dnnl_query_diff_src_md
|
||||
#define mkldnn_query_diff_weights_md dnnl_query_diff_weights_md
|
||||
#define mkldnn_query_dst_md dnnl_query_dst_md
|
||||
#define mkldnn_query_eltwise_d dnnl_query_eltwise_d
|
||||
#define mkldnn_query_engine dnnl_query_engine
|
||||
#define mkldnn_query_gemm_d dnnl_query_gemm_d
|
||||
#define mkldnn_query_impl_info_str dnnl_query_impl_info_str
|
||||
#define mkldnn_query_inner_product_d dnnl_query_inner_product_d
|
||||
#define mkldnn_query_layer_normalization_d dnnl_query_layer_normalization_d
|
||||
#define mkldnn_query_lrn_d dnnl_query_lrn_d
|
||||
#define mkldnn_query_memory_consumption_s64 dnnl_query_memory_consumption_s64
|
||||
#define mkldnn_query_num_of_inputs_s32 dnnl_query_num_of_inputs_s32
|
||||
#define mkldnn_query_num_of_outputs_s32 dnnl_query_num_of_outputs_s32
|
||||
#define mkldnn_query_op_d dnnl_query_op_d
|
||||
#define mkldnn_query_pooling_d dnnl_query_pooling_d
|
||||
#define mkldnn_query_primitive_kind dnnl_query_primitive_kind
|
||||
#define mkldnn_query_rnn_d dnnl_query_rnn_d
|
||||
#define mkldnn_query_scratchpad_engine dnnl_query_scratchpad_engine
|
||||
#define mkldnn_query_scratchpad_md dnnl_query_scratchpad_md
|
||||
#define mkldnn_query_shuffle_d dnnl_query_shuffle_d
|
||||
#define mkldnn_query_softmax_d dnnl_query_softmax_d
|
||||
#define mkldnn_query_some_d dnnl_query_some_d
|
||||
#define mkldnn_query_some_md dnnl_query_some_md
|
||||
#define mkldnn_query_src_md dnnl_query_src_md
|
||||
#define mkldnn_query_t dnnl_query_t
|
||||
#define mkldnn_query_time_estimate_f64 dnnl_query_time_estimate_f64
|
||||
#define mkldnn_query_undef dnnl_query_undef
|
||||
#define mkldnn_query_weights_md dnnl_query_weights_md
|
||||
#define mkldnn_query_workspace_md dnnl_query_workspace_md
|
||||
#define mkldnn_reorder dnnl_reorder
|
||||
#define mkldnn_reorder_primitive_desc_create dnnl_reorder_primitive_desc_create
|
||||
#define mkldnn_rnn dnnl_rnn
|
||||
#define mkldnn_rnn_desc_t dnnl_rnn_desc_t
|
||||
#define mkldnn_rnn_direction2str dnnl_rnn_direction2str
|
||||
#define mkldnn_rnn_direction_t dnnl_rnn_direction_t
|
||||
#define mkldnn_rnn_flags2str dnnl_rnn_flags2str
|
||||
#define mkldnn_rnn_flags_t dnnl_rnn_flags_t
|
||||
#define mkldnn_rnn_flags_undef dnnl_rnn_flags_undef
|
||||
#define mkldnn_rnn_packed_desc_t dnnl_rnn_packed_desc_t
|
||||
#define mkldnn_rnn_packed_memory_format_t dnnl_rnn_packed_memory_format_t
|
||||
#define mkldnn_runtime_error dnnl_runtime_error
|
||||
#define mkldnn_s32 dnnl_s32
|
||||
#define mkldnn_s8 dnnl_s8
|
||||
#define mkldnn_scratchpad_mode2str dnnl_scratchpad_mode2str
|
||||
#define mkldnn_scratchpad_mode_library dnnl_scratchpad_mode_library
|
||||
#define mkldnn_scratchpad_mode_t dnnl_scratchpad_mode_t
|
||||
#define mkldnn_scratchpad_mode_user dnnl_scratchpad_mode_user
|
||||
#define mkldnn_set_jit_dump dnnl_set_jit_dump
|
||||
#define mkldnn_set_verbose dnnl_set_verbose
|
||||
#define mkldnn_sgemm dnnl_sgemm
|
||||
#define mkldnn_shuffle dnnl_shuffle
|
||||
#define mkldnn_shuffle_backward_desc_init dnnl_shuffle_backward_desc_init
|
||||
#define mkldnn_shuffle_desc_t dnnl_shuffle_desc_t
|
||||
#define mkldnn_shuffle_forward_desc_init dnnl_shuffle_forward_desc_init
|
||||
#define mkldnn_softmax dnnl_softmax
|
||||
#define mkldnn_softmax_backward_desc_init dnnl_softmax_backward_desc_init
|
||||
#define mkldnn_softmax_desc_t dnnl_softmax_desc_t
|
||||
#define mkldnn_softmax_forward_desc_init dnnl_softmax_forward_desc_init
|
||||
#define mkldnn_status2str dnnl_status2str
|
||||
#define mkldnn_status_t dnnl_status_t
|
||||
#define mkldnn_stream dnnl_stream
|
||||
#define mkldnn_stream_create dnnl_stream_create
|
||||
#define mkldnn_stream_create_ocl dnnl_stream_create_ocl
|
||||
#define mkldnn_stream_default_flags dnnl_stream_default_flags
|
||||
#define mkldnn_stream_default_order dnnl_stream_default_order
|
||||
#define mkldnn_stream_destroy dnnl_stream_destroy
|
||||
#define mkldnn_stream_flags_t dnnl_stream_flags_t
|
||||
#define mkldnn_stream_get_ocl_command_queue dnnl_stream_get_ocl_command_queue
|
||||
#define mkldnn_stream_in_order dnnl_stream_in_order
|
||||
#define mkldnn_stream_out_of_order dnnl_stream_out_of_order
|
||||
#define mkldnn_stream_t dnnl_stream_t
|
||||
#define mkldnn_stream_wait dnnl_stream_wait
|
||||
#define mkldnn_success dnnl_success
|
||||
#define mkldnn_sum dnnl_sum
|
||||
#define mkldnn_sum_primitive_desc_create dnnl_sum_primitive_desc_create
|
||||
#define mkldnn_tn dnnl_tn
|
||||
#define mkldnn_tnc dnnl_tnc
|
||||
#define mkldnn_types dnnl_types
|
||||
#define mkldnn_u8 dnnl_u8
|
||||
#define mkldnn_undefined_primitive dnnl_undefined_primitive
|
||||
#define mkldnn_unidirectional dnnl_unidirectional
|
||||
#define mkldnn_unidirectional_left2right dnnl_unidirectional_left2right
|
||||
#define mkldnn_unidirectional_right2left dnnl_unidirectional_right2left
|
||||
#define mkldnn_unimplemented dnnl_unimplemented
|
||||
#define mkldnn_use_global_stats dnnl_use_global_stats
|
||||
#define mkldnn_use_scaleshift dnnl_use_scaleshift
|
||||
#define mkldnn_vanilla_gru dnnl_vanilla_gru
|
||||
#define mkldnn_vanilla_lstm dnnl_vanilla_lstm
|
||||
#define mkldnn_vanilla_rnn dnnl_vanilla_rnn
|
||||
#define mkldnn_vanilla_rnn_backward_desc_init \
|
||||
dnnl_vanilla_rnn_backward_desc_init
|
||||
#define mkldnn_vanilla_rnn_forward_desc_init dnnl_vanilla_rnn_forward_desc_init
|
||||
#define mkldnn_version dnnl_version
|
||||
#define mkldnn_version_t dnnl_version_t
|
||||
#define mkldnn_wino_desc_t dnnl_wino_desc_t
|
||||
#define mkldnn_wino_memory_format_t dnnl_wino_memory_format_t
|
||||
#define mkldnn_wino_undef dnnl_wino_undef
|
||||
#define mkldnn_wino_wei_OBaaIBOIio dnnl_wino_wei_OBaaIBOIio
|
||||
#define mkldnn_wino_wei_aaOBiOo dnnl_wino_wei_aaOBiOo
|
||||
#define mkldnn_wino_wei_aaOIoi dnnl_wino_wei_aaOIoi
|
||||
#define mkldnn_wino_wei_aaOio dnnl_wino_wei_aaOio
|
||||
#define mkldnn_wio dnnl_wio
|
||||
#define mkldnn_x dnnl_x
|
||||
|
||||
#endif /* MKLDNN_DNNL_MANGLING_H */
|
File diff suppressed because it is too large
Load Diff
26
include/mkldnn_version.h
Normal file
26
include/mkldnn_version.h
Normal file
@ -0,0 +1,26 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2019 Intel Corporation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
// Header file ensures the backwards compatibility with previous namings.
|
||||
|
||||
#ifndef MKLDNN_VERSION_H
|
||||
#define MKLDNN_VERSION_H
|
||||
|
||||
#include "mkldnn_dnnl_mangling.h"
|
||||
|
||||
#include "dnnl_version.h"
|
||||
|
||||
#endif /* MKLDNN_VERSION_H */
|
@ -58,14 +58,14 @@ def template(body, year_from):
|
||||
|
||||
def header(body):
|
||||
return '''\
|
||||
#ifndef MKLDNN_DEBUG_H
|
||||
#define MKLDNN_DEBUG_H
|
||||
#ifndef DNNL_DEBUG_H
|
||||
#define DNNL_DEBUG_H
|
||||
|
||||
/// @file
|
||||
/// Debug capabilities
|
||||
|
||||
#include "mkldnn_config.h"
|
||||
#include "mkldnn_types.h"
|
||||
#include "dnnl_config.h"
|
||||
#include "dnnl_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -83,14 +83,14 @@ extern "C" {
|
||||
/// - fmt_kind -- format kind (blocked, wino, etc...)
|
||||
/// - fmt -- extended format string (format_kind specific)
|
||||
/// - extra -- shows extra fields (underspecified)
|
||||
int MKLDNN_API mkldnn_md2fmt_str(char *fmt_str, size_t fmt_str_len,
|
||||
const mkldnn_memory_desc_t *md);
|
||||
int DNNL_API dnnl_md2fmt_str(char *fmt_str, size_t fmt_str_len,
|
||||
const dnnl_memory_desc_t *md);
|
||||
|
||||
/// Forms a dimension string for a given memory descriptor.
|
||||
///
|
||||
/// The format is defined as: 'dim0xdim1x...xdimN
|
||||
int MKLDNN_API mkldnn_md2dim_str(char *dim_str, size_t dim_str_len,
|
||||
const mkldnn_memory_desc_t *md);
|
||||
int DNNL_API dnnl_md2dim_str(char *dim_str, size_t dim_str_len,
|
||||
const dnnl_memory_desc_t *md);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@ -104,8 +104,8 @@ def source(body):
|
||||
return '''\
|
||||
#include <assert.h>
|
||||
|
||||
#include "mkldnn_debug.h"
|
||||
#include "mkldnn_types.h"
|
||||
#include "dnnl_debug.h"
|
||||
#include "dnnl_types.h"
|
||||
|
||||
%s
|
||||
''' % body
|
||||
@ -113,20 +113,20 @@ def source(body):
|
||||
|
||||
def header_benchdnn(body):
|
||||
return '''\
|
||||
#ifndef MKLDNN_DEBUG_HPP
|
||||
#define MKLDNN_DEBUG_HPP
|
||||
#ifndef DNNL_DEBUG_HPP
|
||||
#define DNNL_DEBUG_HPP
|
||||
|
||||
#include "mkldnn.h"
|
||||
#include "dnnl.h"
|
||||
|
||||
%s
|
||||
/* status */
|
||||
const char *status2str(mkldnn_status_t status);
|
||||
const char *status2str(dnnl_status_t status);
|
||||
|
||||
/* data type */
|
||||
const char *dt2str(mkldnn_data_type_t dt);
|
||||
const char *dt2str(dnnl_data_type_t dt);
|
||||
|
||||
/* format */
|
||||
const char *fmt_tag2str(mkldnn_format_tag_t tag);
|
||||
const char *fmt_tag2str(dnnl_format_tag_t tag);
|
||||
|
||||
#endif
|
||||
''' % body
|
||||
@ -137,64 +137,64 @@ def source_benchdnn(body):
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "mkldnn_debug.h"
|
||||
#include "mkldnn_debug.hpp"
|
||||
#include "dnnl_debug.h"
|
||||
#include "dnnl_debug.hpp"
|
||||
|
||||
#include "src/common/z_magic.hpp"
|
||||
|
||||
%s
|
||||
|
||||
const char *status2str(mkldnn_status_t status) {
|
||||
return mkldnn_status2str(status);
|
||||
const char *status2str(dnnl_status_t status) {
|
||||
return dnnl_status2str(status);
|
||||
}
|
||||
|
||||
const char *dt2str(mkldnn_data_type_t dt) {
|
||||
return mkldnn_dt2str(dt);
|
||||
const char *dt2str(dnnl_data_type_t dt) {
|
||||
return dnnl_dt2str(dt);
|
||||
}
|
||||
|
||||
const char *fmt_tag2str(mkldnn_format_tag_t tag) {
|
||||
return mkldnn_fmt_tag2str(tag);
|
||||
const char *fmt_tag2str(dnnl_format_tag_t tag) {
|
||||
return dnnl_fmt_tag2str(tag);
|
||||
}
|
||||
''' % body.rstrip()
|
||||
|
||||
|
||||
def maybe_skip(enum):
|
||||
return enum in (
|
||||
'mkldnn_batch_normalization_flag_t',
|
||||
'mkldnn_memory_extra_flags_t',
|
||||
'mkldnn_wino_memory_format_t',
|
||||
'mkldnn_rnn_cell_flags_t',
|
||||
'mkldnn_rnn_packed_memory_format_t',
|
||||
'mkldnn_batch_normalization_flags_t',
|
||||
'mkldnn_query_t',
|
||||
'mkldnn_stream_flags_t',
|
||||
'dnnl_batch_normalization_flag_t',
|
||||
'dnnl_memory_extra_flags_t',
|
||||
'dnnl_wino_memory_format_t',
|
||||
'dnnl_rnn_cell_flags_t',
|
||||
'dnnl_rnn_packed_memory_format_t',
|
||||
'dnnl_batch_normalization_flags_t',
|
||||
'dnnl_query_t',
|
||||
'dnnl_stream_flags_t',
|
||||
)
|
||||
|
||||
|
||||
def enum_abbrev(enum):
|
||||
def_enum = re.sub(r'^mkldnn_', '', enum)
|
||||
def_enum = re.sub(r'^dnnl_', '', enum)
|
||||
def_enum = re.sub(r'_t$', '', def_enum)
|
||||
return {
|
||||
'mkldnn_data_type_t': 'dt',
|
||||
'mkldnn_format_kind_t': 'fmt_kind',
|
||||
'mkldnn_format_tag_t': 'fmt_tag',
|
||||
'mkldnn_primitive_kind_t': 'prim_kind',
|
||||
'mkldnn_engine_kind_t': 'engine_kind',
|
||||
'dnnl_data_type_t': 'dt',
|
||||
'dnnl_format_kind_t': 'fmt_kind',
|
||||
'dnnl_format_tag_t': 'fmt_tag',
|
||||
'dnnl_primitive_kind_t': 'prim_kind',
|
||||
'dnnl_engine_kind_t': 'engine_kind',
|
||||
}.get(enum, def_enum)
|
||||
|
||||
|
||||
def sanitize_value(v):
|
||||
if 'undef' in v:
|
||||
return 'undef'
|
||||
v = v.split('mkldnn_format_kind_')[-1]
|
||||
v = v.split('mkldnn_')[-1]
|
||||
v = v.split('dnnl_format_kind_')[-1]
|
||||
v = v.split('dnnl_')[-1]
|
||||
return v
|
||||
|
||||
|
||||
def func_to_str_decl(enum, is_header=False):
|
||||
abbrev = enum_abbrev(enum)
|
||||
return 'const char %s*mkldnn_%s2str(%s v)' % \
|
||||
('MKLDNN_API ' if is_header else '', abbrev, enum)
|
||||
return 'const char %s*dnnl_%s2str(%s v)' % \
|
||||
('DNNL_API ' if is_header else '', abbrev, enum)
|
||||
|
||||
|
||||
def func_to_str(enum, values):
|
||||
@ -210,23 +210,23 @@ def func_to_str(enum, values):
|
||||
return func
|
||||
|
||||
|
||||
def str_to_func_decl(enum, is_header=False, is_mkldnn=True):
|
||||
attr = 'MKLDNN_API ' if is_header and is_mkldnn else ''
|
||||
prefix = 'mkldnn_' if is_mkldnn else ''
|
||||
def str_to_func_decl(enum, is_header=False, is_dnnl=True):
|
||||
attr = 'DNNL_API ' if is_header and is_dnnl else ''
|
||||
prefix = 'dnnl_' if is_dnnl else ''
|
||||
abbrev = enum_abbrev(enum)
|
||||
return '%s %s%sstr2%s(const char *str)' % \
|
||||
(enum, attr, prefix, abbrev)
|
||||
|
||||
|
||||
def str_to_func(enum, values, is_mkldnn=True):
|
||||
def str_to_func(enum, values, is_dnnl=True):
|
||||
indent = ' '
|
||||
abbrev = enum_abbrev(enum)
|
||||
func = ''
|
||||
func += str_to_func_decl(enum, is_mkldnn=is_mkldnn) + ' {\n'
|
||||
func += str_to_func_decl(enum, is_dnnl=is_dnnl) + ' {\n'
|
||||
func += '''#define CASE(_case) do { \\
|
||||
if (!strcmp(STRINGIFY(_case), str) \\
|
||||
|| !strcmp("mkldnn_" STRINGIFY(_case), str)) \\
|
||||
return CONCAT2(mkldnn_, _case); \\
|
||||
|| !strcmp("dnnl_" STRINGIFY(_case), str)) \\
|
||||
return CONCAT2(dnnl_, _case); \\
|
||||
} while (0)
|
||||
'''
|
||||
special_values = []
|
||||
@ -262,11 +262,11 @@ def generate(ifile, banner_years):
|
||||
for v_value in v_enum.findall('EnumValue')]
|
||||
h_body += func_to_str_decl(enum, is_header=True) + ';\n'
|
||||
s_body += func_to_str(enum, values) + '\n'
|
||||
if enum in ['mkldnn_format_tag_t', 'mkldnn_data_type_t']:
|
||||
if enum in ['dnnl_format_tag_t', 'dnnl_data_type_t']:
|
||||
h_benchdnn_body += str_to_func_decl(
|
||||
enum, is_header=True, is_mkldnn=False) + ';\n'
|
||||
enum, is_header=True, is_dnnl=False) + ';\n'
|
||||
s_benchdnn_body += str_to_func(
|
||||
enum, values, is_mkldnn=False) + '\n'
|
||||
enum, values, is_dnnl=False) + '\n'
|
||||
bodies = [
|
||||
header(h_body),
|
||||
source(s_body),
|
||||
@ -280,10 +280,10 @@ def usage():
|
||||
print('''\
|
||||
%s types.xml
|
||||
|
||||
Generates MKL-DNN debug header and source files with enum to string mapping.
|
||||
Generates DNNL debug header and source files with enum to string mapping.
|
||||
Input types.xml file can be obtained with CastXML[1]:
|
||||
$ castxml --castxml-cc-gnu-c clang --castxml-output=1 \\
|
||||
include/mkldnn_types.h -o types.xml
|
||||
include/dnnl_types.h -o types.xml
|
||||
|
||||
[1] https://github.com/CastXML/CastXML''' % sys.argv[0])
|
||||
sys.exit(1)
|
||||
@ -298,10 +298,10 @@ script_root = os.path.dirname(os.path.realpath(__file__))
|
||||
ifile = sys.argv[1] if len(sys.argv) > 1 else usage()
|
||||
|
||||
file_paths = (
|
||||
'%s/../include/mkldnn_debug.h' % script_root,
|
||||
'%s/../src/common/mkldnn_debug_autogenerated.cpp' % script_root,
|
||||
'%s/../tests/benchdnn/mkldnn_debug.hpp' % script_root,
|
||||
'%s/../tests/benchdnn/mkldnn_debug_autogenerated.cpp' % script_root)
|
||||
'%s/../include/dnnl_debug.h' % script_root,
|
||||
'%s/../src/common/dnnl_debug_autogenerated.cpp' % script_root,
|
||||
'%s/../tests/benchdnn/dnnl_debug.hpp' % script_root,
|
||||
'%s/../tests/benchdnn/dnnl_debug_autogenerated.cpp' % script_root)
|
||||
|
||||
banner_years = []
|
||||
for file_path in file_paths:
|
||||
|
@ -36,19 +36,19 @@ append(CMAKE_CXX_FLAGS "${CMAKE_CCXX_NOWARN_FLAGS}")
|
||||
append(CMAKE_C_FLAGS "${CMAKE_CCXX_SANITIZER_FLAGS}")
|
||||
append(CMAKE_CXX_FLAGS "${CMAKE_CCXX_SANITIZER_FLAGS}")
|
||||
|
||||
if(NOT MKLDNN_VERBOSE)
|
||||
if(NOT DNNL_VERBOSE)
|
||||
add_definitions(-DDISABLE_VERBOSE)
|
||||
endif()
|
||||
|
||||
if(MKLDNN_ENABLE_CONCURRENT_EXEC)
|
||||
add_definitions(-DMKLDNN_ENABLE_CONCURRENT_EXEC)
|
||||
if(DNNL_ENABLE_CONCURRENT_EXEC)
|
||||
add_definitions(-DDNNL_ENABLE_CONCURRENT_EXEC)
|
||||
endif()
|
||||
|
||||
if(NOT MKLDNN_ENABLE_JIT_PROFILING)
|
||||
if(NOT DNNL_ENABLE_JIT_PROFILING)
|
||||
# XXX: the profiling interface will still be built and present in the
|
||||
# library
|
||||
message(STATUS "Intel(R) VTune(TM) Amplifier JIT profiling disabled")
|
||||
add_definitions(-DMKLDNN_ENABLE_JIT_PROFILING=0)
|
||||
add_definitions(-DDNNL_ENABLE_JIT_PROFILING=0)
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
# Not every compiler adds -ldl automatically
|
||||
list(APPEND EXTRA_SHARED_LIBS "${CMAKE_DL_LIBS}")
|
||||
@ -66,15 +66,15 @@ endif()
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(cpu)
|
||||
|
||||
if(MKLDNN_GPU_RUNTIME STREQUAL "OCL")
|
||||
if(DNNL_GPU_RUNTIME STREQUAL "OCL")
|
||||
add_subdirectory(ocl)
|
||||
endif()
|
||||
|
||||
add_library(${LIB_NAME}
|
||||
${MKLDNN_LIBRARY_TYPE} ${HEADERS} ${${LIB_NAME}_SUB_OBJS})
|
||||
${DNNL_LIBRARY_TYPE} ${HEADERS} ${${LIB_NAME}_SUB_OBJS})
|
||||
|
||||
set_property(TARGET ${LIB_NAME} PROPERTY VERSION "${MKLDNN_VERSION_MAJOR}.${MKLDNN_VERSION_MINOR}")
|
||||
set_property(TARGET ${LIB_NAME} PROPERTY SOVERSION "${MKLDNN_VERSION_MAJOR}")
|
||||
set_property(TARGET ${LIB_NAME} PROPERTY VERSION "${DNNL_VERSION_MAJOR}.${DNNL_VERSION_MINOR}")
|
||||
set_property(TARGET ${LIB_NAME} PROPERTY SOVERSION "${DNNL_VERSION_MAJOR}")
|
||||
set_property(TARGET ${LIB_NAME} PROPERTY PUBLIC_HEADER ${HEADERS})
|
||||
|
||||
target_include_directories(${LIB_NAME} PUBLIC
|
||||
@ -87,7 +87,7 @@ target_include_directories(${LIB_NAME} PUBLIC
|
||||
target_link_libraries_build(${LIB_NAME}
|
||||
"${EXTRA_SHARED_LIBS};${EXTRA_STATIC_LIBS}")
|
||||
target_link_libraries_install(${LIB_NAME} "${EXTRA_SHARED_LIBS}")
|
||||
if(MKLDNN_LIBRARY_TYPE STREQUAL "STATIC")
|
||||
if(DNNL_LIBRARY_TYPE STREQUAL "STATIC")
|
||||
target_link_libraries_install(${LIB_NAME} "${EXTRA_STATIC_LIBS}")
|
||||
endif()
|
||||
|
||||
@ -122,7 +122,7 @@ install(EXPORT ${LIB_EXPORT_NAME}
|
||||
DESTINATION ${LIB_CONFIG_INSTALL_DIR})
|
||||
|
||||
# Install custom find modules for transitive dependencies
|
||||
if(MKLDNN_CPU_RUNTIME STREQUAL "TBB")
|
||||
if(DNNL_CPU_RUNTIME STREQUAL "TBB")
|
||||
if(WIN32)
|
||||
install(FILES "../cmake/win/TBBConfig.cmake" RENAME "FindTBB.cmake"
|
||||
DESTINATION ${LIB_CONFIG_INSTALL_DIR})
|
||||
@ -135,13 +135,13 @@ if(MKLDNN_CPU_RUNTIME STREQUAL "TBB")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MKLDNN_GPU_RUNTIME STREQUAL "OCL")
|
||||
if(DNNL_GPU_RUNTIME STREQUAL "OCL")
|
||||
install(FILES
|
||||
"../cmake/FindOpenCL.cmake"
|
||||
DESTINATION ${LIB_CONFIG_INSTALL_DIR})
|
||||
endif()
|
||||
|
||||
# On Windows we need to add mkldnn.dll path to CTESTCONFIG_PATH which is later
|
||||
# On Windows we need to add dnnl.dll path to CTESTCONFIG_PATH which is later
|
||||
# passed to ctest and Visual Studio solutions
|
||||
if(WIN32)
|
||||
if(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
|
Reference in New Issue
Block a user