Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AIWC #201

Open
wants to merge 203 commits into
base: master
Choose a base branch
from
Open

AIWC #201

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
c4f6164
added workload characterisation tool
BeauJoh Nov 9, 2017
2e23416
added another metric to aiwc to determine the number of work-items cr…
BeauJoh Nov 23, 2017
9b8f848
moved the metric logged to the top of the csv output
BeauJoh Nov 23, 2017
fc3192c
added partial support for barrier and parallelism events
BeauJoh Dec 24, 2017
6c46397
corrected the ILP metrics by added new callback notifications around …
BeauJoh Dec 27, 2017
d5e319d
added simd metrics
BeauJoh Dec 29, 2017
fa824af
updated the csv writer
BeauJoh Dec 29, 2017
1b7dec7
added granularity, barriers per instruction and instructions per oper…
BeauJoh Jan 3, 2018
0197c20
a slight reduction in the memory footprint and also added some more m…
BeauJoh Jan 5, 2018
b962148
added fix to avoid segfault where the collected branch history is sma…
BeauJoh Jan 16, 2018
13c3b75
fixed the segmentation fault where the associativety of subtracting m…
BeauJoh Jan 26, 2018
dcf8dce
fix to just keep track of conditional branches
BeauJoh Jan 27, 2018
fcfc505
fixed potential nan value to be zero -- if no branches are taken in a…
BeauJoh Jan 27, 2018
02c7e8b
fixed memory access to use actual addresses instead of just offsets i…
BeauJoh Aug 29, 2018
f0295bf
added include to numeric for vector accumulate and reduction functions
BeauJoh Sep 11, 2018
132a17b
added metrics to compute load imbalance calculations
BeauJoh Oct 5, 2018
a3da741
started adding hooks for the communication and divergence metrics
BeauJoh Oct 12, 2018
6f3909f
added memory transfer / syncronization counter functionality. These n…
BeauJoh Oct 15, 2018
8145453
started added unique label count -- problem encountered that not all …
BeauJoh Oct 20, 2018
d69b0d4
changes add segfault
BeauJoh Oct 23, 2018
82bdb93
added freedom to reorder and resource pressure metrics
BeauJoh Oct 25, 2018
3e0a786
fixed bug with host-to-device memory transfer count name
Dec 1, 2018
882bf2e
added documentation for aiwc
Jan 18, 2019
2ccbf2c
Merge branch 'master' of https://github.com/BeauJoh/Oclgrind
Jan 18, 2019
5a03815
added support for dynamically linking against shared LLVM libraries
BeauJoh May 10, 2019
92fa3de
AIWC: don't store size of memory ops; fix bug in local memory entropy
milthorpe May 22, 2019
680386b
compute memory entropies in double precision to avoid rounding error
milthorpe May 22, 2019
57e640c
store SIMD width as histogram, rather than per-instruction
milthorpe May 24, 2019
73b4ee6
fix bug in calculation of granularity; reorder output
milthorpe May 24, 2019
24658ca
added shared and private memory access metrics
BeauJoh Jul 31, 2019
e195bc5
Merge branch 'master' of https://github.com/BeauJoh/Oclgrind
milthorpe Aug 8, 2019
ef802cf
merge from upstream
milthorpe Aug 28, 2019
7215e7c
document dependency on GNU readline
milthorpe Aug 28, 2019
eaf3e27
clean up formatting of AIWC text output
milthorpe Aug 30, 2019
bfba0a0
fix calculation of Barriers per Instruction and memory diversity
milthorpe Aug 30, 2019
9ddad42
format code
milthorpe Aug 30, 2019
db4d06d
compress reporting of min/max/median/mean/stdev for a single feature
milthorpe Sep 13, 2019
b134736
don't count private memory accesses
milthorpe Sep 21, 2019
9b07d0c
remove ITB, load/store instruction label log files
milthorpe Sep 25, 2019
325609a
fix bugs in calculation of branch and memory entropy
milthorpe Sep 25, 2019
6a9a4fd
clean up memory address space recording
milthorpe Sep 25, 2019
ba4964c
ClangFormat
milthorpe Sep 25, 2019
656aab8
use explicit-width int types
milthorpe Sep 25, 2019
5189dd8
brought in Joshs fixes from ANU-HPC, while keeping the LLVM version f…
BeauJoh Oct 28, 2019
ce6fb57
updated readme to include AIWC
BeauJoh Oct 30, 2019
db08bbd
updated readme -- mark II
BeauJoh Oct 30, 2019
a4c6d5f
updated readme -- mark III
BeauJoh Oct 30, 2019
a7c40a0
updated readme -- mark IV
BeauJoh Oct 30, 2019
2309d12
Merge branch 'master' of https://github.com/jrprice/Oclgrind
milthorpe Nov 1, 2019
c6ec915
Added Parallel Spatial Locality (beta), memory footprint metrics -- u…
Dec 4, 2019
8ec1e61
Revert "Added Parallel Spatial Locality (beta), memory footprint metr…
Dec 4, 2019
1845b7f
Revert "Revert "Added Parallel Spatial Locality (beta), memory footpr…
Dec 4, 2019
b57ebbd
Fixed PSL calculation bug
Dec 10, 2019
9f330b6
Fixes to AIWC psl metric
Aditya-Chilukuri Jan 26, 2020
25d70d3
pulled in Adi\'s metrics and fixes
Jan 28, 2020
b48d8e9
Merge branch 'current-aiwc-old-llvm' of https://github.com/BeauJoh/Oc…
Jan 28, 2020
7ab45a7
Normed PSL metric, fixed metric names, 'dropped' metrics (granularity…
Aditya-Chilukuri Jan 29, 2020
3b29d26
Revert "Normed PSL metric, fixed metric names, 'dropped' metrics (gra…
Jan 29, 2020
908f3ac
Fixed inf bug for psl
Aditya-Chilukuri Jan 29, 2020
d3861ff
Temp
Aditya-Chilukuri Jan 30, 2020
23f39ef
Revert "Temp"
Aditya-Chilukuri Jan 30, 2020
80db8f2
Add psl normed metrics, rename metrics to match AIWC paper
Aditya-Chilukuri Jan 30, 2020
ac88033
Merge branch 'master' of https://gitlab.anu.edu.au/u6679031/oclgrind
Aditya-Chilukuri Jan 30, 2020
b44f20e
Experimental debugging additions
Feb 14, 2020
abff414
evert "Experimental debugging additions"
Aditya-Chilukuri Feb 14, 2020
58335cc
Merge branch 'master' of https://github.com/jrprice/Oclgrind
Mar 9, 2020
10f99d1
Updated cmake to use shared version of LLVM 9.0.1, merged in jprice\'…
Mar 9, 2020
26611ec
added rpath for oclgrind-rt-icd.so to load oclgrind.so
Mar 27, 2020
61ae67c
Added an optional OCLGRIND_WORKLOAD_CHARACTERISATION_OUTPUT_PATH envi…
Apr 5, 2020
aef9280
fixed segmentation fault cause by when the filepath variable isn\'t set
Apr 7, 2020
78fddcb
updated category of metrics logged to disk
Apr 22, 2020
bd8cdeb
whops, miss-classified total SIMD Op sum -- need to examine if we nee…
BeauJoh Apr 22, 2020
10d531c
updated README to be more AIWC specific
Dec 3, 2020
a1d4096
updated README to be more AIWC specific
Dec 3, 2020
2b13508
updated README to be more AIWC specific
Dec 3, 2020
2d7c53f
updated README to be more AIWC specific
Dec 3, 2020
dd573d3
Update README.md
BeauJoh Dec 3, 2020
6e6e476
added commented out table to README
Dec 3, 2020
eb1c98d
updated README
Dec 3, 2020
091d27e
updated README
Dec 3, 2020
ff73d98
updated README
Dec 3, 2020
c98962a
updated README
Dec 3, 2020
b9205c1
updated README
Dec 3, 2020
5a77c13
Merge branch 'llvm-9.0.1-shared-libs' of github.com:BeauJoh/AIWC
Dec 9, 2020
c508fef
updated readme and merged in the environment variables with AIWC feature
Dec 9, 2020
789f769
updated readme and merged in the environment variables with AIWC feature
Dec 9, 2020
0bda9a1
Update README.md
BeauJoh Dec 9, 2020
daaae93
merged in James Price\'s changes and added support for LLVM-11.0.1 fr…
BeauJoh Jan 20, 2021
4d4b282
merged in llvm11
BeauJoh Jan 20, 2021
6924c92
merged in llvm11 now the default
BeauJoh Jan 20, 2021
764d046
Update README.md
BeauJoh Jan 20, 2021
6a9e84c
made oclgrind dependencies public so oclgrind-kernel can use clang re…
BeauJoh Jan 21, 2021
9bb8fa6
added build with docker for more exposure and reduction in spin-up time
BeauJoh Jan 21, 2021
7a681ba
disable proxy for general public use
BeauJoh Jan 21, 2021
eb04801
Added logic to correctly initialize the multi-threaded version of pth…
BeauJoh Feb 17, 2021
61b787f
Ignore CMake `build` folder
Aerijo May 31, 2021
94287ee
link libdl
Aerijo May 31, 2021
b640f26
Merge pull request #1 from Aerijo/link_libs
Aerijo May 31, 2021
6005385
get device type from env
Aerijo May 31, 2021
41c27a1
Merge pull request #2 from Aerijo/device_type
Aerijo May 31, 2021
b7bcfab
use instruction for branch entropy
Aerijo May 31, 2021
01b7ebe
Merge pull request #3 from Aerijo/aiwc_branching
Aerijo May 31, 2021
7fe8e13
initial logging conversion
Aerijo May 31, 2021
7c4bd3d
better lists
Aerijo May 31, 2021
aee0d8b
fix appending
Aerijo May 31, 2021
37f3bfa
Merge pull request #4 from Aerijo/aiwc_logging
Aerijo May 31, 2021
5d37c88
update other logging parts
Aerijo May 31, 2021
ca98627
Merge pull request #5 from Aerijo/aiwc_logging
Aerijo May 31, 2021
7d7966f
remove redundant metrics
Aerijo May 31, 2021
6f63820
rename metrics
Aerijo May 31, 2021
28c5bb0
track if WG size was specified
Aerijo May 31, 2021
5ffb2b8
log work group sizes (and if set)
Aerijo May 31, 2021
1691d50
initial feature printer
Aerijo May 31, 2021
e7f9cb5
Merge pull request #6 from Aerijo/aiwc_report
Aerijo Jun 1, 2021
4d501af
initial spirv translation
Aerijo Jun 1, 2021
9fce721
disable lib predload
Aerijo Jun 1, 2021
09934ea
dump bitcode
Aerijo Jun 1, 2021
cadcb23
Merge pull request #7 from Aerijo/spirv_support
Aerijo Jun 1, 2021
a8dc3d7
add script shebang
Aerijo May 31, 2021
8254804
tag pointer with address space
Aerijo May 31, 2021
901b06b
try to fix uninitialised mem checker
Aerijo May 31, 2021
11be6c1
disable uninitialised mem checker in tests
Aerijo May 31, 2021
a712203
use pointer address space in loads and stores
Aerijo May 31, 2021
579e3af
support AddrSpaceCast
Aerijo Jun 1, 2021
11ecb15
extract space from pointer
Aerijo Jun 1, 2021
56082a5
track opcode by ID instead of string
Aerijo Jun 1, 2021
201b551
update docs
Jun 4, 2021
ec2194b
allow kernel naming
Jun 4, 2021
9183adc
fix typo
Jun 3, 2021
4cdf45b
Merge pull request #11 from Aerijo/opcode_id
BeauJoh Aug 27, 2021
78e932d
Merge pull request #10 from Aerijo/generic_address_space
BeauJoh Aug 27, 2021
a119c3e
Merge pull request #8 from Aerijo/aiwc_report
BeauJoh Aug 27, 2021
4a6c053
Merge pull request #7 from Aerijo/aiwc_logging
BeauJoh Aug 27, 2021
ba7c2c6
update README - need clang and libclang-dev (works with LLVM 12)
milthorpe Oct 25, 2021
5dc7726
Merge pull request #12 from ANU-HPC/master
BeauJoh Oct 25, 2021
decf936
with LLVM 14
BeauJoh Nov 12, 2021
011cdc3
moved AIWC doco to separate readme
BeauJoh Nov 12, 2021
d20533d
Merge branch 'master' of github.com:jrprice/Oclgrind
BeauJoh Nov 12, 2021
8395a60
added quick link to AIWC from README
BeauJoh Nov 12, 2021
06ef3e2
added AIWC doco
BeauJoh Nov 12, 2021
7a3f411
tests: when unable to find Oclgrind platform, print what else was found
milthorpe Nov 12, 2021
cf4f89a
AIWC: fix bug in calculation of PSL
milthorpe Nov 12, 2021
728f86e
Merge pull request #13 from ANU-HPC/master
BeauJoh Nov 12, 2021
445e584
squashed a warning
BeauJoh Nov 12, 2021
eb27ffc
Merge branch 'master' of github.com:BeauJoh/AIWC
BeauJoh Nov 12, 2021
20f801a
Simplified CMakeLists
BeauJoh Nov 12, 2021
3573584
Adds Architecture-Independent Workload Characterization (AIWC) plugin
BeauJoh Nov 19, 2021
7ed0ae2
using thread_local for MACOS build
BeauJoh Nov 19, 2021
7e953b2
thread_local
BeauJoh Nov 19, 2021
a671975
attempt to build on windows
BeauJoh Nov 20, 2021
b933256
attempt #2 for windows build
BeauJoh Nov 20, 2021
2feee2e
attempt to build on Mac OSX
BeauJoh Nov 20, 2021
ced0e7a
attempt #2 to build on Mac OSX
BeauJoh Nov 20, 2021
34285b4
attempt #3 to build on Mac OSX
BeauJoh Nov 20, 2021
71c791c
attempt #4 to build on Mac OSX
BeauJoh Nov 20, 2021
83cb6ba
attempt #5 to build on Mac OSX
BeauJoh Nov 20, 2021
c1436dc
attempt #3 for windows build
BeauJoh Nov 21, 2021
f635561
attempt #6 to build on Mac OSX
BeauJoh Nov 22, 2021
ba45667
attempt #7 to build on Mac OSX
BeauJoh Nov 22, 2021
e2a2c4d
attempt #8 to build on Mac OSX
BeauJoh Nov 22, 2021
b988fd4
attempt #9 to build on Mac OSX
BeauJoh Nov 22, 2021
e10c14d
attempt #10 to build on Mac OSX
BeauJoh Nov 22, 2021
225a0bf
attempt #11 to build on Mac OSX
BeauJoh Nov 22, 2021
5a5e41d
attempt #12 to build on Mac OSX
BeauJoh Nov 22, 2021
23cccc9
attempt #13 to build on Mac OSX
BeauJoh Nov 22, 2021
7eb3783
attempt #14 to build on Mac OSX
BeauJoh Nov 22, 2021
6d5d9fe
attempt #14 to build on Mac OSX
BeauJoh Nov 22, 2021
ef8f3e6
attempt #15 to build on Mac OSX
BeauJoh Nov 22, 2021
ab5f11d
attempt #16 to build on Mac OSX
BeauJoh Nov 22, 2021
1f7fa40
attempt #17 to build on Mac OSX
BeauJoh Nov 22, 2021
aff2c63
attempt #18 to build on Mac OSX
BeauJoh Nov 22, 2021
d2ead9b
attempt #19 to build on Mac OSX
BeauJoh Nov 23, 2021
75a1904
attempt #20 to build on Mac OSX
BeauJoh Nov 23, 2021
b7e59fc
attempt #21 to build on Mac OSX
BeauJoh Nov 23, 2021
8ae1d05
CI builds on all the platforms\?
BeauJoh Nov 23, 2021
0f88f6a
CI builds on all the platforms!
BeauJoh Nov 23, 2021
c43c022
added install.sh file
BeauJoh Nov 24, 2021
5fee934
added install.sh file
BeauJoh Nov 24, 2021
5674823
added clean up to install script
BeauJoh Nov 24, 2021
db1e4b4
rolled-back AIWC logging to easily feed into regression model
BeauJoh Jan 11, 2022
5305cca
Corrected the category of average_linear_entropy, yokota_entropy and …
BeauJoh Feb 22, 2022
eb282b1
Recover Benjamin's commit on generic memory space
Aug 11, 2022
8c22e05
Merge pull request #15 from jrprice/master
BeauJoh Jun 18, 2023
7bf7f54
Merge pull request #14 from ANU-HPC/master
BeauJoh Jun 18, 2023
2da2758
updated due to deprecation of getElementType
BeauJoh Jun 18, 2023
e8e58ac
attempted update to follow llvm14
BeauJoh Jun 18, 2023
4bdd02e
attempt to force llvm poly
BeauJoh Jun 20, 2023
7d399d6
attempt to force llvm poly
BeauJoh Jun 20, 2023
29aa215
attempt to force llvm poly
BeauJoh Jun 20, 2023
a30ff4a
attempt to force llvm poly
BeauJoh Jun 20, 2023
88980bf
attempt to force llvm poly
BeauJoh Jun 20, 2023
7663fd2
updated pointer reference to deal with the change to memory space
BeauJoh Jun 20, 2023
cb452b3
disbled the last failing dereference_null test (temporarily)
BeauJoh Jun 20, 2023
8c201d9
attempt to force llvm poly
BeauJoh Jun 20, 2023
f803435
attempt to force llvm poly
BeauJoh Jun 21, 2023
4fe5474
attempt to force llvm poly
BeauJoh Jun 21, 2023
9f48304
attempt to force llvm poly
BeauJoh Jun 21, 2023
9fb88df
updated cmake to use the RPATH --- this is essential for UNIX when us…
BeauJoh Jun 22, 2023
9aa6c54
attempt to force llvm poly
BeauJoh Jun 22, 2023
aa1157c
attempt to force llvm poly
BeauJoh Jun 22, 2023
0649cd4
attempt to force llvm poly
BeauJoh Jun 22, 2023
3ac6057
updated Cmake version and specified version IN_LIST operator of if()
BeauJoh Jul 25, 2023
4627585
updated Cmake version and specified version IN_LIST operator of if()
BeauJoh Jul 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,21 @@ if [ "`uname`" == "Linux" ]; then
sudo update-alternatives --install \
/usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM_VERSION} 20

