-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sam Ainsworth
committed
Nov 20, 2016
1 parent
26edc33
commit 6b49f75
Showing
532 changed files
with
40,654 additions
and
2 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,15 @@ | ||
{ | ||
"data_uid": "640f0b9dadc5bfda", | ||
"data_name": "Artifacts to reproduce experiments from CGO 2017 paper by S.Ainsworth and T.M.Jones 'Software Prefetching for Indirect Memory Accesses'", | ||
"dict": { | ||
"url": "https://github.com/SamAinsworth/reproduce-cgo2017-paper", | ||
"shared": "git", | ||
"repo_deps": [ | ||
{ | ||
"repo_uoa": "ck-autotuning" | ||
} | ||
] | ||
}, | ||
"data_alias": "reproduce-cgo2017-paper", | ||
"data_uoa": "reproduce-cgo2017-paper" | ||
} |
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 @@ | ||
032630d041b4fd8a |
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 @@ | ||
1dc07ee0f4742028 |
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 @@ | ||
b0ac08fe1d3c2615 |
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 @@ | ||
84e27ad9dd12e734 |
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 @@ | ||
5e1100048ab875d7 |
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 @@ | ||
module |
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 @@ | ||
package |
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 @@ | ||
soft |
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 @@ | ||
script |
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 @@ | ||
program |
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 |
---|---|---|
@@ -1,2 +1,139 @@ | ||
# reproduce-cgo2017-paper | ||
Artifact Evaluation Reproduction for "Software Prefetching for Indirect Memory Accesses", CGO 2017, using CK. | ||
Auto and crowd-tuning framework for PLUTON library | ||
================================================== | ||
|
||
This repository contains artifacts and workflows | ||
to reproduce experiments from the CGO 2017 paper | ||
by S.Ainsworth and T.M.Jones | ||
"Software Prefetching for Indirect Memory Accesses" | ||
|
||
Hardware pre-requisities | ||
======================== | ||
Any of the following three architectures: | ||
* Intel-based | ||
* ARMv7 | ||
* ARM64 | ||
|
||
Software pre-requisites | ||
======================= | ||
|
||
* Python 2.7 or 3.3+ | ||
* git client | ||
* Collective Knowledge Framework (CK) - http://cKnowledge.org | ||
* All other dependencies will be installed by CK (LLVM 3.9 and plugins) | ||
|
||
You can install above dependencies on Ubuntu via: | ||
``` | ||
$ sudo apt-get install python python-pip git | ||
$ sudo pip install ck | ||
``` | ||
|
||
Installation | ||
============ | ||
|
||
You can install this repository via CK as following: | ||
$ ck pull repo --url=https://github.com/SamAinsworth/reproduce-cgo2017-paper | ||
|
||
You can install LLVM 3.9 via CK as following: | ||
$ ck install package:compiler-llvm-3.9.0-linux-download | ||
|
||
You can install 2 LLVM plugins described in the above paper as following: | ||
$ ck install package:plugin-llvm-sw-prefetch-no-strides-pass | ||
$ ck install package:plugin-llvm-sw-prefetch-pass | ||
|
||
Testing installation | ||
==================== | ||
|
||
You can compile and run one of the benchmarks (NAS CG) with the LLVM plugin as following: | ||
$ ck compile program:nas-cg --speed --env.CK_COMPILATION_TYPE=auto | ||
$ ck run program:nas-cg | ||
|
||
Running experimental workflows (reproducing figures) | ||
==================================================== | ||
|
||
|
||
|
||
TBD add compilation to the experimental workflow: | ||
$ ck compile program:graph500 --speed --env.CK_COMPILATION_TYPE=auto | ||
$ ck compile program:graph500 --speed --env.CK_COMPILATION_TYPE=auto-nostride | ||
$ ck compile program:graph500 --speed --env.CK_COMPILATION_TYPE=man-inorder | ||
$ ck compile program:graph500 --speed --env.CK_COMPILATION_TYPE=man-outoforder | ||
$ ck compile program:graph500 --speed --env.CK_COMPILATION_TYPE=man-inorder-nostride | ||
$ ck compile program:graph500 --speed --env.CK_COMPILATION_TYPE=man-outoforder-nostride | ||
$ ck compile program:graph500 --speed --env.CK_COMPILATION_TYPE=no | ||
|
||
$ ck compile program:hashjoin-ph-2 --env.CK_COMPILATION_TYPE=auto | ||
$ ck compile program:hashjoin-ph-2 --env.CK_COMPILATION_TYPE=auto-nostride | ||
$ ck compile program:hashjoin-ph-2 --env.CK_COMPILATION_TYPE=man | ||
$ ck compile program:hashjoin-ph-2 --env.CK_COMPILATION_TYPE=offset --env.CK_FETCHDIST={2,4,8,16,32,64,128,256} | ||
$ ck compile program:hashjoin-ph-2 --env.CK_COMPILATION_TYPE=no | ||
|
||
$ ck compile program:hashjoin-ph-8 --env.CK_COMPILATION_TYPE=auto | ||
$ ck compile program:hashjoin-ph-8 --env.CK_COMPILATION_TYPE=auto-nostride | ||
$ ck compile program:hashjoin-ph-8 --env.CK_COMPILATION_TYPE=man | ||
$ ck compile program:hashjoin-ph-8 --env.CK_COMPILATION_TYPE=prefetches --env.CK_NUMPREFETCHES={1,2,3,4} | ||
$ ck compile program:hashjoin-ph-8 --env.CK_COMPILATION_TYPE=no | ||
|
||
$ ck compile program:nas-cg --speed --env.CK_COMPILATION_TYPE=auto | ||
$ ck compile program:nas-cg --speed --env.CK_COMPILATION_TYPE=auto-nostride | ||
$ ck compile program:nas-cg --speed --env.CK_COMPILATION_TYPE=man | ||
$ ck compile program:nas-cg --speed --env.CK_COMPILATION_TYPE=offset --env.CK_FETCHDIST={2,4,8,16,32,64,128,256,2048} | ||
$ ck compile program:nas-cg --speed --env.CK_COMPILATION_TYPE=offset-64-nostride | ||
$ ck compile program:nas-cg --speed --env.CK_COMPILATION_TYPE=no | ||
|
||
$ ck compile program:nas-is --speed --env.CK_COMPILATION_TYPE=auto | ||
$ ck compile program:nas-is --speed --env.CK_COMPILATION_TYPE=auto-nostride | ||
$ ck compile program:nas-is --speed --env.CK_COMPILATION_TYPE=man | ||
$ ck compile program:nas-is --speed --env.CK_COMPILATION_TYPE=offset --env.CK_FETCHDIST={2,4,8,16,32,64,128,256,2048} | ||
$ ck compile program:nas-is --speed --env.CK_COMPILATION_TYPE=offset-64-nostride | ||
$ ck compile program:nas-is --speed --env.CK_COMPILATION_TYPE=no | ||
|
||
$ ck compile program:randacc --speed --env.CK_COMPILATION_TYPE=auto | ||
$ ck compile program:randacc --speed --env.CK_COMPILATION_TYPE=auto-nostride | ||
$ ck compile program:randacc --speed --env.CK_COMPILATION_TYPE=man | ||
$ ck compile program:randacc --speed --env.CK_COMPILATION_TYPE=offset --env.CK_FETCHDIST={2,4,8,16,32,64,128,256} | ||
$ ck compile program:randacc --speed --env.CK_COMPILATION_TYPE=offset-32-nostride | ||
$ ck compile program:randacc --speed --env.CK_COMPILATION_TYPE=no | ||
|
||
|
||
Compare with pre-recorded results (expected) | ||
|
||
If unexpected behavior, report the author | ||
|
||
Jupyter notebook | ||
|
||
Manual validation (if problems with CK) | ||
======================================= | ||
|
||
for x86-64: | ||
|
||
$cd script/reproduce-cgo2017-paper | ||
|
||
To compile: | ||
|
||
$./compile_x86.sh | ||
|
||
To run: | ||
|
||
$./run_x86.sh | ||
|
||
for ARM64: | ||
|
||
cross compilation for ARM64 on an x86-64 machine: | ||
|
||
$cd script/reproduce-cgo2017-paper | ||
$./compile_aarch64.sh | ||
|
||
running on an ARM64 machine: | ||
|
||
$cd script/reproduce-cgo2017-paper | ||
$./run_arm.sh | ||
|
||
Recompilation should not be necessary, as all binaries are included, but is provided as an option. | ||
|
||
Authors | ||
======= | ||
S.Ainsworth and T.M.Jones | ||
|
||
Acknowledgments | ||
=============== | ||
This work was supported by the Engineering and Physical Sciences Research Council (EPSRC), through grant references EP/K026399/1 and EP/M506485/1, and ARM Ltd. |
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 @@ | ||
be5044a069071727 |
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 @@ | ||
experiment-cgo2017 |
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 @@ | ||
{} |
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,21 @@ | ||
{ | ||
"backup_data_uid": "be5044a069071727", | ||
"backup_module_uid": "032630d041b4fd8a", | ||
"backup_module_uoa": "module", | ||
"control": { | ||
"author": "", | ||
"author_email": "", | ||
"author_webpage": "", | ||
"copyright": "", | ||
"engine": "CK", | ||
"iso_datetime": "2016-11-18T13:22:27.411345", | ||
"license": "", | ||
"version": [ | ||
"1", | ||
"8", | ||
"4", | ||
"2" | ||
] | ||
}, | ||
"data_name": "experiment-cgo2017" | ||
} |
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,13 @@ | ||
{ | ||
"actions": { | ||
"reproduce": { | ||
"desc": "reproduce experiment" | ||
} | ||
}, | ||
"copyright": "", | ||
"desc": "Reproducing experiment from CGO2017 paper", | ||
"developer": "", | ||
"developer_email": "", | ||
"developer_webpage": "", | ||
"license": "" | ||
} |
Binary file not shown.
Binary file not shown.
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,71 @@ | ||
# | ||
# Collective Knowledge (Reproducing experiment from CGO2017 paper) | ||
# | ||
# See CK LICENSE.txt for licensing details | ||
# See CK COPYRIGHT.txt for copyright details | ||
# | ||
# Developer: cTuning foundation, admin@cTuning.org, http://cTuning.org | ||
# | ||
|
||
cfg={} # Will be updated by CK (meta description of this module) | ||
work={} # Will be updated by CK (temporal data) | ||
ck=None # Will be updated by CK (initialized CK kernel) | ||
|
||
# Local settings | ||
|
||
############################################################################## | ||
# Initialize module | ||
|
||
def init(i): | ||
""" | ||
Input: {} | ||
Output: { | ||
return - return code = 0, if successful | ||
> 0, if error | ||
(error) - error text if return > 0 | ||
} | ||
""" | ||
return {'return':0} | ||
|
||
############################################################################## | ||
# reproduce experiment | ||
|
||
def reproduce(i): | ||
""" | ||
Input: { | ||
} | ||
Output: { | ||
return - return code = 0, if successful | ||
> 0, if error | ||
(error) - error text if return > 0 | ||
} | ||
""" | ||
|
||
import os | ||
os.environ['CK_FETCHDIST']="32" | ||
|
||
r=ck.access({"action":"compile", | ||
"module_uoa":"program", | ||
"data_uoa":"randacc-swpf", | ||
"out":"con"}) | ||
if r['return']>0: return r | ||
|
||
r=ck.access({"action":"run", | ||
"module_uoa":"program", | ||
"data_uoa":"randacc-swpf", | ||
"out":"con"}) | ||
if r['return']>0: return r | ||
|
||
# import json | ||
# print (json.dumps(r,indent=2)) | ||
exec_time=r['characteristics']['total_execution_time'] | ||
|
||
ck.out('') | ||
ck.out('Total execution time via CK: '+str(exec_time)) | ||
|
||
return {'return':0} |
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 @@ | ||
4339bd3b6b127b43 |
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 @@ | ||
3468db6b2578ff7d |
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 @@ | ||
plugin-llvm-sw-prefetch-pass |
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 @@ | ||
plugin-llvm-sw-prefetch-no-strides-pass |
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 @@ | ||
{} |
21 changes: 21 additions & 0 deletions
21
package/plugin-llvm-sw-prefetch-no-strides-pass/.cm/info.json
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,21 @@ | ||
{ | ||
"backup_data_uid": "4339bd3b6b127b43", | ||
"backup_module_uid": "1dc07ee0f4742028", | ||
"backup_module_uoa": "package", | ||
"control": { | ||
"author": "", | ||
"author_email": "", | ||
"author_webpage": "", | ||
"copyright": "", | ||
"engine": "CK", | ||
"iso_datetime": "2016-11-19T15:35:07.750211", | ||
"license": "", | ||
"version": [ | ||
"1", | ||
"8", | ||
"4", | ||
"2" | ||
] | ||
}, | ||
"data_name": "plugin-llvm-sw-prefetch-no-stides-pass" | ||
} |
36 changes: 36 additions & 0 deletions
36
package/plugin-llvm-sw-prefetch-no-strides-pass/.cm/meta.json
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,36 @@ | ||
{ | ||
"customize": { | ||
"env_extra": "_SW_PREFETCH_NO_STRIDES_PASS", | ||
"extra_dir": "", | ||
"version": "0.1", | ||
"install_env": { | ||
"CK_PLUGIN_OUT": "SwPrefetchPass_noStrides", | ||
"CK_NO_STRIDES": "1" | ||
} | ||
}, | ||
"deps": { | ||
"compiler": { | ||
"local": "yes", | ||
"name": "C++ compiler", | ||
"tags": "compiler,lang-cpp,llvm" | ||
} | ||
}, | ||
"end_full_path": { | ||
"android": "lib$#sep#$SwPrefetchPass_noStrides.so", | ||
"linux": "lib/SwPrefetchPass_noStrides.so", | ||
"mingw": "lib\\SwPrefetchPass_noStrides.so", | ||
"win": "lib\\SwPrefetchPass_noStrides.so" | ||
}, | ||
"process_script": "compile", | ||
"soft_uoa": "cb5940a8eba4fe8b", | ||
"suggested_path": "plugin-llvm-sw-prefetch-no-strides-pass", | ||
"tags": [ | ||
"plugin", | ||
"compiler-plugin", | ||
"llvm", | ||
"sw-prefetch-no-strides-pass" | ||
], | ||
"use_scripts_from_another_entry": { | ||
"data_uoa": "3468db6b2578ff7d" | ||
} | ||
} |
Binary file added
BIN
+1.51 MB
package/plugin-llvm-sw-prefetch-no-strides-pass/lib/SwPrefetchPass_noStrides.so
Binary file not shown.
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 @@ | ||
{} |
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,21 @@ | ||
{ | ||
"backup_data_uid": "3468db6b2578ff7d", | ||
"backup_module_uid": "1dc07ee0f4742028", | ||
"backup_module_uoa": "package", | ||
"control": { | ||
"author": "", | ||
"author_email": "", | ||
"author_webpage": "", | ||
"copyright": "", | ||
"engine": "CK", | ||
"iso_datetime": "2016-11-18T20:21:48.341962", | ||
"license": "", | ||
"version": [ | ||
"1", | ||
"8", | ||
"4", | ||
"2" | ||
] | ||
}, | ||
"data_name": "llvm-plugin-sw-prefetch-pass" | ||
} |
Oops, something went wrong.