|
HEBench
|
This operation is defined as:
where
is the standard vector element-wise addition.
Input: 2 parameters
| Parameter | Description |
|---|---|
0 | A is a vector with n components. |
1 | B is a vector with n components. |
Output: 1 output
| Output | Description |
|---|---|
0 | C is a vector with n components. It is the result of adding A and B. |
If Z[i] denotes the element at component i in vector Z, then, the standard element-wise addition operation is defined as:
This document applies to the following workloads:
Required workload parameters: 1
| Index | Name | Type | Description |
|---|---|---|---|
0 | n | uint64_t | Number of components in a vector. |
Above parameters are required for the workload in the specified order. A backend must specify, at least, a set of default arguments for these parameters.
Backends can require extra parameters beyond the base requirements. If a backend requires extra parameters, these must have default values in every set of default arguments for the workload parameters.
This workload supports the following categories:
See Latency Category .
See Offline Category .
Value ranges for elements in CategoryParams::offline::data_count. Default value is used when the backend implementation sets the data_count for the corresponding operand to 0, but user specified 0 or no value at run-time.
| Parameter | Lower bound | Upper bound | Default |
|---|---|---|---|
0 | 1 | none | 5 |
1 | 1 | none | 5 |
This workload is defined for the following data types:
All scalar elements in a vector with elements of type T (where T is any of the supported types) lie contiguous in memory.
For example, given the following vector A with n = 3 components:
The elements will be stored in memory as:
| Offset: | 0 | 1 | 2 |
|---|---|---|---|
| A | a0 | a1 | a2 |
Backends should expect this layout for their raw, clear text inputs, and must generate this layout for their decoded outputs.
If several vectors will be pointed at by a single pointer, consecutive vectors will follow each other in memory.
Supported modes:
| Generate | External |
|---|---|
| yes | yes |
Data generation for vectors used as input for this workload occurs during workload initialization by Test Harness. Ground truths are pre-computed during data generation. There is no standard dataset.
During data generation, all vector elements are extracted from a pseudo-random uniform distribution between -10 and 10: u(-10, 10).