-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
experimental_offload: Add atax, correlation and covariance
- Loading branch information
Showing
14 changed files
with
654 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright 2024 ETH Zurich and University of Bologna. | ||
// Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
{ | ||
M: 16, | ||
N: ${N} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright 2024 ETH Zurich and University of Bologna. | ||
// Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
{ | ||
M: 16, | ||
N: 8 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright 2024 ETH Zurich and University of Bologna. | ||
// Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
{ | ||
M: 16, | ||
N: 8 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
[ | ||
// CVA6 core | ||
{ | ||
"thread": "hart_0", | ||
"roi": [ | ||
// Iteration 1 | ||
{"idx": 1, "label": "prepare data"}, | ||
{"idx": 2, "label": "send interrupt"}, | ||
{"idx": 4, "label": "clr interrupt"}, | ||
// Iteration 2 | ||
{"idx": 5, "label": "prepare data"}, | ||
{"idx": 6, "label": "send interrupt"}, | ||
{"idx": 8, "label": "clr interrupt"} | ||
] | ||
}, | ||
|
||
// Snitch clusters | ||
% for i in range(0, nr_clusters): | ||
|
||
// Compute cores | ||
% for j in range(0, 8): | ||
{ | ||
"thread": "${f'hart_{1 + 9*i + j}'}", | ||
"roi": [ | ||
// Iteration 1 | ||
{"idx": 1, "label": "clr interrupt"}, | ||
{"idx": 2, "label": "job setup"}, | ||
{"idx": 3, "label": "barrier"}, | ||
{"idx": 4, "label": "Ax"}, | ||
{"idx": 5, "label": "barrier"}, | ||
{"idx": 6, "label": "AtAx"}, | ||
{"idx": 7, "label": "barrier"}, | ||
// Iteration 2 | ||
{"idx": 10, "label": "clr interrupt"}, | ||
{"idx": 11, "label": "job setup"}, | ||
{"idx": 12, "label": "barrier"}, | ||
{"idx": 13, "label": "Ax"}, | ||
{"idx": 14, "label": "barrier"}, | ||
{"idx": 15, "label": "AtAx"}, | ||
{"idx": 16, "label": "barrier"}, | ||
] | ||
}, | ||
% endfor | ||
|
||
// DMA cores | ||
{ | ||
"thread": "${f'hart_{1 + 9*i + 8}'}", | ||
"roi": [ | ||
// Iteration 1 | ||
{"idx": 1, "label": "clr interrupt"}, | ||
{"idx": 2, "label": "get job ptr"}, | ||
{"idx": 3, "label": "get job args"}, | ||
{"idx": 4, "label": "copy data in"}, | ||
{"idx": 5, "label": "barrier"}, | ||
{"idx": 6, "label": "copy data out"}, | ||
{"idx": 7, "label": "return"}, | ||
// Iteration 2 | ||
{"idx": 10, "label": "clr interrupt"}, | ||
{"idx": 11, "label": "get job ptr"}, | ||
{"idx": 12, "label": "get job args"}, | ||
{"idx": 13, "label": "copy data in"}, | ||
{"idx": 14, "label": "barrier"}, | ||
{"idx": 15, "label": "copy data out"}, | ||
{"idx": 16, "label": "return"}, | ||
] | ||
}, | ||
|
||
// DMA engine proper | ||
% if i == 0 or multicast: | ||
{ | ||
"thread": "${f'dma_{1 + 9*i + 8}'}", | ||
"roi": [ | ||
// Iteration 1 | ||
{"idx": -10, "label": "A in"}, | ||
{"idx": -9, "label": "x in"}, | ||
{"idx": -8, "label": "y tile in"}, | ||
{"idx": -7, "label": "tmp in"}, | ||
{"idx": -6, "label": "y out"}, | ||
// Iteration 2 | ||
{"idx": -5, "label": "A in"}, | ||
{"idx": -4, "label": "x in"}, | ||
{"idx": -3, "label": "y tile in"}, | ||
{"idx": -2, "label": "tmp in"}, | ||
{"idx": -1, "label": "y out"}, | ||
] | ||
}, | ||
% else: | ||
{ | ||
"thread": "${f'dma_{1 + 9*i + 8}'}", | ||
"roi": [ | ||
// Iteration 1 | ||
{"idx": -12, "label": "job info"}, | ||
{"idx": -11, "label": "A in"}, | ||
{"idx": -10, "label": "x in"}, | ||
{"idx": -9, "label": "y tile in"}, | ||
{"idx": -8, "label": "tmp in"}, | ||
{"idx": -7, "label": "y out"}, | ||
// Iteration 2 | ||
{"idx": -6, "label": "job info"}, | ||
{"idx": -5, "label": "A in"}, | ||
{"idx": -4, "label": "x in"}, | ||
{"idx": -3, "label": "y tile in"}, | ||
{"idx": -2, "label": "tmp in"}, | ||
{"idx": -1, "label": "y out"}, | ||
] | ||
}, | ||
% endif | ||
% endfor | ||
] |
106 changes: 106 additions & 0 deletions
106
target/sim/experiments/offload/roi/correlation.json.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
[ | ||
// CVA6 core | ||
{ | ||
"thread": "hart_0", | ||
"roi": [ | ||
// Iteration 1 | ||
{"idx": 1, "label": "prepare data"}, | ||
{"idx": 2, "label": "send interrupt"}, | ||
{"idx": 4, "label": "clr interrupt"}, | ||
// Iteration 2 | ||
{"idx": 5, "label": "prepare data"}, | ||
{"idx": 6, "label": "send interrupt"}, | ||
{"idx": 8, "label": "clr interrupt"} | ||
] | ||
}, | ||
|
||
// Snitch clusters | ||
% for i in range(0, nr_clusters): | ||
|
||
// Compute cores | ||
% for j in range(0, 8): | ||
{ | ||
"thread": "${f'hart_{1 + 9*i + j}'}", | ||
"roi": [ | ||
## Only cluster 0 computes step 2 | ||
% if i == 0: | ||
// Iteration 1 | ||
{"idx": 1, "label": "clr interrupt"}, | ||
{"idx": 2, "label": "job setup"}, | ||
{"idx": 3, "label": "barrier"}, | ||
{"idx": 4, "label": "compute step 1"}, | ||
{"idx": 5, "label": "barrier"}, | ||
{"idx": 6, "label": "compute step 2"}, | ||
{"idx": 7, "label": "barrier"}, | ||
// Iteration 2 | ||
{"idx": 10, "label": "clr interrupt"}, | ||
{"idx": 11, "label": "job setup"}, | ||
{"idx": 12, "label": "barrier"}, | ||
{"idx": 13, "label": "compute step 1"}, | ||
{"idx": 14, "label": "barrier"}, | ||
{"idx": 15, "label": "compute step 2"}, | ||
{"idx": 16, "label": "barrier"}, | ||
% else: | ||
// Iteration 1 | ||
{"idx": 1, "label": "clr interrupt"}, | ||
{"idx": 2, "label": "job setup"}, | ||
{"idx": 3, "label": "barrier"}, | ||
{"idx": 4, "label": "compute step 1"}, | ||
{"idx": 5, "label": "barrier"}, | ||
// Iteration 2 | ||
{"idx": 8, "label": "clr interrupt"}, | ||
{"idx": 9, "label": "job setup"}, | ||
{"idx": 10, "label": "barrier"}, | ||
{"idx": 11, "label": "compute step 1"}, | ||
{"idx": 12, "label": "barrier"}, | ||
% endif | ||
] | ||
}, | ||
% endfor | ||
|
||
// DMA cores | ||
{ | ||
"thread": "${f'hart_{1 + 9*i + 8}'}", | ||
"roi": [ | ||
## Cluster 0's DMA core aggregates the data from step 1 | ||
% if i == 0: | ||
// Iteration 1 | ||
{"idx": 1, "label": "clr interrupt"}, | ||
{"idx": 2, "label": "get job ptr"}, | ||
{"idx": 3, "label": "get job args"}, | ||
{"idx": 4, "label": "copy data in"}, | ||
{"idx": 5, "label": "barrier"}, | ||
{"idx": 6, "label": "copy step1 data"}, | ||
{"idx": 7, "label": "barrier"}, | ||
{"idx": 8, "label": "copy data out"}, | ||
{"idx": 9, "label": "return"}, | ||
// Iteration 2 | ||
{"idx": 12, "label": "clr interrupt"}, | ||
{"idx": 13, "label": "get job ptr"}, | ||
{"idx": 14, "label": "get job args"}, | ||
{"idx": 15, "label": "copy data in"}, | ||
{"idx": 16, "label": "barrier"}, | ||
{"idx": 17, "label": "copy step1 data"}, | ||
{"idx": 18, "label": "barrier"}, | ||
{"idx": 19, "label": "copy data out"}, | ||
{"idx": 20, "label": "return"}, | ||
% else: | ||
// Iteration 1 | ||
{"idx": 1, "label": "clr interrupt"}, | ||
{"idx": 2, "label": "get job ptr"}, | ||
{"idx": 3, "label": "get job args"}, | ||
{"idx": 4, "label": "copy data in"}, | ||
{"idx": 5, "label": "barrier"}, | ||
{"idx": 6, "label": "return"}, | ||
// Iteration 2 | ||
{"idx": 9, "label": "clr interrupt"}, | ||
{"idx": 10, "label": "get job ptr"}, | ||
{"idx": 11, "label": "get job args"}, | ||
{"idx": 12, "label": "copy data in"}, | ||
{"idx": 13, "label": "barrier"}, | ||
{"idx": 14, "label": "return"}, | ||
% endif | ||
] | ||
}, | ||
% endfor | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
[ | ||
// CVA6 core | ||
{ | ||
"thread": "hart_0", | ||
"roi": [ | ||
// Iteration 1 | ||
{"idx": 1, "label": "prepare data"}, | ||
{"idx": 2, "label": "send interrupt"}, | ||
{"idx": 4, "label": "clr interrupt"}, | ||
// Iteration 2 | ||
{"idx": 5, "label": "prepare data"}, | ||
{"idx": 6, "label": "send interrupt"}, | ||
{"idx": 8, "label": "clr interrupt"} | ||
] | ||
}, | ||
|
||
// Snitch clusters | ||
% for i in range(0, nr_clusters): | ||
|
||
// Compute cores | ||
% for j in range(0, 8): | ||
{ | ||
"thread": "${f'hart_{1 + 9*i + j}'}", | ||
"roi": [ | ||
## Only cluster 0 computes step 2 | ||
% if i == 0: | ||
// Iteration 1 | ||
{"idx": 1, "label": "clr interrupt"}, | ||
{"idx": 2, "label": "job setup"}, | ||
{"idx": 3, "label": "barrier"}, | ||
{"idx": 4, "label": "compute step 1"}, | ||
{"idx": 5, "label": "barrier"}, | ||
{"idx": 6, "label": "compute step 2"}, | ||
{"idx": 7, "label": "barrier"}, | ||
// Iteration 2 | ||
{"idx": 10, "label": "clr interrupt"}, | ||
{"idx": 11, "label": "job setup"}, | ||
{"idx": 12, "label": "barrier"}, | ||
{"idx": 13, "label": "compute step 1"}, | ||
{"idx": 14, "label": "barrier"}, | ||
{"idx": 15, "label": "compute step 2"}, | ||
{"idx": 16, "label": "barrier"}, | ||
% else: | ||
// Iteration 1 | ||
{"idx": 1, "label": "clr interrupt"}, | ||
{"idx": 2, "label": "job setup"}, | ||
{"idx": 3, "label": "barrier"}, | ||
{"idx": 4, "label": "compute step 1"}, | ||
{"idx": 5, "label": "barrier"}, | ||
// Iteration 2 | ||
{"idx": 8, "label": "clr interrupt"}, | ||
{"idx": 9, "label": "job setup"}, | ||
{"idx": 10, "label": "barrier"}, | ||
{"idx": 11, "label": "compute step 1"}, | ||
{"idx": 12, "label": "barrier"}, | ||
% endif | ||
] | ||
}, | ||
% endfor | ||
|
||
// DMA cores | ||
{ | ||
"thread": "${f'hart_{1 + 9*i + 8}'}", | ||
"roi": [ | ||
## Cluster 0's DMA core aggregates the data from step 1 | ||
% if i == 0: | ||
// Iteration 1 | ||
{"idx": 1, "label": "clr interrupt"}, | ||
{"idx": 2, "label": "get job ptr"}, | ||
{"idx": 3, "label": "get job args"}, | ||
{"idx": 4, "label": "copy data in"}, | ||
{"idx": 5, "label": "barrier"}, | ||
{"idx": 6, "label": "copy step1 data"}, | ||
{"idx": 7, "label": "barrier"}, | ||
{"idx": 8, "label": "copy data out"}, | ||
{"idx": 9, "label": "return"}, | ||
// Iteration 2 | ||
{"idx": 12, "label": "clr interrupt"}, | ||
{"idx": 13, "label": "get job ptr"}, | ||
{"idx": 14, "label": "get job args"}, | ||
{"idx": 15, "label": "copy data in"}, | ||
{"idx": 16, "label": "barrier"}, | ||
{"idx": 17, "label": "copy step1 data"}, | ||
{"idx": 18, "label": "barrier"}, | ||
{"idx": 19, "label": "copy data out"}, | ||
{"idx": 20, "label": "return"}, | ||
% else: | ||
// Iteration 1 | ||
{"idx": 1, "label": "clr interrupt"}, | ||
{"idx": 2, "label": "get job ptr"}, | ||
{"idx": 3, "label": "get job args"}, | ||
{"idx": 4, "label": "copy data in"}, | ||
{"idx": 5, "label": "barrier"}, | ||
{"idx": 6, "label": "return"}, | ||
// Iteration 2 | ||
{"idx": 9, "label": "clr interrupt"}, | ||
{"idx": 10, "label": "get job ptr"}, | ||
{"idx": 11, "label": "get job args"}, | ||
{"idx": 12, "label": "copy data in"}, | ||
{"idx": 13, "label": "barrier"}, | ||
{"idx": 14, "label": "return"}, | ||
% endif | ||
] | ||
}, | ||
% endfor | ||
] |
Oops, something went wrong.