diff --git a/.agents/contributing-changes.md b/.agents/contributing-changes.md index 6652374b73..21a1be414b 100644 --- a/.agents/contributing-changes.md +++ b/.agents/contributing-changes.md @@ -151,7 +151,8 @@ fails on both is the environment's. - User-facing features get a page under `docs/advanced/` (see `da.rst`, `auto.rst`, `bramfactor.rst` for the expected length and tone) and a link from the relevant index. - New layer attributes should carry a `description=` taken from `hls4ml/utils/attribute_descriptions.py`; - `docs/attr_doc_gen.py` turns those into the attribute tables in the documentation. + `docs/attr_doc_gen.py` turns those into `docs/ir/attributes.rst`, which you regenerate as + [CONTRIBUTING.md](../CONTRIBUTING.md) describes. - The PR description itself must document the change and the expected behaviour — that is item one of the contribution guidelines. diff --git a/.agents/optimizer-passes.md b/.agents/optimizer-passes.md index 92d292e4f1..28da068732 100644 --- a/.agents/optimizer-passes.md +++ b/.agents/optimizer-passes.md @@ -133,6 +133,9 @@ too — a quiet omission, not a loud one. The user writes the name in pascal case in the config (`ParallelizationFactor`); it arrives as snake case (`parallelization_factor`) in `layer.attributes`, and templates read it from there by the same name. +Give the attribute a `description=` from `hls4ml/utils/attribute_descriptions.py`, and regenerate +`docs/ir/attributes.rst` as [CONTRIBUTING.md](../CONTRIBUTING.md) describes. + ## Worked example in the tree: the distributed arithmetic strategy A strategy implemented end to end as passes, useful as a template to copy. The machinery it uses is core to diff --git a/AGENTS.md b/AGENTS.md index 7e7f58bf4d..555e8cacf9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -73,6 +73,8 @@ the person opening the pull request, and tell them what remains to be confirmed. `pre-commit run --hook-stage manual --all-files`, which is what CI runs and which catches packaging problems the default hooks do not. - Add or update a test under `test/pytest/`. For a bug fix, the test should fail without the fix. +- If the change touches layer attributes, regenerate `docs/ir/attributes.rst` as + [CONTRIBUTING.md](CONTRIBUTING.md) describes. - Check the whole diff yourself, hunk by hunk, before presenting it. Remove debug output, commented-out code and stray changes. - Do not commit generated HLS projects, model files or logs. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a297753b38..4bcb0f13e3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,10 +16,11 @@ We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests. 1. In the pull request description, clearly document all changes made and the expected behavior. -1. If you are introducing new functionality, add at least one unit test under the `test` folder and make sure it passes before you submit the pull request. -1. Similarly, if you are fixing a bug, add at least one unit test under the `test` folder such that the main branch fails the test and your branch passes the test. -1. Install and run `pre-commit` on the files that you have edited. -1. Submit the pull request to the [main](https://github.com/fastmachinelearning/hls4ml) branch. +2. If you are introducing new functionality, add at least one unit test under the `test` folder and make sure it passes before you submit the pull request. +3. Similarly, if you are fixing a bug, add at least one unit test under the `test` folder such that the main branch fails the test and your branch passes the test. +4. Install and run `pre-commit` on the files that you have edited. +5. `docs/ir/attributes.rst` is generated. If you add layers or backends, or change layer attributes or their descriptions, regenerate it by running `python ../attr_doc_gen.py` from the `docs/ir` folder, and commit the result. Do not edit it by hand. +6. Submit the pull request to the [main](https://github.com/fastmachinelearning/hls4ml) branch. Pull requests are **squash-merged**, so the individual commits on your branch are not preserved. You do not need to curate them, but the pull request title and description become the permanent record of diff --git a/docs/ir/attributes.rst b/docs/ir/attributes.rst index 39621f2d29..c156d831a1 100644 --- a/docs/ir/attributes.rst +++ b/docs/ir/attributes.rst @@ -87,19 +87,19 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * table_size: int (Default: 1024) * The size of the lookup table used to approximate the function. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * table_t: NamedType (Default: fixed<18,8,TRN,WRAP,0>) * The datatype (precision) used for the values of the lookup table. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS ParametrizedActivation ====================== @@ -143,19 +143,19 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * table_size: int (Default: 1024) * The size of the lookup table used to approximate the function. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * table_t: NamedType (Default: fixed<18,8,TRN,WRAP,0>) * The datatype (precision) used for the values of the lookup table. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS PReLU ===== @@ -203,19 +203,19 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * table_size: int (Default: 1024) * The size of the lookup table used to approximate the function. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * table_t: NamedType (Default: fixed<18,8,TRN,WRAP,0>) * The datatype (precision) used for the values of the lookup table. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS Softmax ======= @@ -251,59 +251,59 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * table_size: int (Default: 1024) * The size of the lookup table used to approximate the function. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * table_t: NamedType (Default: fixed<18,8,TRN,WRAP,0>) * The datatype (precision) used for the values of the lookup table. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * n_outer: int (Default: 1) - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * n_inner: int (Default: 1) - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * implementation: list [latency,stable,argmax,legacy] (Default: stable) * Choice of implementation of softmax function. "latency" provides good latency at the expense of extra resources. It performs well with a small number of classes. "stable" may require extra clock cycles but has better accuracy. "legacy" is the older implementation which has bad accuracy, but is fast and has low resource use. It is superseded by the "latency" implementation for most applications. "argmax" is a special implementation that can be used if only the output with the highest probability is important. Using this implementation will save resources and clock cycles. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * skip: bool (Default: False) * If enabled, skips the softmax node and returns the raw outputs. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * exp_table_t: NamedType (Default: fixed<18,8,RND,SAT,0>) * The datatype (precision) used for the values of the lookup table. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * inv_table_t: NamedType (Default: fixed<18,8,RND,SAT,0>) * The datatype (precision) used for the values of the lookup table. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * inv_inp_t: NamedType (Default: fixed<18,8,RND,SAT,0>) - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * accum_t: NamedType (Default: fixed<18,8,RND,SAT,0>) - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS IFNeuron ======== @@ -477,19 +477,19 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * table_size: int (Default: 1024) * The size of the lookup table used to approximate the function. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * table_t: NamedType (Default: fixed<18,8,TRN,WRAP,0>) * The datatype (precision) used for the values of the lookup table. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS HardActivation ============== @@ -537,19 +537,19 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * table_size: int (Default: 1024) * The size of the lookup table used to approximate the function. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * table_t: NamedType (Default: fixed<18,8,TRN,WRAP,0>) * The datatype (precision) used for the values of the lookup table. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS Reshape ======= @@ -625,13 +625,13 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * strategy: list [latency,resource] (Default: latency) @@ -667,13 +667,13 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS Conv1D ====== @@ -735,25 +735,25 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * parallelization_factor: int (Default: 1) * The number of outputs computed in parallel. Essentially the number of multiplications of input window with the convolution kernel occurring in parallel. A higher number results in more parallelism (lower latency and II) at the expense of resources used. Currently only supported in io_parallel. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Altera, Coyote * conv_implementation: list [LineBuffer,Encoded] (Default: LineBuffer) * "LineBuffer" implementation is preferred over "Encoded" for most use cases. This attribute only applies to io_stream. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Coyote Conv2D ====== @@ -827,25 +827,25 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * parallelization_factor: int (Default: 1) * The number of outputs computed in parallel. Essentially the number of multiplications of input window with the convolution kernel occurring in parallel. A higher number results in more parallelism (lower latency and II) at the expense of resources used. Currently only supported in io_parallel. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Altera, Coyote * conv_implementation: list [LineBuffer,Encoded] (Default: LineBuffer) * "LineBuffer" implementation is preferred over "Encoded" for most use cases. This attribute only applies to io_stream. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Coyote Conv2DBatchnorm =============== @@ -919,25 +919,25 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * parallelization_factor: int (Default: 1) * The number of outputs computed in parallel. Essentially the number of multiplications of input window with the convolution kernel occurring in parallel. A higher number results in more parallelism (lower latency and II) at the expense of resources used. Currently only supported in io_parallel. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Altera, Coyote * conv_implementation: list [LineBuffer,Encoded] (Default: LineBuffer) * "LineBuffer" implementation is preferred over "Encoded" for most use cases. This attribute only applies to io_stream. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Coyote SeparableConv1D =============== @@ -1005,29 +1005,29 @@ Backend-specific attributes --------------------------- * depthwise_accum_t: NamedType - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * pointwise_accum_t: NamedType - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * depthwise_result_t: NamedType - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * depthwise_reuse_factor: int (Default: 1) - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * pointwise_reuse_factor: int (Default: 1) - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * conv_implementation: list [LineBuffer,Encoded] (Default: LineBuffer) * "LineBuffer" implementation is preferred over "Encoded" for most use cases. This attribute only applies to io_stream. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Coyote * dw_output_t: NamedType (Default: fixed<18,8,TRN,WRAP,0>) @@ -1123,25 +1123,25 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * parallelization_factor: int (Default: 1) * The number of outputs computed in parallel. Essentially the number of multiplications of input window with the convolution kernel occurring in parallel. A higher number results in more parallelism (lower latency and II) at the expense of resources used. Currently only supported in io_parallel. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Altera, Coyote * conv_implementation: list [LineBuffer,Encoded] (Default: LineBuffer) * "LineBuffer" implementation is preferred over "Encoded" for most use cases. This attribute only applies to io_stream. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Coyote SeparableConv2D =============== @@ -1221,29 +1221,29 @@ Backend-specific attributes --------------------------- * depthwise_accum_t: NamedType - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * pointwise_accum_t: NamedType - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * depthwise_result_t: NamedType - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * depthwise_reuse_factor: int (Default: 1) - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * pointwise_reuse_factor: int (Default: 1) - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * conv_implementation: list [LineBuffer,Encoded] (Default: LineBuffer) * "LineBuffer" implementation is preferred over "Encoded" for most use cases. This attribute only applies to io_stream. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Coyote * dw_output_t: NamedType (Default: fixed<18,8,TRN,WRAP,0>) @@ -1363,25 +1363,25 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * parallelization_factor: int (Default: 1) * The number of outputs computed in parallel. Essentially the number of multiplications of input window with the convolution kernel occurring in parallel. A higher number results in more parallelism (lower latency and II) at the expense of resources used. Currently only supported in io_parallel. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Altera, Coyote * conv_implementation: list [LineBuffer,Encoded] (Default: LineBuffer) * "LineBuffer" implementation is preferred over "Encoded" for most use cases. This attribute only applies to io_stream. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Coyote BatchNormalization ================== @@ -1435,7 +1435,7 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS Pooling1D ========= @@ -1485,19 +1485,19 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * conv_implementation: list [LineBuffer,Encoded] (Default: LineBuffer) * "LineBuffer" implementation is preferred over "Encoded" for most use cases. This attribute only applies to io_stream. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Coyote Pooling2D ========= @@ -1559,19 +1559,19 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * conv_implementation: list [LineBuffer,Encoded] (Default: LineBuffer) * "LineBuffer" implementation is preferred over "Encoded" for most use cases. This attribute only applies to io_stream. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Coyote GlobalPooling1D =============== @@ -1611,13 +1611,13 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS GlobalPooling2D =============== @@ -1659,13 +1659,13 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS ZeroPadding1D ============= @@ -1849,7 +1849,7 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS MatMul ====== @@ -1881,13 +1881,13 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS Dot === @@ -1935,13 +1935,13 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, Vivado, VivadoAccelerator, VivadoAccelerator, Vitis, Vitis, Quartus, Quartus, Catapult, Catapult, SymbolicExpression, SymbolicExpression, Altera, Altera, Coyote, Coyote, Libero, Libero, XLS, XLS + * Available in: Vivado, Vivado, VivadoAccelerator, VivadoAccelerator, Vitis, Vitis, VitisUnified, VitisUnified, Quartus, Quartus, Catapult, Catapult, SymbolicExpression, SymbolicExpression, Altera, Altera, Coyote, Coyote, Libero, Libero, XLS, XLS Concatenate =========== @@ -1989,7 +1989,7 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS Resize ====== @@ -2097,7 +2097,7 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS SimpleRNN ========= @@ -2161,37 +2161,37 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS - -* recurrent_reuse_factor: int (Default: 1) - - * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * static: bool (Default: True) - * If set to True, will reuse the same recurrent block for computation, resulting in lower resource usage at the expense of serialized computation and higher latency/II. + * If set to True, will reuse the same recurrent block for computation, resulting in lower resource usage at the expense of serialized computation and higher latency/II. Only applies to io_parallel, as io_stream always reuses the same block. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Coyote * table_size: int (Default: 1024) * The size of the lookup table used to approximate the function. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, Altera, Coyote * table_t: NamedType (Default: fixed<18,8,TRN,WRAP,0>) * The datatype (precision) used for the values of the lookup table. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, Altera, Coyote + +* recurrent_reuse_factor: int (Default: 1) + + * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. + + * Available in: Quartus, Catapult, Altera LSTM ==== @@ -2265,37 +2265,37 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS - -* recurrent_reuse_factor: int (Default: 1) - - * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * static: bool (Default: True) - * If set to True, will reuse the same recurrent block for computation, resulting in lower resource usage at the expense of serialized computation and higher latency/II. + * If set to True, will reuse the same recurrent block for computation, resulting in lower resource usage at the expense of serialized computation and higher latency/II. Only applies to io_parallel, as io_stream always reuses the same block. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Coyote * table_size: int (Default: 1024) * The size of the lookup table used to approximate the function. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, Altera, Coyote * table_t: NamedType (Default: fixed<18,8,TRN,WRAP,0>) * The datatype (precision) used for the values of the lookup table. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, Altera, Coyote + +* recurrent_reuse_factor: int (Default: 1) + + * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. + + * Available in: Quartus, Catapult, Altera GRU === @@ -2371,37 +2371,37 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS - -* recurrent_reuse_factor: int (Default: 1) - - * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * static: bool (Default: True) - * If set to True, will reuse the same recurrent block for computation, resulting in lower resource usage at the expense of serialized computation and higher latency/II. + * If set to True, will reuse the same recurrent block for computation, resulting in lower resource usage at the expense of serialized computation and higher latency/II. Only applies to io_parallel, as io_stream always reuses the same block. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Coyote * table_size: int (Default: 1024) * The size of the lookup table used to approximate the function. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, Altera, Coyote * table_t: NamedType (Default: fixed<18,8,TRN,WRAP,0>) * The datatype (precision) used for the values of the lookup table. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, Altera, Coyote + +* recurrent_reuse_factor: int (Default: 1) + + * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. + + * Available in: Quartus, Catapult, Altera Bidirectional ============= @@ -2501,55 +2501,31 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS - -* forward_reuse_factor: int (Default: 1) - - * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - - * Available in: Vivado, VivadoAccelerator, Vitis, Coyote - -* backward_reuse_factor: int (Default: 1) - - * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - - * Available in: Vivado, VivadoAccelerator, Vitis, Coyote - -* forward_recurrent_reuse_factor: int (Default: 1) - - * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - - * Available in: Vivado, VivadoAccelerator, Vitis, Coyote - -* backward_recurrent_reuse_factor: int (Default: 1) - - * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - - * Available in: Vivado, VivadoAccelerator, Vitis, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * static: bool (Default: True) - * If set to True, will reuse the same recurrent block for computation, resulting in lower resource usage at the expense of serialized computation and higher latency/II. + * If set to True, will reuse the same recurrent block for computation, resulting in lower resource usage at the expense of serialized computation and higher latency/II. Only applies to io_parallel, as io_stream always reuses the same block. - * Available in: Vivado, VivadoAccelerator, Vitis, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Coyote * table_size: int (Default: 1024) * The size of the lookup table used to approximate the function. - * Available in: Vivado, VivadoAccelerator, Vitis, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Coyote * table_t: NamedType (Default: fixed<18,8,TRN,WRAP,0>) * The datatype (precision) used for the values of the lookup table. - * Available in: Vivado, VivadoAccelerator, Vitis, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Coyote TimeDistributed =============== @@ -2587,7 +2563,7 @@ Backend-specific attributes * Controls the amount and type of parallelism in the loop over time steps. If set to "off", no parallelism will be used. If set to "unroll", the loop will be unrolled. This may result in excessive resource use and cannot be used in "io_stream" mode. If set to "pipeline", the loop will be pipelined. - * Available in: Vivado, VivadoAccelerator, Vitis, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Coyote GarNet ====== @@ -2619,7 +2595,7 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, Vivado, VivadoAccelerator, VivadoAccelerator, Vitis, Vitis, Quartus, Quartus, Catapult, Catapult, SymbolicExpression, SymbolicExpression, Altera, Altera, Coyote, Coyote, Libero, Libero, XLS, XLS + * Available in: Vivado, Vivado, VivadoAccelerator, VivadoAccelerator, Vitis, Vitis, VitisUnified, VitisUnified, Quartus, Quartus, Catapult, Catapult, SymbolicExpression, SymbolicExpression, Altera, Altera, Coyote, Coyote, Libero, Libero, XLS, XLS GarNetStack =========== @@ -2667,7 +2643,7 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, Vivado, VivadoAccelerator, VivadoAccelerator, Vitis, Vitis, Quartus, Quartus, Catapult, Catapult, SymbolicExpression, SymbolicExpression, Altera, Altera, Coyote, Coyote, Libero, Libero, XLS, XLS + * Available in: Vivado, Vivado, VivadoAccelerator, VivadoAccelerator, Vitis, Vitis, VitisUnified, VitisUnified, Quartus, Quartus, Catapult, Catapult, SymbolicExpression, SymbolicExpression, Altera, Altera, Coyote, Coyote, Libero, Libero, XLS, XLS Quant ===== @@ -2705,7 +2681,7 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS BipolarQuant ============ @@ -2783,7 +2759,7 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS BatchNormOnnx ============= @@ -2815,7 +2791,7 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS LayerGroup ========== @@ -2933,37 +2909,37 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * table_range_power2: int (Default: 0) * The negative power of 2 that represents the range of the lookup table, e.g. a value of 1 would represent a range of 0.5. - * Available in: Vivado, VivadoAccelerator, Vitis, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Coyote * table_size: int (Default: 4096) * The size of the lookup table used to approximate the function. - * Available in: Vivado, VivadoAccelerator, Vitis, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Coyote * table_t: NamedType (Default: ufixed<8,5,RND_CONV,SAT,0>) * The datatype (precision) used for the values of the lookup table. - * Available in: Vivado, VivadoAccelerator, Vitis, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Coyote * accum_t: NamedType (Default: fixed<14,4,RND_CONV,SAT,0>) * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Coyote EinsumDense =========== @@ -3095,7 +3071,7 @@ Backend-specific attributes * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS DACombinational =============== @@ -3535,25 +3511,25 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * parallelization_factor: int (Default: 1) * The number of outputs computed in parallel. Essentially the number of multiplications of input window with the convolution kernel occurring in parallel. A higher number results in more parallelism (lower latency and II) at the expense of resources used. Currently only supported in io_parallel. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Altera, Coyote * conv_implementation: list [LineBuffer,Encoded] (Default: LineBuffer) * "LineBuffer" implementation is preferred over "Encoded" for most use cases. This attribute only applies to io_stream. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Coyote PointwiseConv2D =============== @@ -3627,22 +3603,22 @@ Backend-specific attributes * The datatype (precision) used to store intermediate results of the computation within the layer. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * reuse_factor: int (Default: 1) * The number of times each multiplier is used by controlling the amount of pipelining/unrolling. A lower number results in more parallelism and lower latency at the expense of the resources used. Reuse factor = 1 corresponds to all multiplications executed in parallel, and hence, the lowest possible latency. - * Available in: Vivado, VivadoAccelerator, Vitis, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Quartus, Catapult, SymbolicExpression, Altera, Coyote, Libero, XLS * parallelization_factor: int (Default: 1) * The number of outputs computed in parallel. Essentially the number of multiplications of input window with the convolution kernel occurring in parallel. A higher number results in more parallelism (lower latency and II) at the expense of resources used. Currently only supported in io_parallel. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Altera, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Altera, Coyote * conv_implementation: list [LineBuffer,Encoded] (Default: LineBuffer) * "LineBuffer" implementation is preferred over "Encoded" for most use cases. This attribute only applies to io_stream. - * Available in: Vivado, VivadoAccelerator, Vitis, Catapult, Coyote + * Available in: Vivado, VivadoAccelerator, Vitis, VitisUnified, Catapult, Coyote diff --git a/test/pytest/test_attribute_docs.py b/test/pytest/test_attribute_docs.py new file mode 100644 index 0000000000..a3e4ddc615 --- /dev/null +++ b/test/pytest/test_attribute_docs.py @@ -0,0 +1,31 @@ +"""Checks that docs/ir/attributes.rst matches what docs/attr_doc_gen.py generates from the layer attributes.""" + +import importlib.util +import os +from importlib.metadata import entry_points +from pathlib import Path + +import pytest + +from hls4ml.backends.plugin_loader import ENTRY_POINT_GROUP, ENV_PLUGIN_MODULES + +repo_root = Path(__file__).parent.parent.parent +docs_dir = repo_root / 'docs' + + +def test_attribute_docs_are_up_to_date(tmp_path, monkeypatch): + if not docs_dir.is_dir(): + pytest.skip('the documentation is not part of the source distribution') + if entry_points().select(group=ENTRY_POINT_GROUP) or os.environ.get(ENV_PLUGIN_MODULES): + pytest.skip('backend plugins are installed, and the generated file would list them') + + spec = importlib.util.spec_from_file_location('attr_doc_gen', docs_dir / 'attr_doc_gen.py') + attr_doc_gen = importlib.util.module_from_spec(spec) + spec.loader.exec_module(attr_doc_gen) + + monkeypatch.chdir(tmp_path) # the script writes attributes.rst into the current directory + attr_doc_gen.write_all_attributes(attr_doc_gen.convert_to_attr_list()) + + generated = (tmp_path / 'attributes.rst').read_text() + committed = (docs_dir / 'ir' / 'attributes.rst').read_text() + assert generated == committed, 'docs/ir/attributes.rst is out of date; regenerate it as CONTRIBUTING.md describes.'