-
Notifications
You must be signed in to change notification settings - Fork 15
Using Traces with Spatter
Ideally, to accurately represent realistic scatter/gather workloads we want to be able to use trace patterns as inputs to drive a stream of S/G operations.
To be updated.
A pattern is a particular type of scatter/gather operation and its related metadata. A trace includes a stream of patterns and their ordering.
Currently we use a basic pattern for trace inputs to Spatter.
The first line of the file has one number:
- num_instructions - the number of specific instructions where each instruction corresponds to a pattern of accesses.
The next lines of the file have values for each instruction:
- Gather (0) or Scatter (1)
- data_type_size_bytes - a per-instruction value for data type sizes; the default is 8 bytes for doubles
- count - number of times instruction shows up
- percent - frequency within a measured segment, gets reweighted to 100% if values are truncated
- length - number of elements in the instruction pattern.
- delta_from_previous - the relative delta from the previous instruction pattern's beginning; note that instruction patterns can overlap memory regions scattered or gathered.
- deltas - delta between each element access index in the instruction pattern
Sample Input Trace Configuration:
# Read in five instructions
5
#Scatter instruction with 8B data types, 24.45% of the total S/G execution, 16 elements in the instruction pattern, 0 element previous_delta, 16 element deltas
1 8 961833 24.4548 16 0 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192
0 8 865812 22.0134 16 8 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192
0 8 763936 19.4232 16 8 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64
#Note that the second element indicates that 4 Byte data types are used for this instruction
#Gather instruction with 4B data types, 15.61% of the total S/G execution, 16 elements in the instruction pattern, 8 element previous_delta, 8 element deltas
0 4 613848 15.6072 16 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
1 4 574650 14.6106 16 8 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64
Understanding delta values: Visualized as an array for the first instruction, this means we are accessing 16 different elements where each element starts at 192 Bytes divided by the data type lengh, in this case 8 byte doubles.
a[0] = 1.0
a[192/8] = 2.0
a[384/8] = 3.0
etc..
For the previous delta, we are indicating where a new instruction pattern starts in relation to the last executed instruction. Following the example above:
Instruction 1:
scatter(a[0],a[count])
#Instruction 2:
gather(a[8*8],a[64+count])