You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tolerances and step sizes used for finite-difference checks in BLAS differentiation tests (scalar/vector, forward/reverse). All modes use the same precision-based scheme unless a mixed-precision override applies.
3
+
Tolerances and step sizes for finite-difference derivative checks in the BLAS differentiation test generator.
For routines whose **output is double precision** but whose **first differentiable input** is **single precision** (e.g. `DSDOT`), the generator uses single-precision–style settings so the finite-difference check matches the conditioning of the inputs:
27
+
## Overrides
41
28
42
-
-**h** = 1.0e-3
43
-
-**rtol** = 2.0e-3
44
-
-**atol** = 2.0e-3
29
+
### Mixed-precision D* (single-precision first differentiable input)
45
30
46
-
This override is applied in:
31
+
Applies when the routine behaves like “double output, but first differentiable input is single precision” (e.g. `DSDOT` with **SX** first; the generator also treats **SY** and **SB** as single-precision inputs for `D*`).
Detection: `precision_type == real(8)` and the first entry in the `inputs` list has `get_param_precision(first_input, func_name, param_types) == "real(4)"`. In the generator, `get_param_precision` returns `real(4)` for **D\*** functions when the parameter is one of **SX**, **SY**, **SB**.
53
-
54
-
---
55
-
56
-
## Mixed-precision tests (list)
57
-
58
-
A test is treated as mixed-precision if it is for a **D\*** (or **Z\***) routine and the **first differentiable input** is single precision. The generator explicitly treats **SX**, **SY**, and **SB** as single precision for **D\*** routines.
59
-
60
-
**Routines that use the mixed-precision override** (when present in the suite and documented with that input order):
61
-
62
-
| Routine | First input(s) | Modes using override |
**Note:** Any other **D\*** routine whose first `\param[in]` is **SX**, **SY**, or **SB** will also get the override. There is no **Z\*** branch for single-precision inputs in `get_param_precision`, so currently only **D\*** routines can be mixed-precision in this sense. If you add a **D\*** (or in future **Z\***) routine with a single-precision first input, it will automatically receive the same h and tolerances as above.
67
-
68
-
---
36
+
### Relaxed C* tolerance in vector reverse
69
37
70
-
## Summary table (all modes)
38
+
Only for **single-precision complex** (`C*`) **vector reverse** tests:
(Base tolerances for S/C/D/Z are as in the first table; mixed-precision replaces h and rtol/atol only where indicated. In scalar forward, mixed-precision only changes the step size h to 1e-3; rtol/atol remain 1e-5.)
45
+
All other `C*` modes use the base tolerance (1.0e-3). `Z*` does not use relaxed tolerances.
0 commit comments