Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
presentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sose24-ppds-qp
presentation
Commits
29bf1aa9
Verified
Commit
29bf1aa9
authored
8 months ago
by
Joshua Balthasar Kobschätzki
Browse files
Options
Downloads
Patches
Plain Diff
chore: add draft for outline and updated benchmark ingest script
parent
a441accd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
benchmark/benchmark-iter.py
+72
-3
72 additions, 3 deletions
benchmark/benchmark-iter.py
out/presentation.pdf
+0
-0
0 additions, 0 deletions
out/presentation.pdf
presentation.tex
+94
-18
94 additions, 18 deletions
presentation.tex
with
166 additions
and
21 deletions
benchmark/benchmark-iter.py
+
72
−
3
View file @
29bf1aa9
...
@@ -9,6 +9,9 @@ import sys
...
@@ -9,6 +9,9 @@ import sys
filename_pattern
=
re
.
compile
(
filename_pattern
=
re
.
compile
(
r
"
(?P<job>[0-9]+)\.(?P<type>cpp-bench.)?(?P<partition>[^.]+).bench.txt
"
r
"
(?P<job>[0-9]+)\.(?P<type>cpp-bench.)?(?P<partition>[^.]+).bench.txt
"
)
)
query_pattern
=
re
.
compile
(
r
"
^(?P<query>Q[0-9].[0-9]) +\| +(?P<run>[0-9]) +\| +(?P<duration>[0-9]+\.[0-9]+) +(?P<unit>\w+)$
"
)
def
init_db
(
db
:
sqlite3
.
Connection
):
def
init_db
(
db
:
sqlite3
.
Connection
):
...
@@ -87,6 +90,19 @@ def main(ingest: pathlib.Path, db: sqlite3.Connection):
...
@@ -87,6 +90,19 @@ def main(ingest: pathlib.Path, db: sqlite3.Connection):
(
bench_id
,)
=
bench_id
(
bench_id
,)
=
bench_id
benches
[
bench
]
=
bench_id
benches
[
bench
]
=
bench_id
# create or get cpp compiler
cpp_compiler
=
db
.
execute
(
"
select id from compilers where name =
'
cpp-ref
'"
).
fetchone
()
if
cpp_compiler
is
None
:
(
cpp_compiler
,)
=
db
.
execute
(
"
insert into compilers (name) values (?) returning id
"
,
[
"
cpp-ref
"
],
).
fetchone
()
print
(
f
"
Fetched [c]
{
cpp_compiler
}
"
)
db
.
commit
()
compilers
[
"
cpp-ref
"
]
=
cpp_compiler
for
filename
in
os
.
listdir
(
ingest
):
for
filename
in
os
.
listdir
(
ingest
):
match
=
filename_pattern
.
search
(
filename
)
match
=
filename_pattern
.
search
(
filename
)
...
@@ -103,6 +119,22 @@ def main(ingest: pathlib.Path, db: sqlite3.Connection):
...
@@ -103,6 +119,22 @@ def main(ingest: pathlib.Path, db: sqlite3.Connection):
if
match
.
get
(
"
type
"
)
is
not
None
:
if
match
.
get
(
"
type
"
)
is
not
None
:
bench
=
benches
[
"
benchmark-cpp
"
]
bench
=
benches
[
"
benchmark-cpp
"
]
# set compiler based on bench
compiler_name
=
"
adaptive
"
if
match
.
get
(
"
type
"
)
is
not
None
:
compiler_name
=
"
cpp-ref
"
compiler
=
compilers
.
get
(
compiler_name
)
if
compiler
is
None
:
(
compiler
,)
=
db
.
execute
(
"
insert into compilers (name) values (?) returning id
"
,
[
compiler_name
],
).
fetchone
()
print
(
f
"
Fetched [c]
{
compiler
}
"
)
db
.
commit
()
compilers
[
compiler_name
]
=
compiler
# figure out partition
# figure out partition
partition_name
=
match
[
"
partition
"
]
partition_name
=
match
[
"
partition
"
]
...
@@ -121,14 +153,51 @@ def main(ingest: pathlib.Path, db: sqlite3.Connection):
...
@@ -121,14 +153,51 @@ def main(ingest: pathlib.Path, db: sqlite3.Connection):
print
(
f
"
Fetched [p]
{
partition
}
"
)
print
(
f
"
Fetched [p]
{
partition
}
"
)
partitions
[
partition_name
]
=
partition
partitions
[
partition_name
]
=
partition
# TODO: parse file iter by iter
print
(
f
"
Handling file for
{
partition
}
on
{
bench
}
"
)
print
(
f
"
Handling file for
{
partition
}
on
{
bench
}
"
)
fd
=
open
(
ingest
/
filename
)
fd
=
open
(
ingest
/
filename
)
content
=
fd
.
read
()
content
=
fd
.
read
()
print
(
content
.
split
(
"
||
"
)[
2
])
for
line
in
content
.
splitlines
():
match
=
query_pattern
.
search
(
line
)
if
match
is
not
None
:
match
=
match
.
groupdict
()
print
(
f
"
Handling line
{
line
}
"
)
query_name
=
match
[
"
query
"
].
replace
(
"
.
"
,
"
-
"
).
lower
()
print
(
f
"
Handling query
{
query_name
}
"
)
# fetch or insert query
query
=
queries
.
get
(
query_name
)
if
query
is
None
:
(
query
,)
=
db
.
execute
(
"
insert into queries (name) values (?) returning id
"
,
[
query_name
],
).
fetchone
()
print
(
f
"
Fetched [q]
{
query
}
"
)
db
.
commit
()
queries
[
query_name
]
=
query
try
:
if
match
[
"
run
"
]
!=
"
0
"
:
db
.
execute
(
"
insert into measurements (compiler, query, partition, bench, duration, unit, iter_count) values (?, ?, ?, ?, ?, ?, ?)
"
,
[
compiler
,
query
,
partition
,
bench
,
float
(
match
[
"
duration
"
]),
match
[
"
unit
"
],
1
,
],
)
print
(
"
inserted value
"
)
else
:
print
(
"
discard warmup
"
)
except
Exception
as
e
:
print
(
f
"
Failed to insert row:
{
e
}
"
)
fd
.
close
()
fd
.
close
()
db
.
commit
()
db
.
commit
()
...
...
This diff is collapsed.
Click to expand it.
out/presentation.pdf
+
0
−
0
View file @
29bf1aa9
No preview for this file type
This diff is collapsed.
Click to expand it.
presentation.tex
+
94
−
18
View file @
29bf1aa9
\documentclass
{
beamer
}
\documentclass
[draft]
{
beamer
}
\usepackage
[T1]
{
fontenc
}
\usepackage
[T1]
{
fontenc
}
\usepackage
[german]
{
babel
}
\usepackage
[german
,english
]
{
babel
}
\usepackage
{
tikz,pgfplots,verbatim
}
\usepackage
{
tikz,pgfplots,verbatim
}
\usepackage
{
listings
}
\definecolor
{
GrayCodeBlock
}{
RGB
}{
64, 160, 43
}
\definecolor
{
BlackText
}{
RGB
}{
76, 79, 105
}
\definecolor
{
RedTypename
}{
RGB
}{
210, 15, 57
}
\definecolor
{
GreenString
}{
RGB
}{
96,172,57
}
\definecolor
{
PurpleKeyword
}{
RGB
}{
136, 57, 239
}
\definecolor
{
GrayComment
}{
RGB
}{
64, 160, 43
}
\definecolor
{
GoldDocumentation
}{
RGB
}{
180,165,45
}
\lstdefinelanguage
{
rust
}
{
columns=fullflexible,
keepspaces=true,
frame=single,
framesep=0pt,
framerule=0pt,
framexleftmargin=4pt,
framexrightmargin=4pt,
framextopmargin=5pt,
framexbottommargin=3pt,
xleftmargin=4pt,
xrightmargin=4pt,
backgroundcolor=
\color
{
GrayCodeBlock
}
,
basicstyle=
\ttfamily\color
{
BlackText
}
,
keywords=
{
true,false,
unsafe,async,await,move,
use,pub,crate,super,self,mod,
struct,enum,fn,const,static,let,mut,ref,type,impl,dyn,trait,where,as,
break,continue,if,else,while,for,loop,match,return,yield,in
}
,
keywordstyle=
\color
{
PurpleKeyword
}
,
ndkeywords=
{
bool,u8,u16,u32,u64,u128,i8,i16,i32,i64,i128,char,str,
Self,Option,Some,None,Result,Ok,Err,String,Box,Vec,Rc,Arc,Cell,RefCell,HashMap,BTreeMap,
macro
_
rules
}
,
ndkeywordstyle=
\color
{
RedTypename
}
,
comment=[l][
\color
{
GrayComment
}
\slshape
]
{
//
}
,
morecomment=[s][
\color
{
GrayComment
}
\slshape
]
{
/*
}{
*/
}
,
morecomment=[l][
\color
{
GoldDocumentation
}
\slshape
]
{
///
}
,
morecomment=[s][
\color
{
GoldDocumentation
}
\slshape
]
{
/*!
}{
*/
}
,
morecomment=[l][
\color
{
GoldDocumentation
}
\slshape
]
{
//!
}
,
morecomment=[s][
\color
{
RedTypename
}
]
{
\#
![
}{
]
}
,
morecomment=[s][
\color
{
RedTypename
}
]
{
\#
[}{]
}
,
stringstyle=
\color
{
GreenString
}
,
string=[b]"
}
\newcommand
{
\code
}
[1]
{
\lstinline
[language=rust]
{
#1
}}
\usetheme
[sectionpage=none]
{
metropolis
}
% Use metropolis theme
\usetheme
[sectionpage=none]
{
metropolis
}
% Use metropolis theme
\title
{
PPDS Pr
ä
sentation
}
\title
{
PPDS Pr
e
sentation
}
\date
{
\today
}
\date
{
\today
}
\author
{
Elias Engel and Joshua Kobschätzki
}
\author
{
Elias Engel and Joshua Kobschätzki
}
\institute
{
PPDS So
mmersemester
2024
}
\institute
{
PPDS So
Se
2024
}
\section
{
Übersicht
}
\section
{
Overview
}
\begin{document}
\begin{document}
\maketitle
\maketitle
\section
{
Lernergebnisse
}
\section
{
Architecture
}
\begin{frame}
[fragile]
\note
{
2 Min
}
\frametitle
{
\secname
: AdaptiveCompiler
}
\begin{itemize}
\item
Compiling
\code
{
struct PlanNode
}
$
\to
$
\code
{
Box<dyn ONC>
}
\begin{itemize}
\item
[$\to$]
Translates PlanNode into IR
\pause
\item
[$\to$]
optimized in passes
\begin{enumerate}
\item
Predicate
\item
Unify
\pause
\item
Pushdown Projection
\pause
\item
Projection Fuse
\end{enumerate}
\pause
\item
[$\to$]
translated into operators, who may opportunistically use SIMD
\pause
\item
[$\to$]
(optional) SIMD operators use an intermediate ONC layer,
\verb
|
ChunkedONC
|
\end{itemize}
\end{itemize}
\end{frame}
\section
{
Benchmark results
}
\begin{frame}
\note
{
2 Min
}
\frametitle
{
\secname
}
TODO
\end{frame}
\section
{
Learning Outcomes
}
\begin{frame}
[fragile]
{
\secname
}
\begin{frame}
[fragile]
{
\secname
}
\begin{itemize}
\begin{itemize}
\item
{
\item
{
\verb
|
std::simd
|
, High-level SIMD is
t
suboptimal
\verb
|
std::simd
|
, High-level SIMD is suboptimal
\begin{itemize}
\begin{itemize}
\item
Kosten der Abstraktion hoch
\item
Abstraction cost was too high
\item
Optimierung von skalaren Teilen oder SIMD per intrinsics ist effektiver
\item
Optimising of scalar code via SIMD intrinsics is significantly more effective
\item
Mikroarchitekturen haben sehr unterschiedliche Charakteristiken
\item
Does not adapt well across microarchitectures
\note
{
Implied here, high level SIMD can't accurately reflect these and is a compromise
}
\end{itemize}
\end{itemize}
}
}
\item
ONC i
st nicht gut
ve
k
tori
sierbar
\item
ONC i
nterface is not well suitable for
ve
c
tori
zation
\begin{itemize}
\begin{itemize}
\item
Design des Interfaces/ der Datenstrukturen elementar
\item
Vectorization requires certain data structure layouts (columnar)
\item
Vectorization of ONC has a fixed overhead (unpacking)
\end{itemize}
\end{itemize}
\end{itemize}
\end{itemize}
\end{frame}
\end{frame}
\section
{
Herausforderungen
}
\begin{frame}
\end{frame}
\begin{frame}
[standout]
\begin{frame}
[standout]
Danke für ihre Aufmerksamkeit
\\
Thank you for your Attention
Raum für Fragen
\end{frame}
\end{frame}
\section*
{
Backup Slides
}
\section*
{
Backup Slides
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment