.. index:: pair: group; Service .. _doxid-group__dnnl__api__service: Service ======= .. toctree:: :hidden: enum_dnnl_cpu_isa.rst enum_dnnl_cpu_isa_hints.rst enum_dnnl_cpu_isa_hints_t.rst enum_dnnl_cpu_isa_t.rst enum_dnnl_status.rst struct_dnnl_version_t.rst Overview ~~~~~~~~ A set of functions that aid in oneDNN debugging and profiling. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // typedefs typedef :ref:`dnnl_version_t` :ref:`dnnl::version_t`; // enums enum :ref:`dnnl::cpu_isa`; enum :ref:`dnnl::cpu_isa_hints`; enum :ref:`dnnl_cpu_isa_hints_t`; enum :ref:`dnnl_cpu_isa_t`; enum :ref:`dnnl::status`; // structs struct :ref:`dnnl_version_t`; // global functions :ref:`status` :ref:`dnnl::set_verbose`(int level); const :ref:`version_t`* :ref:`dnnl::version`(); :ref:`fpmath_mode` :ref:`dnnl::get_default_fpmath_mode`(); :ref:`status` :ref:`dnnl::set_default_fpmath_mode`(:ref:`fpmath_mode` mode); :ref:`status` :ref:`dnnl::set_jit_dump`(int enable); :ref:`status` :ref:`dnnl::set_jit_profiling_flags`(unsigned flags); :ref:`status` :ref:`dnnl::set_jit_profiling_jitdumpdir`(const std::string& dir); :ref:`status` :ref:`dnnl::set_max_cpu_isa`(:ref:`cpu_isa` isa); :ref:`cpu_isa` :ref:`dnnl::get_effective_cpu_isa`(); :ref:`status` :ref:`dnnl::set_cpu_isa_hints`(:ref:`cpu_isa_hints` isa_hints); :ref:`cpu_isa_hints` :ref:`dnnl::get_cpu_isa_hints`(); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_set_jit_dump`(int enable); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_set_jit_profiling_flags`(unsigned flags); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_set_jit_profiling_jitdumpdir`(const char* dir); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_set_max_cpu_isa`(:ref:`dnnl_cpu_isa_t` isa); :ref:`dnnl_cpu_isa_t` DNNL_API :ref:`dnnl_get_effective_cpu_isa`(void); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_set_cpu_isa_hints`(:ref:`dnnl_cpu_isa_hints_t` isa_hints); :ref:`dnnl_cpu_isa_hints_t` DNNL_API :ref:`dnnl_get_cpu_isa_hints`(void); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_set_verbose`(int level); const :ref:`dnnl_version_t` DNNL_API* :ref:`dnnl_version`(void); // macros #define :ref:`DNNL_JIT_PROFILE_LINUX_JITDUMP` #define :ref:`DNNL_JIT_PROFILE_LINUX_JITDUMP_USE_TSC` #define :ref:`DNNL_JIT_PROFILE_LINUX_PERF` #define :ref:`DNNL_JIT_PROFILE_LINUX_PERFMAP` #define :ref:`DNNL_JIT_PROFILE_NONE` #define :ref:`DNNL_JIT_PROFILE_VTUNE` .. _details-group__dnnl__api__service: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A set of functions that aid in oneDNN debugging and profiling. Typedefs -------- .. index:: pair: typedef; version_t .. _doxid-group__dnnl__api__service_1ga7b6ec8722f5ad94170755b8be0cdd3af: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef :ref:`dnnl_version_t` dnnl::version_t Structure containing version information as per `Semantic Versioning `__ Global Functions ---------------- .. index:: pair: function; set_verbose .. _doxid-group__dnnl__api__service_1ga37bcab6f832df551a9fc418e48743b15: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`status` dnnl::set_verbose(int level) Configures verbose output to stdout. .. note:: Enabling verbose output affects performance. This setting overrides the ONEDNN_VERBOSE environment variable. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - level - Verbosity level: * 0: no verbose output (default), * 1: primitive and graph information at execution, * 2: primitive and graph information at creation/compilation and execution. .. rubric:: Returns: :ref:`dnnl_invalid_arguments ` / :ref:`dnnl::status::invalid_arguments ` if the ``level`` value is invalid, and :ref:`dnnl_success ` / :ref:`dnnl::status::success ` on success. .. index:: pair: function; version .. _doxid-group__dnnl__api__service_1gaad8292408620d0296f22bdf65afb752d: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`version_t`* dnnl::version() Returns library version information. .. rubric:: Returns: Pointer to a constant structure containing * major: major version number, * minor: minor version number, * patch: patch release number, * hash: git commit hash. .. index:: pair: function; get_default_fpmath_mode .. _doxid-group__dnnl__api__service_1ga782a2388fc46e80deac409110886db75: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`fpmath_mode` dnnl::get_default_fpmath_mode() Returns the floating-point math mode that will be used by default for all subsequently created primitives. .. rubric:: Returns: Output FP math mode. .. index:: pair: function; set_default_fpmath_mode .. _doxid-group__dnnl__api__service_1ga0d55da5f92d60a7324cfdc97004ad975: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`status` dnnl::set_default_fpmath_mode(:ref:`fpmath_mode` mode) Sets the floating-point math mode that will be used by default for all subsequently created primitives. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - mode - FP math mode. The possible values are: :ref:`dnnl_fpmath_mode_strict `, :ref:`dnnl_fpmath_mode_bf16 `, :ref:`dnnl_fpmath_mode_f16 `, :ref:`dnnl_fpmath_mode_tf32 `, :ref:`dnnl_fpmath_mode_any `. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise. .. index:: pair: function; set_jit_dump .. _doxid-group__dnnl__api__service_1ga2344639528a341878d2ce46fe1c1ac83: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`status` dnnl::set_jit_dump(int enable) Configures dumping of JIT-generated code. .. note:: This setting overrides the DNNL_JIT_DUMP environment variable. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - enable - Flag value. Set to 0 to disable and set to 1 to enable. .. rubric:: Returns: :ref:`dnnl_invalid_arguments ` / :ref:`dnnl::status::invalid_arguments ` if the ``flag`` value is invalid, and :ref:`dnnl_success ` / :ref:`dnnl::status::success ` on success. .. index:: pair: function; set_jit_profiling_flags .. _doxid-group__dnnl__api__service_1ga966c54ccb1d9ff33d20c4ea47e34675d: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`status` dnnl::set_jit_profiling_flags(unsigned flags) Sets library profiling flags. The flags define which profilers are supported. .. note:: This setting overrides DNNL_JIT_PROFILE environment variable. Passing :ref:`DNNL_JIT_PROFILE_NONE ` disables profiling completely. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - flags - Profiling flags that can contain the following bits: * :ref:`DNNL_JIT_PROFILE_VTUNE ` integration with VTune Profiler (on by default) * :ref:`DNNL_JIT_PROFILE_LINUX_JITDUMP ` produce Linux-specific jit-pid.dump output (off by default). The location of the output is controlled via JITDUMPDIR environment variable or via :ref:`dnnl_set_jit_profiling_jitdumpdir() ` function. * :ref:`DNNL_JIT_PROFILE_LINUX_PERFMAP ` produce Linux-specific perf-pid.map output (off by default). The output is always placed into /tmp. .. rubric:: Returns: :ref:`dnnl_invalid_arguments ` / :ref:`dnnl::status::invalid_arguments ` if the ``flags`` value is invalid, and :ref:`dnnl_success ` / :ref:`dnnl::status::success ` on success. .. rubric:: See also: :ref:`Profiling oneDNN Performance ` .. index:: pair: function; set_jit_profiling_jitdumpdir .. _doxid-group__dnnl__api__service_1ga533341aaf1402e27d1225d1a59819a62: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`status` dnnl::set_jit_profiling_jitdumpdir(const std::string& dir) Sets JIT dump output path. Only applicable to Linux and is only used when profiling flags have DNNL_JIT_PROFILE_LINUX_PERF bit set. After the first JIT kernel is generated, the jitdump output will be placed into temporary directory created using the mkdtemp template 'dir/.debug/jit/dnnl.XXXXXX'. .. note:: This setting overrides JITDUMPDIR environment variable. If JITDUMPDIR is not set, and this function is never called, the path defaults to HOME. Passing NULL reverts the value to default. .. note:: The directory is accessed only when the first JIT kernel is being created. JIT profiling will be disabled in case of any errors accessing or creating this directory. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - dir - JIT dump output path. .. rubric:: Returns: :ref:`dnnl_success ` / :ref:`dnnl::status::success ` if the output directory was set correctly and an error status otherwise. :ref:`dnnl_unimplemented ` / :ref:`dnnl::status::unimplemented ` on Windows. .. rubric:: See also: :ref:`Profiling oneDNN Performance ` .. index:: pair: function; set_max_cpu_isa .. _doxid-group__dnnl__api__service_1ga08734310b5f1ca794c64b6a5b944b698: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`status` dnnl::set_max_cpu_isa(:ref:`cpu_isa` isa) Sets the maximal ISA the library can dispatch to on the CPU. See :ref:`dnnl_cpu_isa_t ` and :ref:`dnnl::cpu_isa ` for the list of the values accepted by the C and C++ API functions respectively. This function has effect only once, and returns an error on subsequent calls. It should also be invoked before any other oneDNN API call, otherwise it may return an error. This function overrides the DNNL_MAX_CPU_ISA environment variable. The environment variable can be set to the desired maximal ISA name in upper case and with dnnl_cpu_isa prefix removed. For example: ``DNNL_MAX_CPU_ISA=AVX2``. .. note:: The ISAs are only partially ordered: * SSE41 < AVX < AVX2 < AVX2_VNNI < AVX2_VNNI_2, * AVX2 < AVX512_CORE < AVX512_CORE_VNNI < AVX512_CORE_BF16 < AVX10_1_512 < AVX10_1_512_AMX < AVX10_1_512_AMX_FP16, * AVX2_VNNI < AVX10_1_512. Aliases: * AVX512_CORE_FP16 = AVX10_1_512 * AVX512_CORE_AMX = AVX10_1_512_AMX * AVX512_CORE_AMX_FP16 = AVX10_1_512_AMX_FP16 .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - isa - Maximal ISA the library should dispatch to. Pass :ref:`dnnl_cpu_isa_default ` / :ref:`dnnl::cpu_isa::isa_default ` to remove ISA restrictions (except for ISAs with initial support in the library). .. rubric:: Returns: :ref:`dnnl_success ` / :ref:`dnnl::status::success ` on success and a :ref:`dnnl_invalid_arguments ` / :ref:`dnnl::status::invalid_arguments ` if the ``isa`` parameter is invalid or the ISA cannot be changed at this time. :ref:`dnnl_unimplemented ` / :ref:`dnnl::status::unimplemented ` if the feature was disabled at build time (see :ref:`Build Options ` for more details). .. rubric:: See also: :ref:`CPU Dispatcher Control ` for more details .. index:: pair: function; get_effective_cpu_isa .. _doxid-group__dnnl__api__service_1ga3953f71c3f0126d9cc005a1ceff65e8b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`cpu_isa` dnnl::get_effective_cpu_isa() Gets the maximal ISA the library can dispatch to on the CPU. See :ref:`dnnl_cpu_isa_t ` and :ref:`dnnl::cpu_isa ` for the list of the values returned by the C and C++ API functions respectively. .. rubric:: Returns: :ref:`dnnl_cpu_isa_t ` value reflecting the maximal ISA the library may dispatch to. .. rubric:: See also: :ref:`CPU Dispatcher Control ` for more details .. index:: pair: function; set_cpu_isa_hints .. _doxid-group__dnnl__api__service_1ga29aa5fb708d803e091ac61dc67f9e6ed: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`status` dnnl::set_cpu_isa_hints(:ref:`cpu_isa_hints` isa_hints) Sets the hints flag for the CPU ISA. See :ref:`dnnl_cpu_isa_hints_t ` and :ref:`dnnl::cpu_isa_hints ` for the list of the values accepted by the C and C++ API functions respectively. This function has effect only once, and returns an error on subsequent calls. It should also be invoked before any other oneDNN API call, otherwise it may return an error. This function overrides the DNNL_CPU_ISA_HINTS environment variable. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - isa_hints - CPU ISA hints to be passed over to the implementation. Pass :ref:`dnnl_cpu_isa_no_hints ` / :ref:`dnnl::cpu_isa_hints::no_hints ` to use default features i.e. no hints. .. rubric:: Returns: :ref:`dnnl_success ` / :ref:`dnnl::status::success ` on success and a :ref:`dnnl_runtime_error ` / :ref:`dnnl::status::runtime_error ` if the ISA hints cannot be specified at the current time. :ref:`dnnl_unimplemented ` / :ref:`dnnl::status::unimplemented ` if the feature was disabled at build time (see :ref:`Build Options ` for more details). .. rubric:: See also: :ref:`CPU ISA Hints ` for more details .. index:: pair: function; get_cpu_isa_hints .. _doxid-group__dnnl__api__service_1ga8bee13aa79a9711489b401e9c4252ff2: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`cpu_isa_hints` dnnl::get_cpu_isa_hints() Gets the ISA specific hints that library can follow. See :ref:`dnnl_cpu_isa_hints_t ` and :ref:`dnnl::cpu_isa_hints ` for the list of the values returned by the C and C++ API functions respectively. .. rubric:: Returns: :ref:`dnnl_cpu_isa_hints_t ` value reflecting the ISA specific hints the library can follow. .. rubric:: See also: :ref:`CPU ISA Hints ` for more details .. index:: pair: function; dnnl_set_jit_dump .. _doxid-group__dnnl__api__service_1ga03c8f4af3d01f76060f98e78039837fc: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_set_jit_dump(int enable) Configures dumping of JIT-generated code. .. note:: This setting overrides the DNNL_JIT_DUMP environment variable. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - enable - Flag value. Set to 0 to disable and set to 1 to enable. .. rubric:: Returns: :ref:`dnnl_invalid_arguments ` / :ref:`dnnl::status::invalid_arguments ` if the ``flag`` value is invalid, and :ref:`dnnl_success ` / :ref:`dnnl::status::success ` on success. .. index:: pair: function; dnnl_set_jit_profiling_flags .. _doxid-group__dnnl__api__service_1ga51ef634e4f201a12d32e573955943f48: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_set_jit_profiling_flags(unsigned flags) Sets library profiling flags. The flags define which profilers are supported. .. note:: This setting overrides DNNL_JIT_PROFILE environment variable. Passing :ref:`DNNL_JIT_PROFILE_NONE ` disables profiling completely. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - flags - Profiling flags that can contain the following bits: * :ref:`DNNL_JIT_PROFILE_VTUNE ` integration with VTune Profiler (on by default) * :ref:`DNNL_JIT_PROFILE_LINUX_JITDUMP ` produce Linux-specific jit-pid.dump output (off by default). The location of the output is controlled via JITDUMPDIR environment variable or via :ref:`dnnl_set_jit_profiling_jitdumpdir() ` function. * :ref:`DNNL_JIT_PROFILE_LINUX_PERFMAP ` produce Linux-specific perf-pid.map output (off by default). The output is always placed into /tmp. .. rubric:: Returns: :ref:`dnnl_invalid_arguments ` / :ref:`dnnl::status::invalid_arguments ` if the ``flags`` value is invalid, and :ref:`dnnl_success ` / :ref:`dnnl::status::success ` on success. .. rubric:: See also: :ref:`Profiling oneDNN Performance ` .. index:: pair: function; dnnl_set_jit_profiling_jitdumpdir .. _doxid-group__dnnl__api__service_1gafb0fb0d37d72bc58386ba97bb858f8f7: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_set_jit_profiling_jitdumpdir(const char* dir) Sets JIT dump output path. Only applicable to Linux and is only used when profiling flags have DNNL_JIT_PROFILE_LINUX_PERF bit set. After the first JIT kernel is generated, the jitdump output will be placed into temporary directory created using the mkdtemp template 'dir/.debug/jit/dnnl.XXXXXX'. .. note:: This setting overrides JITDUMPDIR environment variable. If JITDUMPDIR is not set, and this function is never called, the path defaults to HOME. Passing NULL reverts the value to default. .. note:: The directory is accessed only when the first JIT kernel is being created. JIT profiling will be disabled in case of any errors accessing or creating this directory. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - dir - JIT dump output path. .. rubric:: Returns: :ref:`dnnl_success ` / :ref:`dnnl::status::success ` if the output directory was set correctly and an error status otherwise. :ref:`dnnl_unimplemented ` / :ref:`dnnl::status::unimplemented ` on Windows. .. rubric:: See also: :ref:`Profiling oneDNN Performance ` .. index:: pair: function; dnnl_set_max_cpu_isa .. _doxid-group__dnnl__api__service_1ga4b7f3b3299482f88f1a0aa61a4707156: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_set_max_cpu_isa(:ref:`dnnl_cpu_isa_t` isa) Sets the maximal ISA the library can dispatch to on the CPU. See :ref:`dnnl_cpu_isa_t ` and :ref:`dnnl::cpu_isa ` for the list of the values accepted by the C and C++ API functions respectively. This function has effect only once, and returns an error on subsequent calls. It should also be invoked before any other oneDNN API call, otherwise it may return an error. This function overrides the DNNL_MAX_CPU_ISA environment variable. The environment variable can be set to the desired maximal ISA name in upper case and with dnnl_cpu_isa prefix removed. For example: ``DNNL_MAX_CPU_ISA=AVX2``. .. note:: The ISAs are only partially ordered: * SSE41 < AVX < AVX2 < AVX2_VNNI < AVX2_VNNI_2, * AVX2 < AVX512_CORE < AVX512_CORE_VNNI < AVX512_CORE_BF16 < AVX10_1_512 < AVX10_1_512_AMX < AVX10_1_512_AMX_FP16, * AVX2_VNNI < AVX10_1_512. Aliases: * AVX512_CORE_FP16 = AVX10_1_512 * AVX512_CORE_AMX = AVX10_1_512_AMX * AVX512_CORE_AMX_FP16 = AVX10_1_512_AMX_FP16 .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - isa - Maximal ISA the library should dispatch to. Pass :ref:`dnnl_cpu_isa_default ` / :ref:`dnnl::cpu_isa::isa_default ` to remove ISA restrictions (except for ISAs with initial support in the library). .. rubric:: Returns: :ref:`dnnl_success ` / :ref:`dnnl::status::success ` on success and a :ref:`dnnl_invalid_arguments ` / :ref:`dnnl::status::invalid_arguments ` if the ``isa`` parameter is invalid or the ISA cannot be changed at this time. :ref:`dnnl_unimplemented ` / :ref:`dnnl::status::unimplemented ` if the feature was disabled at build time (see :ref:`Build Options ` for more details). .. rubric:: See also: :ref:`CPU Dispatcher Control ` for more details .. index:: pair: function; dnnl_get_effective_cpu_isa .. _doxid-group__dnnl__api__service_1gac55836cf36bc25f8635e459678303570: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_cpu_isa_t` DNNL_API dnnl_get_effective_cpu_isa(void) Gets the maximal ISA the library can dispatch to on the CPU. See :ref:`dnnl_cpu_isa_t ` and :ref:`dnnl::cpu_isa ` for the list of the values returned by the C and C++ API functions respectively. .. rubric:: Returns: :ref:`dnnl_cpu_isa_t ` value reflecting the maximal ISA the library may dispatch to. .. rubric:: See also: :ref:`CPU Dispatcher Control ` for more details .. index:: pair: function; dnnl_set_cpu_isa_hints .. _doxid-group__dnnl__api__service_1gad078a384ab0e078d81595686efd26ed2: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_set_cpu_isa_hints(:ref:`dnnl_cpu_isa_hints_t` isa_hints) Sets the hints flag for the CPU ISA. See :ref:`dnnl_cpu_isa_hints_t ` and :ref:`dnnl::cpu_isa_hints ` for the list of the values accepted by the C and C++ API functions respectively. This function has effect only once, and returns an error on subsequent calls. It should also be invoked before any other oneDNN API call, otherwise it may return an error. This function overrides the DNNL_CPU_ISA_HINTS environment variable. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - isa_hints - CPU ISA hints to be passed over to the implementation. Pass :ref:`dnnl_cpu_isa_no_hints ` / :ref:`dnnl::cpu_isa_hints::no_hints ` to use default features i.e. no hints. .. rubric:: Returns: :ref:`dnnl_success ` / :ref:`dnnl::status::success ` on success and a :ref:`dnnl_runtime_error ` / :ref:`dnnl::status::runtime_error ` if the ISA hints cannot be specified at the current time. :ref:`dnnl_unimplemented ` / :ref:`dnnl::status::unimplemented ` if the feature was disabled at build time (see :ref:`Build Options ` for more details). .. rubric:: See also: :ref:`CPU ISA Hints ` for more details .. index:: pair: function; dnnl_get_cpu_isa_hints .. _doxid-group__dnnl__api__service_1gad93f9f4bf3c9e12a2be7337b1e41d145: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_cpu_isa_hints_t` DNNL_API dnnl_get_cpu_isa_hints(void) Gets the ISA specific hints that library can follow. See :ref:`dnnl_cpu_isa_hints_t ` and :ref:`dnnl::cpu_isa_hints ` for the list of the values returned by the C and C++ API functions respectively. .. rubric:: Returns: :ref:`dnnl_cpu_isa_hints_t ` value reflecting the ISA specific hints the library can follow. .. rubric:: See also: :ref:`CPU ISA Hints ` for more details .. index:: pair: function; dnnl_set_verbose .. _doxid-group__dnnl__api__service_1ga14cc3b56337322e1e5132c5ee0c84856: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_set_verbose(int level) Configures verbose output to stdout. .. note:: Enabling verbose output affects performance. This setting overrides the ONEDNN_VERBOSE environment variable. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - level - Verbosity level: * 0: no verbose output (default), * 1: primitive and graph information at execution, * 2: primitive and graph information at creation/compilation and execution. .. rubric:: Returns: :ref:`dnnl_invalid_arguments ` / :ref:`dnnl::status::invalid_arguments ` if the ``level`` value is invalid, and :ref:`dnnl_success ` / :ref:`dnnl::status::success ` on success. .. index:: pair: function; dnnl_version .. _doxid-group__dnnl__api__service_1ga73e40d184386e9d9ca917756e76fb232: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`dnnl_version_t` DNNL_API* dnnl_version(void) Returns library version information. .. rubric:: Returns: Pointer to a constant structure containing * major: major version number, * minor: minor version number, * patch: patch release number, * hash: git commit hash. Macros ------ .. index:: pair: define; DNNL_JIT_PROFILE_LINUX_JITDUMP .. _doxid-group__dnnl__api__service_1ga5afb7d615d8507b8d5469553e6dde2a7: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define DNNL_JIT_PROFILE_LINUX_JITDUMP Enable Linux perf integration via jitdump files. .. index:: pair: define; DNNL_JIT_PROFILE_LINUX_JITDUMP_USE_TSC .. _doxid-group__dnnl__api__service_1ga66a48a940ab2916d360b0bb677a70e5f: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define DNNL_JIT_PROFILE_LINUX_JITDUMP_USE_TSC Instruct Linux perf integration via jitdump files to use TSC. :ref:`DNNL_JIT_PROFILE_LINUX_JITDUMP ` must be set too for this to take effect. .. index:: pair: define; DNNL_JIT_PROFILE_LINUX_PERF .. _doxid-group__dnnl__api__service_1ga5a1d61af9d5b15dbc6d7d33f0f3e22bc: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define DNNL_JIT_PROFILE_LINUX_PERF Enable Linux perf integration (both jitdump and perfmap) .. index:: pair: define; DNNL_JIT_PROFILE_LINUX_PERFMAP .. _doxid-group__dnnl__api__service_1gacb5b174589525cce34589ef4ef56462f: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define DNNL_JIT_PROFILE_LINUX_PERFMAP Enable Linux perf integration via perfmap files. .. index:: pair: define; DNNL_JIT_PROFILE_NONE .. _doxid-group__dnnl__api__service_1ga7ceacd6430988ed4bf58f5b01cd9c5a4: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define DNNL_JIT_PROFILE_NONE Disable profiling completely. .. index:: pair: define; DNNL_JIT_PROFILE_VTUNE .. _doxid-group__dnnl__api__service_1ga137013d98ef736973ebbe1ecd4a4b2c9: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define DNNL_JIT_PROFILE_VTUNE Enable VTune Profiler integration.