Rival no profiling - #1665
Rival no profiling#1665obround wants to merge 6 commits into
Conversation
| (for/or ([i (in-naturals)]) | ||
| (with-handlers ([exn:fail:filesystem:exists? (const #f)]) | ||
| (open-output-file (build-path dump-dir (format "~a.rival" i)) #:exists 'error)))) | ||
| (pretty-print `(precision ,@(map representation-name flattened-reprs)) dump-file 1) |
There was a problem hiding this comment.
So this is interesting. Precision is presumably per-function/per-output? A bit ugly to set this globally, then.
There was a problem hiding this comment.
Hmm if I understand what you're saying correctly, would a syntax like this be better as opposed to (precision binary64 binary64) at the top:
(define (f v_0 v_1) (assert (TRUE)) (! :precision binary64 v_0) (! :precision binary64 v_1))There's only one Rival file that compiles more than one output (and hence has more than one precision specified).
There was a problem hiding this comment.
Yeah, uhh, I don't know if I have a preferred syntax here but we're trying to make the benchmarks use rival's normal input language. Which presumably an actual user somewhere might use. So we should try to make it usable!
There was a problem hiding this comment.
Ok, I don't have a real solution here, and I'm not sure how important it is. Better to merge this and fix issues later. In terms of actual usability as a stand-alone programming language, (precision X Y Z) is weird because it introduces lots of state & possibility for error. Like what if you write that and then define a function with 2, or 4, return values? BTW (answer valid) and (answer invalid) is also a bit weird, right, since again what if you list the wrong number of answers or something? But there at least I see the point, the syntax allows us to write out the query before we launch it. Some other alternatives, if any appeal to you: 1) we could only dump cases where all the types match, and keep (precision X); 2) we could do the (! :precision X foo) syntax, though it's kinda ugly; 3) you could do (define (...) X Y Z :precisions foo bar baz). We can always merge this now and now worry about it, but again, you're not going to have this stuff more paged in in the future. You might know more, it can be legitimate to say "let's decide this when we know more. It's a judgement call.
This PR:
--enable dump:rivaldumps:(answer <valid/invalid> <answer>)instruction, and a top-level(precision <binary32/binary64>)instruction.rivalfiles--num-pointssyntax to take#train/#testinstead of just#trainlike before (this ismake points.tar.xzto dump Rival points for the Rival 3 nightly: samples 256 training points and 1000 test points (--num-points 256/1000)New Rival dump format example: