... | @@ -7,9 +7,18 @@ This page briefly describes various observations, optimizations, and recommendat |
... | @@ -7,9 +7,18 @@ This page briefly describes various observations, optimizations, and recommendat |
|
1. We did not observe a significant difference in performance when using _kernel function arguments_ over kernel invariants.
|
|
1. We did not observe a significant difference in performance when using _kernel function arguments_ over kernel invariants.
|
|
1. Object attributes that are modified once or more during kernel execution are updated on the host once after the core device returns.
|
|
1. Object attributes that are modified once or more during kernel execution are updated on the host once after the core device returns.
|
|
1. We observed that the core device performance is very sensitive to changes in the program. Adding minor complexity (e.g. adding one local variable) might already measurable influence RTIO performance.
|
|
1. We observed that the core device performance is very sensitive to changes in the program. Adding minor complexity (e.g. adding one local variable) might already measurable influence RTIO performance.
|
|
|
|
1. Device initialization (e.g. for a 9912) can be very slow (i.e. > 1 ms) and such calls should be scheduled accordingly.
|
|
|
|
|
|
## Data types
|
|
## Data types
|
|
|
|
|
|
|
|
ARTIQ supports various data types including integers, floats, and arrays.
|
|
|
|
|
|
|
|
1. 32-bit integer operations are preferred over 64-bit integer operations.
|
|
|
|
1. Integer operations are preferred to expensive floating-point operations.
|
|
|
|
1. It is possible to set the fast-math compile flag to allow aggressive optimizations on floating-point expressions at the cost of IEEE compliance.
|
|
|
|
|
|
|
|
### Type inference and conversion
|
|
|
|
|
|
ARTIQ implicitly infers most of the data types based on the program. Inferred data types are not always optimal.
|
|
ARTIQ implicitly infers most of the data types based on the program. Inferred data types are not always optimal.
|
|
|
|
|
|
1. The Python `int` type often compiles to an `int64` type. We recommend to explicitly cast integer variables to the desired type using `np.int32` or `np.int64`.
|
|
1. The Python `int` type often compiles to an `int64` type. We recommend to explicitly cast integer variables to the desired type using `np.int32` or `np.int64`.
|
... | | ... | |