Skip to content

Commit

Permalink
Merge pull request #629 from herbie-fp/minor-2.0
Browse files Browse the repository at this point in the history
Minor fixes for 2.0
  • Loading branch information
pavpanchekha authored Jun 30, 2023
2 parents f26711c + f2ddb16 commit 1e3c827
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion egg-herbie/info.rkt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#lang info

(define collection "egg-herbie")
(define version "1.6")
(define version "2.0")

(define pkg-desc "Racket bindings for simplifying math expressions using egg")
(define pkg-authors
Expand Down
2 changes: 1 addition & 1 deletion src/config.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
(if (equal? out "") default out))
default))

(define *herbie-version* "1.6")
(define *herbie-version* "2.0")

(define *hostname* (run-command "hostname"))

Expand Down
4 changes: 3 additions & 1 deletion src/datafile.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
#:unless (null? cost-accuracy))
(match cost-accuracy
[(list (list _ initial-accuracy) _ _) initial-accuracy]))])
(exact->inexact (- 1 (/ initial-accuracies-sum maximum-accuracy)))))
(if (> maximum-accuracy 0)
(exact->inexact (- 1 (/ initial-accuracies-sum maximum-accuracy)))
1.0)))
(define rescaled
(for/list ([cost-accuracy (in-list cost-accuracies)]
#:unless (null? cost-accuracy))
Expand Down
4 changes: 2 additions & 2 deletions src/info.rkt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#lang info

(define collection "herbie")
(define version "1.6")
(define version "2.0")

;; Packaging information

Expand All @@ -28,7 +28,7 @@
"profile-lib"
"rackunit-lib"
"web-server-lib"
("egg-herbie" #:version "1.6")
("egg-herbie" #:version "2.0")
("rival" #:version "1.7")
("fpbench" #:version "2.0.3")))

Expand Down
2 changes: 1 addition & 1 deletion src/web/pages.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
["interactive.js"
(make-interactive-js result out ctx)]
["timeline.html"
(make-timeline (test-name test) (job-result-timeline result) out)]
(make-timeline (test-name test) (job-result-timeline result) out #:path "..")]
["timeline.json"
(write-json (job-result-timeline result) out)]
["points.json"
Expand Down
4 changes: 1 addition & 3 deletions src/web/resources/report.css
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,8 @@ section { display: flow-root; }

/* Process / debug info */

#process-info { background: #ddd; }
#process-info { background: #ddd; padding: 0; }
#process-info p.header { font-size: 110%; padding: 1em 1em .5em; margin: 0; }
#process-info p.header .attachment { float: right; margin: 0 0 0 1em; }
#process-info > p { margin: 1em .75em 0; }

.timeline {
height: 2em; border: 1px solid #888; border-width: 1px 0px; margin-bottom: 1em;
Expand Down
2 changes: 1 addition & 1 deletion src/web/run.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

(call-with-output-file (build-path dir "timeline.html")
#:exists 'replace
(λ (out) (make-timeline "Herbie run" timeline out #:info info)))
(λ (out) (make-timeline "Herbie run" timeline out #:info info #:path ".")))

; Delete old files
(let* ([expected-dirs (map string->path (filter identity (map table-row-link (report-info-tests info))))]
Expand Down
4 changes: 2 additions & 2 deletions src/web/timeline.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

;; This first part handles timelines for a single Herbie run

(define (make-timeline name timeline out #:info [info #f])
(define (make-timeline name timeline out #:info [info #f] #:path [path "."])
(fprintf out "<!doctype html>\n")
(write-xexpr
`(html
Expand All @@ -20,6 +20,7 @@
(body
,(render-menu
(~a name)
#:path path
(if info
`(("Report" . "index.html"))
`(("Details" . "graph.html"))))
Expand All @@ -32,7 +33,6 @@
(-> timeline? xexpr?)
(define time (apply + (map (curryr dict-ref 'time) timeline)))
`(section ([id "process-info"])
(h1 "Details")
(p ((class "header"))
"Time bar (total: " (span ((class "number")) ,(format-time time)) ")")
(div ((class "timeline"))
Expand Down
2 changes: 1 addition & 1 deletion www/doc/2.0/using-cli.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h2 id="batch">Batch processing FPCores</h2>
1/3 [ 0.882s] 30→ 0 Cancel like terms
Warning: 24.7% of points produce a very large (infinite) output.
You may want to add a precondition.
See <a href="https://herbie.uwplse.org/doc/1.6/faq.html#inf-points">&lt;https://herbie.uwplse.org/doc/1.6/faq.html#inf-points&gt;</a> for more.
See <a href="https://herbie.uwplse.org/doc/2.0/faq.html#inf-points">&lt;https://herbie.uwplse.org/doc/2.0/faq.html#inf-points&gt;</a> for more.
2/3 [ 1.721s] 29→ 0 Expanding a square
3/3 [ 2.426s] 0→ 0 Commute and associate</pre>

Expand Down
2 changes: 1 addition & 1 deletion www/doc/latest
2 changes: 2 additions & 0 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ <h3>Contribute</h3>

<h2>Herbie Project News</h2>
<ol id="news">
<li><time>30 Jun</time>We are proud to release <a href="doc/2.0/release-notes.html">Herbie 2.0</a>! This release teaches Herbie to optimize for both accuracy and speed, and includes a complete redesign of Herbie's reports and metrics. Try it out!</li>
<hr class="yearmark" />
<li><time>24 Jul</time>Due to a major unforseen issue with our release infrastructure, we are re-releasing <a href="doc/1.5/release-notes.html">Herbie 1.5</a>. If you previously tried to install it and failed, please try again!</li>
<li><time>9 Jul</time>We're pleased to announce the release of <a href="doc/1.5/release-notes.html">Herbie 1.5</a>, with features like argument sorting and multiple outputs. Do try it out!</li>
<li><time>14 Jun</time><a href="https://www.bsaiki.com">Brett</a> and <a href="https://www.oflatt.com">Oliver</a> are giving a talk <a href="http://arith2021.arithsymposium.org">ARITH 2021</a> on adding precision tuning to Herbie. Tune in or <a href="papers.html">read the paper</a> to learn more!</li>
Expand Down

0 comments on commit 1e3c827

Please sign in to comment.