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

Add in benchmark notebook and parsing changes for C22 8.0.0 #7

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 13 additions & 8 deletions fah_log_parser/science_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
seq,
string,
whitespace,
success,
regex
)

some_digits = decimal_digit.at_least(1).concat()
Expand All @@ -25,7 +27,6 @@

dash = string("-")


def line_with(p: Parser) -> Parser:
return whitespace.optional() >> p << newline

Expand Down Expand Up @@ -57,7 +58,7 @@ def parenthesized(p: Parser) -> Parser:
class SemVer(Model):
major: int
minor: int
patch: int
patch: Optional[int] = 0


class CommandArg(Model):
Expand All @@ -74,8 +75,8 @@ class CoreHeader(Model):
homepage: str
date: datetime
time: str
revision: str
branch: str
revision: Optional[str]
branch: Optional[str]
compiler: str
options: str
platform: str
Expand Down Expand Up @@ -196,10 +197,14 @@ def string_prop(name: str) -> Parser:
).combine_dict(CommandArg)


semver = seq(
semver_full = seq(
major=integer << string("."), minor=integer << string("."), patch=integer
).combine_dict(SemVer)

semver_short = seq(major=integer << string("."), minor=integer).combine_dict(SemVer)

semver = semver_full | semver_short

core_header = (
match_heading("Core22 Folding@home Core")
>> seq(
Expand All @@ -211,8 +216,8 @@ def string_prop(name: str) -> Parser:
homepage=string_prop("Homepage"),
date=string_prop("Date").map(lambda s: datetime.strptime(s, "%b %d %Y")),
time=string_prop("Time"),
revision=string_prop("Revision"),
branch=string_prop("Branch"),
revision=string_prop("Revision").optional(),
branch=string_prop("Branch").optional(),
compiler=string_prop("Compiler"),
options=string_prop("Options"),
platform=string_prop("Platform"),
Expand Down Expand Up @@ -280,7 +285,7 @@ def inner():

@generate
def core_log() -> Parser:
version_decl = line_with(string("Version ") >> semver)
version_decl = line_with(string("Version ") >> semver) # WARNING 8.0 requires semver_short
platforms_decl = line_with(bracketed(integer) << string(" compatible platform(s):"))
perf = floating << string(" ns/day")
perf_checkpoint = line_with(string("Performance since last checkpoint: ") >> perf)
Expand Down
106 changes: 60 additions & 46 deletions notebooks/core22-cuda.ipynb

Large diffs are not rendered by default.

Loading