@Namespace(value="dnnl") public static enum dnnl.scratchpad_mode extends Enum<dnnl.scratchpad_mode>
\addtogroup dnnl_api_attributes A container for parameters that extend primitives behavior. Attributes can also contain Post-ops, which are computations executed after the primitive.
dev_guide_attributes,
dev_guide_attributes_post_ops
\{
Scratchpad mode
| Enum Constant and Description |
|---|
library
The library manages the scratchpad allocation according to the policy
specified by the
DNNL_ENABLE_CONCURRENT_EXEC
[build option](\ref dev_guide_build_options) (default). |
user
The user manages the scratchpad allocation by querying and providing
the scratchpad memory to primitives.
|
| Modifier and Type | Field and Description |
|---|---|
int |
value |
| Modifier and Type | Method and Description |
|---|---|
dnnl.scratchpad_mode |
intern() |
String |
toString() |
static dnnl.scratchpad_mode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static dnnl.scratchpad_mode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final dnnl.scratchpad_mode library
DNNL_ENABLE_CONCURRENT_EXEC
[build option](\ref dev_guide_build_options) (default).
When DNNL_ENABLE_CONCURRENT_EXEC=OFF (default), the library
scratchpad is common to all primitives to reduce the memory footprint.
This configuration comes with limited thread-safety properties, namely
primitives can be created and executed in parallel but cannot migrate
between threads (in other words, each primitive should be executed in
the same thread it was created in).
When DNNL_ENABLE_CONCURRENT_EXEC=ON, the library scratchpad is
private to each primitive. The memory footprint is larger than when
using DNNL_ENABLE_CONCURRENT_EXEC=OFF but different primitives can be
created and run concurrently (the same primitive cannot be run
concurrently from two different threads though).public static final dnnl.scratchpad_mode user
public static dnnl.scratchpad_mode[] values()
for (dnnl.scratchpad_mode c : dnnl.scratchpad_mode.values()) System.out.println(c);
public static dnnl.scratchpad_mode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic dnnl.scratchpad_mode intern()
public String toString()
toString in class Enum<dnnl.scratchpad_mode>Copyright © 2020. All rights reserved.