Developer Guide and Reference

  • 2022.1
  • 04/11/2022
  • Public Content
Contents

Primitive Cache

Overview

A set of functions that provide primitive cache control. More…

Detailed Documentation

A set of functions that provide primitive cache control.
Global Functions
int dnnl::get_primitive_cache_capacity()
Returns the number of primitives that can be held in the primitive cache at the same time.
void dnnl::set_primitive_cache_capacity(int capacity)
Sets a number of primitives that can be held in the primitive cache at a time.
Parameters:
capacity
Primitive cache capacity to set. If a new
capacity
is less than a number of primitives that the primitive cache already has then the excess entries will be evicted. Setting the
capacity
to 0 clears the primitive cache and disables it. Concurrently modifying
capacity
is safe.
Returns:
dnnl_status_t DNNL_API dnnl_get_primitive_cache_capacity(int* capacity)
Returns the number of primitives that can be held in the primitive cache at the same time.
Parameters:
capacity
Primitive cache capacity to query. Concurrently accessing
capacity
is safe.
Returns:
dnnl_status_t DNNL_API dnnl_set_primitive_cache_capacity(int capacity)
Sets a number of primitives that can be held in the primitive cache at a time.
Parameters:
capacity
Primitive cache capacity to set. If a new
capacity
is less than a number of primitives that the primitive cache already has then the excess entries will be evicted. Setting the
capacity
to 0 clears the primitive cache and disables it. Concurrently modifying
capacity
is safe.
Returns:

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.