.. index:: pair: group; Compiled Partition Cache .. _doxid-group__dnnl__graph__api__compiled__partition__cache: Compiled Partition Cache ======================== .. toctree:: :hidden: Overview ~~~~~~~~ A set of functions that provide compiled partition cache control. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // global functions int :ref:`dnnl::graph::get_compiled_partition_cache_capacity`(); void :ref:`dnnl::graph::set_compiled_partition_cache_capacity`(int capacity); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_graph_get_compiled_partition_cache_capacity`(int* capacity); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_graph_set_compiled_partition_cache_capacity`(int capacity); .. _details-group__dnnl__graph__api__compiled__partition__cache: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A set of functions that provide compiled partition cache control. Global Functions ---------------- .. index:: pair: function; get_compiled_partition_cache_capacity .. _doxid-group__dnnl__graph__api__compiled__partition__cache_1ga6a1bba962b6499e55ba1fb81692d04b7: .. ref-code-block:: cpp :class: doxyrest-title-code-block int dnnl::graph::get_compiled_partition_cache_capacity() Returns the number of compiled partition that can be held in the compiled partition cache at the same time. .. index:: pair: function; set_compiled_partition_cache_capacity .. _doxid-group__dnnl__graph__api__compiled__partition__cache_1ga2260760847caf233f319967e73811319: .. ref-code-block:: cpp :class: doxyrest-title-code-block void dnnl::graph::set_compiled_partition_cache_capacity(int capacity) Sets a number of compiled partitions that can be held in the compiled partition cache at the same time. The default capacity of compiled partition cache is 1024. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - capacity - Compiled partition cache capacity to set. The default cache capacity is 1024. If a new ``capacity`` is less than a number of compiled partition that the compiled partition cache already has, then the excess entries will be evicted. Setting the ``capacity`` to 0 clears the compiled partition cache and disables it. Concurrently modifying ``capacity`` is safe. .. rubric:: Returns: :ref:`dnnl_invalid_arguments ` if the ``capacity`` value is invalid, and :ref:`dnnl_success ` on success. .. index:: pair: function; dnnl_graph_get_compiled_partition_cache_capacity .. _doxid-group__dnnl__graph__api__compiled__partition__cache_1ga341079185a3e263dc490a8d24d0fdc94: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_graph_get_compiled_partition_cache_capacity(int* capacity) Returns the number of compiled partitions that can be held in the compiled partition cache at the same time. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - capacity - Compiled partition cache capacity to query. Concurrently accessing ``capacity`` is safe. .. rubric:: Returns: :ref:`dnnl_invalid_arguments ` if the ``capacity`` value is invalid, and :ref:`dnnl_success ` on success. .. index:: pair: function; dnnl_graph_set_compiled_partition_cache_capacity .. _doxid-group__dnnl__graph__api__compiled__partition__cache_1gabed28f32f3f39e2b4053c5b53620a292: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_graph_set_compiled_partition_cache_capacity(int capacity) Sets a number of compiled partitions that can be held in the compiled partition cache at the same time. The default capacity of compiled partition cache is 1024. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - capacity - Compiled partition cache capacity to set. The default cache capacity is 1024. If a new ``capacity`` is less than a number of compiled partition that the compiled partition cache already has, then the excess entries will be evicted. Setting the ``capacity`` to 0 clears the compiled partition cache and disables it. Concurrently modifying ``capacity`` is safe. .. rubric:: Returns: :ref:`dnnl_invalid_arguments ` if the ``capacity`` value is invalid, and :ref:`dnnl_success ` on success.