The basic flags are listed as follows:
-e
,--error-bounds
: for specifying one or multiple error thresholds.-b
,--bitwidths
: for specifying the candidate bit-widths of the operators.
The allocation controlling flags are listed as follows:
-m
,--maxc
: for specifying the maximum number of type casts.
The options for the global optimization are listed as follows:
--gopt-timeout
: for specifying the timeout of the global optimization--gopt-tolerance
: for specifying the tolerance of the global optimization
-e [a single floating-point value as the error threshold (absolute error)]
, e.g.,
-e 0.0001
or
-e "[error theshold 1] [error threshold 2] ..."
, e.g.,
-e "0.0001 0.0002 0.0003"
Please remember to use quotation marks to enclose the thresholds.
The later use case is for trying different error thesholds and generate the optimal allocation for each of them.
There is no default value for -e option.
Use
-b "32 64"
to tune with two bit-width candidates, 32-bit and 64-bit.
Use
-b "64 128"
to tune with two candidates, 64-bit and 128-bit.
Use
-b "32 64 128"
to tune with three candidates, 32-bit, 64-bit, and 128-bit.
Again, please remember to use quotation marks to enclose the bit-widths.
The default of -b option is "32 64".
Use
-m C
to limit up to C type casts in the allocation where C must be an integer.
Unlimited number of type casts.
Use
--gopt-timeout T
to set the positive integer T as the timeout.
120
Use
--gopt-tolerance T
to set the positive floating-point number T as the tolerance.
5e-02
A constant expression which bit-width is automatically matched with the operator which consumes the constant. (However, for 128-bit operators, the constants are assigned with 64-bit.)
- The value of the constant expression.
A variable expression which has a bounded and contiguous value range specified in the arguments.
-
The label of the variable. Type: string
-
The group ID of the variable. Type: integer
-
The lower bound of the value range. Type: floating-point number
-
The upper bound of the value range. Type: floating-point number
Constraints
- The lower bound must be less than or equal to the upper bound.
A binary expression.
-
The binary operator. It is specified by a string which is one of the following:
- + : addition
- - : subtraction
- * : multiplication
- / : division
-
The group ID. Type: integer
-
The left-hand-side operand. Type: expression
-
The right-hand-side operand. Type: expression
A unary expression.
-
The unary operator. It is specified by a string which is one of the following:
- - : negation
- exp : exponential
- sqrt : square root
-
The group ID. Type: integer
-
The operand. Type: expression
This function is for assigning a higher/lower weight to an operator group that allows prioritizing lower/higher bit-width assignments.
No return value.
-
The group ID. Type: integer
-
The desired weight. Type: floating-point