if [ "$LLVM_VERSION" -ge 14 ] ; then \
sudo apt-get install -y libbsd-dev && \
apt download libpolly-${LLVM_VERSION}-dev && \
sudo dpkg --auto-deconfigure --force-all -i libpolly-${LLVM_VERSION}-dev*.deb ; \
fi

# Other dependencies
sudo apt-get install -y libedit-dev libvulkan-dev
elif [ "`uname`" == "Darwin" ]; then
URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}.0.0"
ARCHIVE="clang+llvm-${LLVM_VERSION}.0.0-x86_64-apple-darwin.tar.xz"

if [ ${LLVM_VERSION} -lt 13 ]; then
ln -sfn /Applications/Xcode_12.4.app /Applications/Xcode.app
fi
#hopefully temporary dirty hack to resolve bad pathing: No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libcurses.tbd', needed by `liboclgrind.dylib'
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk

mkdir -p llvm-${LLVM_VERSION}
wget "$URL/$ARCHIVE"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ config.h
.ninja_log
build.ninja
rules.ninja
build

# Compiler output
*.o
Expand All @@ -26,7 +27,9 @@ tests/runtime/map_buffer
# Misc
oclgrind-*.tar.gz
oclgrind-*.zip
clang+llvm-*.tar.xz
.clang_complete
.DS_Store
*.kdev4
*.sublime-*
llvm-*
193 changes: 193 additions & 0 deletions AIWC.md

