|
80 | 80 | ; min-prec = (cdr (get-bounds parent)) |
81 | 81 | (define (precision-tuning ivec vregs vprecs-max varc vstart-precs) |
82 | 82 | ; vector stores minimum additional precision that is needed to evaluate an instruction |
83 | | - (define vprecs-min (make-vector (vector-length vprecs-max) 0)) |
| 83 | + ; (define vprecs-min (make-vector (vector-length vprecs-max) 0)) |
84 | 84 | (for ([instr (in-vector ivec (- (vector-length ivec) 1) -1 -1)] ; reversed over ivec |
85 | 85 | [n (in-range (- (vector-length vregs) 1) -1 -1)]) ; reversed over indices of vregs |
86 | 86 | (define op (car instr)) ; current operation |
|
89 | 89 | (define output (vector-ref vregs n)) ; output of the current instr |
90 | 90 |
|
91 | 91 | (define max-prec (vector-ref vprecs-max (- n varc))) ; upper precision bound given from parent |
92 | | - (define min-prec (vector-ref vprecs-min (- n varc))) ; lower precision bound given from parent |
| 92 | + ; (define min-prec (vector-ref vprecs-min (- n varc))) ; lower precision bound given from parent |
93 | 93 |
|
94 | | - (when (>= min-prec (*rival-max-precision*)) ; Early stopping on lower bound |
95 | | - (*sampling-iteration* (*rival-max-iterations*))) |
| 94 | + #;(when (>= min-prec (*rival-max-precision*)) ; Early stopping on lower bound |
| 95 | + (*sampling-iteration* (*rival-max-iterations*))) |
96 | 96 |
|
97 | 97 | ; Final precision assignment based on the upper bound |
98 | 98 | (define final-precision |
|
112 | 112 | (- x varc) |
113 | 113 | (max (vector-ref vprecs-max (- x varc)) (+ max-prec up-bound))) |
114 | 114 |
|
| 115 | + (when (>= lo-bound (*rival-max-precision*)) ; Early stopping on lower bound |
| 116 | + (*sampling-iteration* (*rival-max-iterations*))) |
115 | 117 | ; Lower precision bound propogation |
116 | | - (vector-set! vprecs-min |
117 | | - (- x varc) |
118 | | - (max (vector-ref vprecs-min (- x varc)) (+ min-prec lo-bound)))))) |
| 118 | + #;(vector-set! vprecs-min |
| 119 | + (- x varc) |
| 120 | + (max (vector-ref vprecs-min (- x varc)) (+ min-prec lo-bound)))))) |
0 commit comments