Large diffs are not rendered by default.

19 changes: 14 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
# license terms please see the LICENSE file distributed with this
# source code.

cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.3)
cmake_policy(SET CMP0057 NEW)

project(Oclgrind)
set(Oclgrind_VERSION_MAJOR 21)
set(Oclgrind_VERSION_MINOR 10)
Expand All @@ -27,6 +29,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Enable rpath on OS X
set(CMAKE_MACOSX_RPATH 1)
# Fix rpath on unix systems
if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()

# Enable WIP 3.0 support.
option(ENABLE_EXPERIMENTAL_OPENCL_3, "Enable experimental OpenCL 3.0 support.")
Expand Down Expand Up @@ -55,6 +61,9 @@ endif()
# Detect endianness
test_big_endian(IS_BIG_ENDIAN)

if (LLVM_ROOT_DIR)
set(LLVM_DIR "${LLVM_ROOT_DIR}/lib/cmake/llvm")
endif()

# Find LLVM
find_package(LLVM REQUIRED CONFIG NO_CMAKE_BUILDS_PATH)
Expand Down Expand Up @@ -248,10 +257,10 @@ add_library(oclgrind ${CORE_LIB_TYPE}
src/plugins/RaceDetector.h
src/plugins/RaceDetector.cpp
src/plugins/Uninitialized.h
src/plugins/Uninitialized.cpp)
target_link_libraries(oclgrind
PRIVATE ${CORE_EXTRA_LIBS} ${CLANG_LIBS}
PUBLIC ${LLVM_LIBS})
src/plugins/Uninitialized.cpp
src/plugins/WorkloadCharacterisation.h
src/plugins/WorkloadCharacterisation.cpp)
target_link_libraries(oclgrind PUBLIC ${CORE_EXTRA_LIBS} ${CLANG_LIBS} ${LLVM_LIBS})

if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
target_link_libraries(oclgrind PRIVATE Version)
Expand Down
50 changes: 50 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM ubuntu:xenial

#ENV https_proxy http://proxy.ftpn.ornl.gov:3128
#ENV http_proxy http://proxy.ftpn.ornl.gov:3128

RUN apt-get -yq update

# Utilities
RUN apt-get install -yq --allow-downgrades --allow-remove-essential \
--allow-change-held-packages git wget vim python-pip apt-utils cmake unzip \
libboost-all-dev software-properties-common python-software-properties libcompute-dev libreadline-dev autoconf

# Install LLVM-11.0.1 and clang---needed for AIWC
WORKDIR /
RUN wget -qO- "https://cmake.org/files/v3.12/cmake-3.12.1-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr
RUN wget https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.1/llvm-11.0.1.src.tar.xz
RUN tar -xvf llvm-11.0.1.src.tar.xz
RUN wget https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.1/clang-11.0.1.src.tar.xz
RUN tar -xvf clang-11.0.1.src.tar.xz && mv clang-11.0.1.src clang
#build a shared library version
WORKDIR /llvm-11.0.1.src/build
RUN cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_ASM_COMPILER=gcc -DBUILD_SHARED_LIBS=On -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/llvm-11.0.1 ..
RUN make -j8 install
RUN make -j8 clang install

# Architecture-Independent Workload Characterization (AIWC)
RUN mkdir /oclgrind
WORKDIR /oclgrind
RUN git clone https://github.com/BeauJoh/AIWC.git src
RUN mkdir /oclgrind/build
WORKDIR /oclgrind/build
ENV CC /llvm-11.0.1/bin/clang
ENV CXX /llvm-11.0.1/bin/clang++
RUN cmake /oclgrind/src -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_DIR=/llvm-11.0.1/lib/cmake/llvm -DCLANG_ROOT=/llvm-11.0.1 -DCMAKE_INSTALL_PREFIX=/oclgrind -DBUILD_SHARED_LIBS=On
RUN make
RUN make install
RUN mkdir -p /etc/OpenCL/vendors && echo /oclgrind/lib/liboclgrind-rt-icd.so > /etc/OpenCL/vendors/oclgrind.icd

# Install Extended Open Dwarfs Benchmark suite to test OpenCL and AIWC...
WORKDIR /ExtendedOpenDwarfs
RUN git clone https://github.com/BeauJoh/OpenDwarfs.git src
WORKDIR /ExtendedOpenDwarfs/src
RUN ./autogen.sh
WORKDIR /ExtendedOpenDwarfs/build
RUN ../src/configure
RUN make lud && cp ../src/dense-linear-algebra/lud/lud_kernel.cl .

#and run a test with an OpenCL version of LUD to generate AIWC features.
CMD OCLGRIND_WORKLOAD_CHARACTERISATION=1 OCLGRIND_WORKLOAD_CHARACTERISATION_OUTPUT_PATH=~/aiwc_metrics.csv ./lud -s 16

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ GitHub Wiki:
https://github.com/jrprice/Oclgrind/wiki/


Architecture-Independent Workload Characterization (AIWC)
---------------------------------------------------------

AIWC is supported as a plugin in Oclgrind!
Read [here](./AIWC.md) to find out more about it.

Contact
-------
If you encounter any issues or have any questions, please use the
Expand Down
2 changes: 2 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
#define LLVM_VERSION @LLVM_VERSION@

#define IS_BIG_ENDIAN @IS_BIG_ENDIAN@

#define INSTALLED_LIBRARY_DIR "${INSTALLED_LIBRARY_DIR}"
24 changes: 24 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
INSTALL_DIR="~/.oclgrind"
OS="linux-gnu-ubuntu-20.04"
#OS="apple-darwin"

LLVM_VERSION=13

#install llvm
URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}.0.0"
ARCHIVE="clang+llvm-${LLVM_VERSION}.0.0-x86_64-${OS}.tar.xz"
mkdir -p llvm-${LLVM_VERSION}
wget "$URL/$ARCHIVE"
tar xf "$ARCHIVE" --strip-components 1 -C llvm-${LLVM_VERSION}

#install Oclgrind
PROJ_DIR=`pwd`
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo\
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
-DLLVM_ROOT_DIR="${PROJ_DIR}/llvm-${LLVM_VERSION}"
make install

#clean up
cd .. && rm -r ${ARCHIVE} llvm-${LLVM_VERSION}
Loading